dbTalk Databases Forums  

Controlling when DTS issues commit

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


Discuss Controlling when DTS issues commit in the microsoft.public.sqlserver.dts forum.



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

Default Controlling when DTS issues commit - 08-11-2003 , 12:31 AM






I have some Views created in our SQL Server DB that use a
linked server to fetch data from Tables in an Oracle
database. I have built a very simple DTS packaged with
some Execute SQL steps to copy the Oracle data to SQL
Server tables. Each step just does an "Insert into select
*" SQL. Now when I run the package, if the second step
fails (say because of an SQL error), data from the first
step is still committed in the SQL Server table.

I have tried all combinations of package transaction
options (ie. Use transactions on and off, commit on
successful package completion on and off) all to no
avail. Data from first step is always committed. All I
can think of now is to put all the SQL statements in one
step and put explicit 'begin transaction' & 'commit
transaction' statements in. Is there no other way?

The MS DTC service is running on the server.

Thanks for any help.

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

Default Re: Controlling when DTS issues commit - 08-11-2003 , 01:32 AM






Have you said

Workflow Properties for each task

"Join transaction if present"
"Rollback transaction on Failure"



--

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



"Royce Lithgo" <Royce.Lithgo (AT) sg (DOT) standardchartered.com> wrote

Quote:
I have some Views created in our SQL Server DB that use a
linked server to fetch data from Tables in an Oracle
database. I have built a very simple DTS packaged with
some Execute SQL steps to copy the Oracle data to SQL
Server tables. Each step just does an "Insert into select
*" SQL. Now when I run the package, if the second step
fails (say because of an SQL error), data from the first
step is still committed in the SQL Server table.

I have tried all combinations of package transaction
options (ie. Use transactions on and off, commit on
successful package completion on and off) all to no
avail. Data from first step is always committed. All I
can think of now is to put all the SQL statements in one
step and put explicit 'begin transaction' & 'commit
transaction' statements in. Is there no other way?

The MS DTC service is running on the server.

Thanks for any help.



Reply With Quote
  #3  
Old   
Royce Lithgo
 
Posts: n/a

Default Re: Controlling when DTS issues commit - 08-11-2003 , 02:38 AM



I put all 3 statements in one step and tried again, still
not working. Then I put 'begin transaction' at the start
of the SQL and got the following error:

The operation could not be performed because the OLE DB
provider 'MSDAORA' was unable to begin a distributed
transaction. So now I think I've found the actual cause
of the problem. I'm not sure why this is happening though.

Quote:
-----Original Message-----
Have you said

Workflow Properties for each task

"Join transaction if present"
"Rollback transaction on Failure"



--

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



"Royce Lithgo" <Royce.Lithgo (AT) sg (DOT) standardchartered.com
wrote in message
news:036c01c35fc9$c823cb00$a601280a (AT) phx (DOT) gbl...
I have some Views created in our SQL Server DB that use
a
linked server to fetch data from Tables in an Oracle
database. I have built a very simple DTS packaged with
some Execute SQL steps to copy the Oracle data to SQL
Server tables. Each step just does an "Insert into
select
*" SQL. Now when I run the package, if the second step
fails (say because of an SQL error), data from the first
step is still committed in the SQL Server table.

I have tried all combinations of package transaction
options (ie. Use transactions on and off, commit on
successful package completion on and off) all to no
avail. Data from first step is always committed. All I
can think of now is to put all the SQL statements in one
step and put explicit 'begin transaction' & 'commit
transaction' statements in. Is there no other way?

The MS DTC service is running on the server.

Thanks for any help.


.


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

Default Re: Controlling when DTS issues commit - 08-11-2003 , 02:54 AM



Not all the drivers support being in a distrib transaction.
You did say MSDTC was started ?

--

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



"Royce Lithgo" <royce (AT) roycelithgo (DOT) com> wrote

