Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Create User Account

Author  Topic 

kdeutsch
Yak Posting Veteran

83 Posts

Posted - 2013-01-22 : 17:37:00
Ok,
bad implimentation i am trying to correct. What we have is a sql account that our asp applications use that has full permissions to the sql server, really bad. trying to correct it by createing a basing public account that needs , dbcreator, datareader, datawriter and ability to run stored procedures and look at views.

So i created the account but how can i assign the roles of datareader and writer globally and run stored procs without having to go into each db to do it.

Thanks

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2013-01-23 : 21:54:21
Why Full Permission? Do you have DBA or no?
Go to Top of Page

Peter99
Constraint Violating Yak Guru

498 Posts

Posted - 2013-01-24 : 09:51:20
Right click on login name, select properties, select user mapping, in top window "users mapped to this login" select select database name, in lower winow "database role membership" select permissions you want to give.
Go to Top of Page

kdeutsch
Yak Posting Veteran

83 Posts

Posted - 2013-01-24 : 11:26:17
hi,
No DBA, I created everything want I am wonder though is instead of each database over 120, can I set it globally to be a dd_Reader, DB_Writer and execue on SP's. instead of having to go into each DB to do this.

Thanks
Go to Top of Page

srimami
Posting Yak Master

160 Posts

Posted - 2013-01-29 : 03:42:01
Execute the following script to assign permissions for all the databases:

sp_msforeachdb
exec sp_addrolemember @rolename='db_datareader', @membername='THE_LOGINAME'

Note: Please work on syntax errors
Go to Top of Page
   

- Advertisement -