Cannot Create Script

  • I have a user who is a dbo for a particular database and is trying to use the right click "Script Database As" function in Management Studio. When he does this he gets the message:

    Could not read metadata, possibly due to insufficient access rights. (Microsoft.SqlServer.Smo)

    As a sysadmin this function works fine for me. After some experimentation, I have found that the function will work if the login is made a dbo for the master database - something that I do not want to do. Is this expected behaviour? If so, is there a way to let my user use this function without giving him too many rights?

    Roger

  • Try this:

    From SSMS

    Right click on the server name and click properties

    Click on the Permissions tab

    Click the user name

    On the Explicit Permissions almost at the bottom there is "View Any Definition" grant that. See if that will work.

    That should do it for any database, there is a very similar functionality for each database as well.

     

  • That does exactly what I wanted.

    Thanks,

    Roger

  • I have the same problem and tried your solution. I made the change as suggested but still got the problem. When I went to look at my permissions again, they had been changed back, so my changes were lost. My SQL Server database is on a remote web server, so could this be the problem. If so, how do I get to change my permissions?

  • You need to select the login account first before you change that permission.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply