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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 sys.sp_indexoption

Author  Topic 

anish20in
Starting Member

18 Posts

Posted - 2011-08-03 : 04:11:48

Hi All,
When i executing a procedure i got the following error
The procedure 'sys.sp_indexoption' cannot be executed within a transaction.
Can you help me?

Thanks
Anish

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-03 : 04:54:17
the error message is obvious. you're wrapping the sp call in a transaction it seems.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

anish20in
Starting Member

18 Posts

Posted - 2011-08-03 : 05:49:38
[quote]Originally posted by visakh16

the error message is obvious. you're wrapping the sp call in a transaction it seems.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

It is happening in Try Catch.How to resolve it?


Kunjappy
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-08-03 : 07:30:16
try executing it without wrapping in a transaction

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

anish20in
Starting Member

18 Posts

Posted - 2011-08-05 : 06:49:27
Solved by rewriting the procedure.

Kunjappy
Go to Top of Page
   

- Advertisement -