Re: SET BEGIN TRANSACTION

Tech-Archive recommends: Speed Up your PC by fixing your registry



Rogers,

Very interesting. I didn't remember that SET BEGIN TRANSACTION was once a
legal syntax. Here are a couple of options:

1 - Have your database run in 8.0 (SQL 2000) mode and the old syntax will be
accepted.

2 - Script out all of your stored procedures to a file. Globally change all
SET BEGIN TRAN, SET COMMIT TRAN, SET ROLLBACK TRAN to BEGIN TRAN, COMMIT
TRAN, ROLLBACK TRAN. Then run the script to reapply the changes in your
database.

I personally would choose option 2 over undermining the upgrade to 2005. To
get a script in 2005, right click on the database, ignore Script Database
and choose Tasks / Generate Scripts ..., then follow the prompts.

RLF


"Rogers" <naissani@xxxxxxxxxxx> wrote in message
news:uoormCkkHHA.4676@xxxxxxxxxxxxxxxxxxxxxxx
I have migrate SQL Server 2000 database into SQL Server 2005 and in all the
stored procedures I am using SET BEGIN TRANSACTION but SQL Server 2005
support BEGIN TRANSACTION, is there any way i can resolve this issues, I
have 150 stored procedures where I am using SET BEGIN TRANSACTION

Thanks..



.



Relevant Pages

  • statement not allowed within multi-statement transaction (Long)
    ... allowed within multi-statement transaction. ... I have a sample script that is available on request. ... database and then create different versions of the database to meet our ... Detaches the database and copies the upgraded mdf and ldf files to the ...
    (microsoft.public.sqlserver.programming)
  • Re: statement not allowed within multi-statement transaction (Long)
    ... The error is telling you that you are in transaction state, ... Wayne Snyder, MCDBA, SQL Server MVP ... > I have a sample script that is available on request. ... > database and then create different versions of the database to meet our ...
    (microsoft.public.sqlserver.programming)
  • Re: handling db connection error
    ... When a database is in standby, you can't do anything with it. ... connection open (instead of transaction), and it looks like you are trying ... In a T-SQL script, you assume there is already a connection ... To handle connections robustly, ...
    (microsoft.public.sqlserver.programming)
  • Re: SET BEGIN TRANSACTION
    ... Andrew J. Kelly SQL MVP ... - Script out all of your stored procedures to a file. ... all SET BEGIN TRAN, SET COMMIT TRAN, SET ROLLBACK TRAN to BEGIN TRAN, ... the stored procedures I am using SET BEGIN TRANSACTION but SQL Server ...
    (microsoft.public.sqlserver.clients)
  • Re: SET BEGIN TRANSACTION
    ... Later you can script out each stored procedure to a file ... query like to find SET BEGIN TRANSACTION and replace with BEGI TRANSACTION ... all SET BEGIN TRAN, SET COMMIT TRAN, SET ROLLBACK TRAN to BEGIN TRAN, ... the stored procedures I am using SET BEGIN TRANSACTION but SQL Server ...
    (microsoft.public.sqlserver.clients)