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.
Author |
Topic |
fombyjambox
Starting Member
2 Posts |
Posted - 2009-05-04 : 11:43:07
|
We have a maintenance system that runs on SQL and I've been asked if there is a way to lock all the 'normal' users out while the accounting group runs their month end reports. I'm not really proficient with SQL at all so any help would be greatly appreciated, even if it's just pointing me in the right direction with some new search terms. Thanks. |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2009-05-04 : 11:49:26
|
create an accounting role, deny access to everyone except admin, grant access to admin role.___________________________________________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.5 out! |
 |
|
fombyjambox
Starting Member
2 Posts |
Posted - 2009-05-04 : 12:38:24
|
OK, that sounds easy enough but that brings up another question. Is there a way to automate this process so the accountant can do it on his own when he needs to? Those steps would have to be done by me each time and it would be ideal if he could hit a button, run the reports, then hit it again to resume normal db activity. Does my question make sense? |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2009-05-04 : 12:56:27
|
yes all grants can be scripted via t-sql script and run in a sproc or something like that.however i wouldn't let the accountants do that. it's still better that you do it before they get their hands on it ___________________________________________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.5 out! |
 |
|
|
|
|