dbTalk Databases Forums  

Isolation level

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Isolation level in the microsoft.public.sqlserver.dts forum.



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

Default Isolation level - 07-17-2003 , 10:47 AM






Hi,

I have a question:

I have a DTS package with two tasks:
1. A Copy SQL Server Object Task: to copy a table object between two
database servers
2. A Execute SQL Task: to delete all rows in the table previously copied

This is a database used by a web application, and there might be inserts
into the table between these two steps.
How can I garantee that the rows that are deleted in step 2 are only those
copied in step 1, and none that are newly inserted?
I've have read about the transaction isolation level that I can define in
the DTS package, namely about
"Repeatable Read. You are guaranteed not to see any changes made by other
transactions in values it has already read."
Does this work in my case?

Thanks for your help
Rafaela



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Isolation level - 07-17-2003 , 02:58 PM






The problem here being that the transfer is one transaction and the delete
another.

You could Pump the records over (You do not need to recreate the table
everytime surely)
You could then have a linked server back to the source that says delete from
source where the record PK = ones I just copied over.



--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"RKAzinhal" <rafaelaka (AT) hotmail (DOT) com> wrote

Quote:
Hi,

I have a question:

I have a DTS package with two tasks:
1. A Copy SQL Server Object Task: to copy a table object between two
database servers
2. A Execute SQL Task: to delete all rows in the table previously
copied

This is a database used by a web application, and there might be inserts
into the table between these two steps.
How can I garantee that the rows that are deleted in step 2 are only those
copied in step 1, and none that are newly inserted?
I've have read about the transaction isolation level that I can define in
the DTS package, namely about
"Repeatable Read. You are guaranteed not to see any changes made by other
transactions in values it has already read."
Does this work in my case?

Thanks for your help
Rafaela





Reply With Quote
  #3  
Old   
RKAzinhal
 
Posts: n/a

Default Re: Isolation level - 07-18-2003 , 03:58 AM



The problem is, the table has no PK, because it's a log table...
Are there other suggestions?

Thanks, Rafaela

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
The problem here being that the transfer is one transaction and the delete
another.

You could Pump the records over (You do not need to recreate the table
everytime surely)
You could then have a linked server back to the source that says delete
from
source where the record PK = ones I just copied over.



--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"RKAzinhal" <rafaelaka (AT) hotmail (DOT) com> wrote in message
news:#jgasqHTDHA.3636 (AT) tk2msftngp13 (DOT) phx.gbl...
Hi,

I have a question:

I have a DTS package with two tasks:
1. A Copy SQL Server Object Task: to copy a table object between two
database servers
2. A Execute SQL Task: to delete all rows in the table previously
copied

This is a database used by a web application, and there might be inserts
into the table between these two steps.
How can I garantee that the rows that are deleted in step 2 are only
those
copied in step 1, and none that are newly inserted?
I've have read about the transaction isolation level that I can define
in
the DTS package, namely about
"Repeatable Read. You are guaranteed not to see any changes made by
other
transactions in values it has already read."
Does this work in my case?

Thanks for your help
Rafaela







Reply With Quote
  #4  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Isolation level - 07-18-2003 , 05:07 AM



Give it a PK then. an integer with identity will do. Without a PK or unique
constraint you will struggle to identify a record.

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"RKAzinhal" <rafaelaka (AT) hotmail (DOT) com> wrote

Quote:
The problem is, the table has no PK, because it's a log table...
Are there other suggestions?

Thanks, Rafaela

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote in message
news:e$koK3JTDHA.2252 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
The problem here being that the transfer is one transaction and the
delete
another.

You could Pump the records over (You do not need to recreate the table
everytime surely)
You could then have a linked server back to the source that says delete
from
source where the record PK = ones I just copied over.



--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"RKAzinhal" <rafaelaka (AT) hotmail (DOT) com> wrote in message
news:#jgasqHTDHA.3636 (AT) tk2msftngp13 (DOT) phx.gbl...
Hi,

I have a question:

I have a DTS package with two tasks:
1. A Copy SQL Server Object Task: to copy a table object between
two
database servers
2. A Execute SQL Task: to delete all rows in the table previously
copied

This is a database used by a web application, and there might be
inserts
into the table between these two steps.
How can I garantee that the rows that are deleted in step 2 are only
those
copied in step 1, and none that are newly inserted?
I've have read about the transaction isolation level that I can define
in
the DTS package, namely about
"Repeatable Read. You are guaranteed not to see any changes made by
other
transactions in values it has already read."
Does this work in my case?

Thanks for your help
Rafaela









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.