Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question about Locking jobs/ commiting transactions

Status
Not open for further replies.

questhaven

Programmer
Mar 28, 2001
81
0
0
US
I am new at using jobs to perform tasks in SQL Server. I was wondering if it is possible for me to lock the table that is being affected by the job while the job is occurring and then unlock it when it is done.

Alternatively, I have tried using Begin/Commit transaction to ensure that connectivity to the linked database is not down, and if so not to delete the contents of the local table, but I am getting MSDTC errors. Any idea why?

Thanks in advance for any insight into this!! :)

- Michele
 
run this command after beginning transaction

SET XACT_ABORT ON

to overcome that MSDTC error

Good Luck
Gopala Krishna Kakani

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top