Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

how to execute sp_addsrvrolemember within a tarnsaction in sqlserver2008 R2 on trigger? Expand / Collapse
Author
Message
Posted Monday, January 13, 2014 4:22 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, June 26, 2014 9:09 AM
Points: 15, Visits: 75
hi all
i have a table user list
i want execute sp_addsrvrolemember in trigger for this table
this error :
The procedure 'sys.sp_addsrvrolemember' cannot be executed within a transaction

please help me for execute this sp within transaction?
Post #1530227
Posted Monday, January 13, 2014 4:39 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Yesterday @ 8:37 AM
Points: 40,596, Visits: 37,053
The message is pretty clear
The procedure 'sys.sp_addsrvrolemember' cannot be executed within a transaction


You can't run it within a transaction. Why are you trying?



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1530230
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse