Sql Transaction

  • Thread starter Thread starter Kikoz
  • Start date Start date
K

Kikoz

Hi all.

I use System.Data.SqlClient.SqlTransaction type to execute several sprocs
from C#, one by one, using one transaction. It works fine if I use sa
account - commits on success, rolls back on errors, blah, blah. But it fails
if I use less priveleged account. Sometimes Exception tells me that "<user>
login failed", sometimes just generic sql error. What are minimum priveleges
user should have to execute sprocs in context of SqlTransaction without
giving him too much power?

Thanks,
Kikoz
 
User permitted to use database.

Assuming no dynamic sql in the procs, execute permissions for each proc.

WIth Dynamic SQL, they will need (potentially) select, insert, delete and
update on each affected table.
 
Kikoz said:
Hi all.

I use System.Data.SqlClient.SqlTransaction type to execute several sprocs
from C#, one by one, using one transaction. It works fine if I use sa
account - commits on success, rolls back on errors, blah, blah. But it
fails if I use less priveleged account. Sometimes Exception tells me that
"<user> login failed", sometimes just generic sql error. What are minimum
priveleges user should have to execute sprocs in context of SqlTransaction
without giving him too much power?

No special permissions are required to use a SqlTransaction. If the non-sa
login can run each procedure, then the transaction should be fine.

David
 
Hi,

I do not think it is related to transaction. If user does not have
permissions to run SP, then it fails. Check if user has proper permissions
to execute SP
 
Back
Top