how to programatically compare permissions of login/user in sql server 2005
Posted
by titanium
on Stack Overflow
See other posts from Stack Overflow
or by titanium
Published on 2009-06-05T19:59:39Z
Indexed on
2010/04/20
23:03 UTC
Read the original article
Hit count: 207
tsql
There's a login/user in SQL Server who is having a problem importing accounts in production server. I don't have an idea what method he is doing this. According to the one importing, this import is working fine in development server. But when he did the same import in production it is giving him errors. Below are the errors he is getting for each accounts.
2009-06-05 18:01:05.8254 ERROR [engine-1038] Task [1038:00001 - Members]: Step 1.0 [<Insert step description>]: Task.RunStep(): StoreRow has failed
2009-06-05 18:01:05.9035 ERROR [engine-1038] Task [1038:00001 - Members]: Step 1.0 [<Insert step description>]: Task.RunStep(): StoreRow exception: Exception caught while storing Data. [Microsoft][ODBC SQL Server Driver][SQL Server]'ACCOUNT1' is not a valid login or you do not have permission.
Please note that 'ACCOUNT1' is not the real account name. I just changed it for security reason.
Using SQL Server Management Studio (SSMS), I viewed/checked the permissions of the user/login who is performing the import from development server and production for comparison. I found no difference.
My question is: Is there a way to programmatically query permissions in server and database level of a particular login/user so I can compare/contrast for any differences?
© Stack Overflow or respective owner