Read-only access to a database

How to get LiveDoco to do what you need it to.

Read-only access to a database

Postby Admin » Fri Jan 25, 2013 1:47 pm

If you would like to configure read only access to a database for a particular login you could use the below SQL:

USE AdventureWorks
GO
EXEC sp_grantdbaccess 'USER_NAME' --, 'Password' -- If using SQL AUTH
GO
EXEC sp_addrolemember 'db_datareader', 'USER_NAME'
GO
GRANT VIEW DEFINITION TO [USER_NAME]
GO


Simply replace AdventureWorks with your database's name and USER_NAME with the login you would like to use
Admin
Site Admin
 
Posts: 6
Joined: Wed Jan 23, 2013 8:23 am

Return to HOWTOs

Who is online

Users browsing this forum: No registered users and 1 guest

cron