• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 916
  • Last Modified:

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?


  • 2
1 Solution
you need read access to the sys schema.  Generally, I grant that by assigning membership to the dbreader role.  
That should have said, db_datareader role :>)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now