Re: add users in a transaction SQL Server 2000
- From: "Jens K. Suessmeyer" <Jens@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 31 Mar 2007 13:12:33 +0200
You will have to use your own logic to make it RollbackAble:
"sp_grantlogin cannot be executed within a user-defined transaction."
http://msdn2.microsoft.com/en-us/library/ms173449.aspx
Jens K. Suessmeyer.
---
http://www.sqlserver2005.de
---
"maddog" <maddog@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:2B94A051-19CC-41F1-96B6-AB51D1E5C3B3@xxxxxxxxxxxxxxxx
I need to be able to add users to roles in serveral databases and if one of
the inserts fails I need to be able to roll back the whole transaction. I am
getting the following error:
The procedure 'sp_grantlogin' cannot be executed within a transaction.
The procedure 'sp_defaultdb' cannot be executed within a transaction.
The procedure 'sp_grantdbaccess' cannot be executed within a transaction.
The procedure 'sp_addrolemember' cannot be executed within a transaction.
.
- Prev by Date: Re: SQL2005 Linked server authentication problem
- Previous by thread: Re: sp_configure 'user instances enabled'
- Index(es):
Relevant Pages
|