dbTalk Databases Forums  

SET BEGIN TRANSACTION

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss SET BEGIN TRANSACTION in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rogers
 
Posts: n/a

Default SET BEGIN TRANSACTION - 05-09-2007 , 08:48 AM






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..



Reply With Quote
  #2  
Old   
Russell Fields
 
Posts: n/a

Default Re: SET BEGIN TRANSACTION - 05-10-2007 , 08:08 AM






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 (AT) hotmail (DOT) com> wrote

Quote:
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..




Reply With Quote
  #3  
Old   
Andrew J. Kelly
 
Posts: n/a

Default Re: SET BEGIN TRANSACTION - 05-10-2007 , 09:06 AM



I agree with Russell on going with the #2 option. That is how I would
approach it.

--
Andrew J. Kelly SQL MVP

"Russell Fields" <russellfields (AT) nomail (DOT) com> wrote

Quote:
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 (AT) hotmail (DOT) com> wrote in message
news:uoormCkkHHA.4676 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
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..






Reply With Quote
  #4  
Old   
Rogers
 
Posts: n/a

Default Re: SET BEGIN TRANSACTION - 05-11-2007 , 02:14 PM



Is there any way I can update all the stored procedure through specific
query like to find SET BEGIN TRANSACTION and replace with BEGI TRANSACTION

Thanks


"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote

Quote:
I agree with Russell on going with the #2 option. That is how I would
approach it.

--
Andrew J. Kelly SQL MVP

"Russell Fields" <russellfields (AT) nomail (DOT) com> wrote in message
news:O$4FHRwkHHA.1240 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
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 (AT) hotmail (DOT) com> wrote in message
news:uoormCkkHHA.4676 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
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..








Reply With Quote
  #5  
Old   
Manoj Kumar
 
Posts: n/a

Default Re: SET BEGIN TRANSACTION - 05-11-2007 , 04:39 PM



I agree with Russell’s option 2.

Script out the entire stored procedure to a file and perform a search and
replace of the strings.

After you have done with the replacements, you can apply that your DB [I
would recommend a FDB backup prior to this step for any rollback purposes].
Later you can script out each stored procedure to a file [File per object]
and use it for your source code control system’s updates.


--
Manoj Kumar


"Rogers" wrote:

Quote:
Is there any way I can update all the stored procedure through specific
query like to find SET BEGIN TRANSACTION and replace with BEGI TRANSACTION

Thanks


"Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote in message
news:O4$6rxwkHHA.4900 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
I agree with Russell on going with the #2 option. That is how I would
approach it.

--
Andrew J. Kelly SQL MVP

"Russell Fields" <russellfields (AT) nomail (DOT) com> wrote in message
news:O$4FHRwkHHA.1240 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
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 (AT) hotmail (DOT) com> wrote in message
news:uoormCkkHHA.4676 (AT) TK2MSFTNGP02 (DOT) phx.gbl...
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..









Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.