Quote:
I put all 3 statements in one step and tried again, still
not working. Then I put 'begin transaction' at the start
of the SQL and got the following error:

The operation could not be performed because the OLE DB
provider 'MSDAORA' was unable to begin a distributed
transaction. So now I think I've found the actual cause
of the problem. I'm not sure why this is happening though.

-----Original Message-----
Have you said

Workflow Properties for each task

"Join transaction if present"
"Rollback transaction on Failure"



--

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



"Royce Lithgo" <Royce.Lithgo (AT) sg (DOT) standardchartered.com
wrote in message
news:036c01c35fc9$c823cb00$a601280a (AT) phx (DOT) gbl...
I have some Views created in our SQL Server DB that use
a
linked server to fetch data from Tables in an Oracle
database. I have built a very simple DTS packaged with
some Execute SQL steps to copy the Oracle data to SQL
Server tables. Each step just does an "Insert into
select
*" SQL. Now when I run the package, if the second step
fails (say because of an SQL error), data from the first
step is still committed in the SQL Server table.

I have tried all combinations of package transaction
options (ie. Use transactions on and off, commit on
successful package completion on and off) all to no
avail. Data from first step is always committed. All I
can think of now is to put all the SQL statements in one
step and put explicit 'begin transaction' & 'commit
transaction' statements in. Is there no other way?

The MS DTC service is running on the server.

Thanks for any help.


.




Reply With Quote
  #5  
Old   
Royce Lithgo
 
Posts: n/a

Default Re: Controlling when DTS issues commit - 08-11-2003 , 03:03 AM



The MSDTC service has been started and is running.
I have applied the registry change to the server as per
Books Online (OLE DB Provider for Oracle).
I also modified the Linked Server properties as Provider
Name was not MSDAORA.

None of these changes have made any difference. I still
get the same error message.

I believe that from reading Books Online, distributed
transactions should work with Oracle.

Royce.

Quote:
-----Original Message-----
Not all the drivers support being in a distrib
transaction.
You did say MSDTC was started ?

--

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



"Royce Lithgo" <royce (AT) roycelithgo (DOT) com> wrote in message
news:03fe01c35fdb$8a1feb10$a601280a (AT) phx (DOT) gbl...
I put all 3 statements in one step and tried again,
still
not working. Then I put 'begin transaction' at the
start
of the SQL and got the following error:

The operation could not be performed because the OLE DB
provider 'MSDAORA' was unable to begin a distributed
transaction. So now I think I've found the actual cause
of the problem. I'm not sure why this is happening
though.

-----Original Message-----
Have you said

Workflow Properties for each task

"Join transaction if present"
"Rollback transaction on Failure"



--

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



"Royce Lithgo" <Royce.Lithgo (AT) sg (DOT) standardchartered.com
wrote in message
news:036c01c35fc9$c823cb00$a601280a (AT) phx (DOT) gbl...
I have some Views created in our SQL Server DB that
use
a
linked server to fetch data from Tables in an Oracle
database. I have built a very simple DTS packaged
with
some Execute SQL steps to copy the Oracle data to SQL
Server tables. Each step just does an "Insert into
select
*" SQL. Now when I run the package, if the second
step
fails (say because of an SQL error), data from the
first
step is still committed in the SQL Server table.

I have tried all combinations of package transaction
options (ie. Use transactions on and off, commit on
successful package completion on and off) all to no
avail. Data from first step is always committed.
All I
can think of now is to put all the SQL statements in
one
step and put explicit 'begin transaction' & 'commit
transaction' statements in. Is there no other way?

The MS DTC service is running on the server.

Thanks for any help.


.



.


Reply With Quote
  #6  
Old   
Royce Lithgo
 
Posts: n/a

Default Re: Controlling when DTS issues commit - 08-11-2003 , 03:48 AM



I have set the workflow options for joining transaction if
present. Now when I run the package I get the following
error:

The Microsoft Distributed Transaction Coordinator (MSDTC
service) is not available.

