Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server: permissions to read database diagrams

Could you please advise, what are permissions required to give user access to read Database diagrams in SQL Server 2005?

Thanks a lot!

like image 785
Budda Avatar asked Jan 11 '11 18:01

Budda


People also ask

How do I get permission for a database diagram in SQL Server?

If the owner of a diagram has been removed from the database, the diagram will remain in the database until a member of the db_owner role attempts to open it. At that point the db_owner member can choose to take over ownership of the diagram.

How do I view an SQL database diagram?

In Object Explorer, expand the Database Diagrams folder. Double-click the name of the database diagram you want to open. Right-click the name of the database diagram you want to open, and then choose Design Database Diagram.

How do I grant permission for SQL to read?

Expand Security - Logins, then Right Click on login and then click Properties. Go to User Mapping tab and select the database on which you want to give permission and at bottom select db_datareader as shown below. Click Ok and you're done.

What are SQL Server database diagrams?

Database diagrams graphically show the structure of the database. Using database diagrams you can create and modify tables, columns, relationships, and keys. Additionally, you can modify indexes and constraints.


1 Answers

From BOL

  • Although any user with access to a database can create a diagram, once the diagram has been created, the only users who can see it are the diagram's creator and any member of the db_owner role.
  • Ownership of diagrams can only be transferred to members of the db_owner role. This is only possible if the previous owner of the diagram has been removed from the database.
  • If the owner of a diagram has been removed from the database, the diagram will remain in the database until a member of the db_owner role attempts to open it. At that point the db_owner member can choose to take over ownership of the diagram.

So, db_owner/dbo is best

like image 192
gbn Avatar answered Sep 27 '22 23:09

gbn