question

Sri 1 avatar image
Sri 1 asked

does not have permission to read meta data.

User does not have permission to run DBCC showfilestats for database . is the error while user try to see datbabase properties by right click. which permission can give him access/rather any permission which is equal to dbowner ----below is udated, so current situation is even i have given DBowner to check if is this the only situation to solve, user getting error like could not able to read meta deta.
help
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
WilliamD avatar image
WilliamD answered
You have to be a member of the db_owner database role or a member of the sysadmin role to be able to run this command on a database. EDIT: [Your original question was about scripting out all objects of a database.][1] To do this, you have to have highly elevated permissions. Maybe it is possible to do so without assigning the user to the db_owner role, but I doubt it. If you want to do something that requires elevated permissions, then you have to assign those permissions (even if only temporarily). [1]: http://ask.sqlservercentral.com/questions/80709/generating-a-script-for-database-with-all-object
14 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Whatever the first option is / does, the user running the wizard doesn't have sufficient permissions. AS I mentioned already, consider elevating the permissions for the period of scripting the database and then revoking those extra permissions afterwards. The first option probably goes outside of the actual database to collect more information (maybe at the instance level or in system databases), being a db_owner of just the target DB will then not be enough.
1 Like 1 ·
William is saying they need to be in sysadmins role. Being able to script out your instance gives the user all of your intellectual property. If this is something they are allowed then go ahead. Or you can get them to put in a request and you can script it out for them.
1 Like 1 ·
without giving any ownership is it not possible..? actually need is to fetch script for database with all object and user is getting error on seeing the properties as well. i have given view defination permission already. but current error he is getting like could not read the meta data error.
0 Likes 0 ·
@Sri, Thanks for making it a comment.
0 Likes 0 ·
@i have tried after giving DBowner role to that user, but now error get changed on error report and it stated " could not read the meta deta, have insufficient access" what sud i do nw.
0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.