But the service is running on the server?

Quote:
-----Original Message-----
Not all the drivers support being in a distrib
transaction.
You did say MSDTC was started ?

--

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



"Royce Lithgo" <royce (AT) roycelithgo (DOT) com> wrote in message
news:03fe01c35fdb$8a1feb10$a601280a (AT) phx (DOT) gbl...
I put all 3 statements in one step and tried again,
still
not working. Then I put 'begin transaction' at the
start
of the SQL and got the following error:

The operation could not be performed because the OLE DB
provider 'MSDAORA' was unable to begin a distributed
transaction. So now I think I've found the actual cause
of the problem. I'm not sure why this is happening
though.

-----Original Message-----
Have you said

Workflow Properties for each task

"Join transaction if present"
"Rollback transaction on Failure"



--

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



"Royce Lithgo" <Royce.Lithgo (AT) sg (DOT) standardchartered.com
wrote in message
news:036c01c35fc9$c823cb00$a601280a (AT) phx (DOT) gbl...
I have some Views created in our SQL Server DB that
use
a
linked server to fetch data from Tables in an Oracle
database. I have built a very simple DTS packaged
with
some Execute SQL steps to copy the Oracle data to SQL
Server tables. Each step just does an "Insert into
select
*" SQL. Now when I run the package, if the second
step
fails (say because of an SQL error), data from the
first
step is still committed in the SQL Server table.

I have tried all combinations of package transaction
options (ie. Use transactions on and off, commit on
successful package completion on and off) all to no
avail. Data from first step is always committed.
All I
can think of now is to put all the SQL statements in
one
step and put explicit 'begin transaction' & 'commit
transaction' statements in. Is there no other way?

The MS DTC service is running on the server.

Thanks for any help.


.



.


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

Default Re: Controlling when DTS issues commit - 08-11-2003 , 04:17 AM



Is Oracle set up tp allow remote access ?

--

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



"Royce Lithgo" <Royce.Lithgo (AT) sg (DOT) standardchartered.com> wrote

Quote:
I have set the workflow options for joining transaction if
present. Now when I run the package I get the following
error:

The Microsoft Distributed Transaction Coordinator (MSDTC
service) is not available.

But the service is running on the server?

-----Original Message-----
Not all the drivers support being in a distrib
transaction.
You did say MSDTC was started ?

--

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



"Royce Lithgo" <royce (AT) roycelithgo (DOT) com> wrote in message
news:03fe01c35fdb$8a1feb10$a601280a (AT) phx (DOT) gbl...
I put all 3 statements in one step and tried again,
still
not working. Then I put 'begin transaction' at the
start
of the SQL and got the following error:

The operation could not be performed because the OLE DB
provider 'MSDAORA' was unable to begin a distributed
transaction. So now I think I've found the actual cause
of the problem. I'm not sure why this is happening
though.

-----Original Message-----
Have you said

Workflow Properties for each task

"Join transaction if present"
"Rollback transaction on Failure"



--

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



"Royce Lithgo" <Royce.Lithgo (AT) sg (DOT) standardchartered.com
wrote in message
news:036c01c35fc9$c823cb00$a601280a (AT) phx (DOT) gbl...
I have some Views created in our SQL Server DB that
use
a
linked server to fetch data from Tables in an Oracle
database. I have built a very simple DTS packaged
with
some Execute SQL steps to copy the Oracle data to SQL
Server tables. Each step just does an "Insert into
select
*" SQL. Now when I run the package, if the second
step
fails (say because of an SQL error), data from the
first
step is still committed in the SQL Server table.

I have tried all combinations of package transaction
options (ie. Use transactions on and off, commit on
successful package completion on and off) all to no
avail. Data from first step is always committed.
All I
can think of now is to put all the SQL statements in
one
step and put explicit 'begin transaction' & 'commit
transaction' statements in. Is there no other way?

The MS DTC service is running on the server.

Thanks for any help.


.



.




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.