Link to home
Start Free TrialLog in
Avatar of turpya
turpya

asked on

What user permission is required to execute create database script?

In SQL Server Management Studio, after logging into a remotely hosted database, I right-click on the database, and select 'Script Database As', 'CREATE to', then select 'Clipboard'...

I then get this error:

"Script failed for database xxxx

Could not read metadata, possibly due to insufficient access rights."

Can anyone tell me what permission I need to have assigned to the database user to allow me to do this? (The hosting provider is not sure).

Also, I need to be able to export the data from this database and copy it locally, once I have created the tables using the above script. Are there any specific permissions required to export data?

Thanks!

Avatar of dqmq
dqmq
Flag of United States of America image

you need read access to the sys schema.  Generally, I grant that by assigning membership to the dbreader role.  
ASKER CERTIFIED SOLUTION
Avatar of dqmq
dqmq
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial