dbTalk Databases Forums  

Transaction Issue

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


Discuss Transaction Issue in the microsoft.public.sqlserver.dts forum.



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

Default Transaction Issue - 05-15-2006 , 01:36 AM






Hi,

I want to execute a DTS in VB and found that there are few ways to do that:
1. Create the DTS and schedule the package and use msdb..sp_start_job to
execute the DTS
2. Use DTS.Package2 LoadFromSQLServer
3. (I havn't try this)
Use DTS.Package2, DTS.Task to create the task from a dts file

for method 1, since my VB connection use application role and can't access
the msdb..sp_start_job unless another connection is used. Or is there a way
to temporary grant access right to access msdb..sp_start_job?

for method 2, this seems work however the connection cannot use the current
VB connection. The VB connection and the DTS LoadFromSQLServer are two
different connection and result in transaction issue. Is there a way to use
the same connection for VB and DTS?

for method 3, I havn't try it, will this method have the same transaction
issue in method 2?

Thanks in advance!
Martin



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

Default Re: Transaction Issue - 05-15-2006 , 04:30 AM






Hello Atenza,

#1 If you are using application roles then #1 is out. #1 is not really
what I would do anyway as I like to have Agent fire jobs and only Agent.
Not my apps.

#2 In what way do you want to use your current VB Connection? A DTS package
is a unit of work that you Execute(). It goes off and does its thing. Sure
you can change some stuff in there with VB. I am not sure what you want
to do here.

#3. I am not sure what you want to do in this example and because of this
#2 is still my favourite.


Thanks

Allan

Quote:
Hi,

I want to execute a DTS in VB and found that there are few ways to do
that:
1. Create the DTS and schedule the package and use msdb..sp_start_job
to
execute the DTS
2. Use DTS.Package2 LoadFromSQLServer
3. (I havn't try this)
Use DTS.Package2, DTS.Task to create the task from a dts file
for method 1, since my VB connection use application role and can't
access the msdb..sp_start_job unless another connection is used. Or is
there a way to temporary grant access right to access
msdb..sp_start_job?

for method 2, this seems work however the connection cannot use the
current VB connection. The VB connection and the DTS LoadFromSQLServer
are two different connection and result in transaction issue. Is there
a way to use the same connection for VB and DTS?

for method 3, I havn't try it, will this method have the same
transaction issue in method 2?

Thanks in advance!
Martin



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

Default Re: Transaction Issue - 05-15-2006 , 09:16 PM



Allan, thanks for your advice, I've idea how to solve the issue. Thanks


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

Quote:
Hello Atenza,

#1 If you are using application roles then #1 is out. #1 is not really
what I would do anyway as I like to have Agent fire jobs and only Agent.
Not my apps.

#2 In what way do you want to use your current VB Connection? A DTS
package is a unit of work that you Execute(). It goes off and does its
thing. Sure you can change some stuff in there with VB. I am not sure
what you want to do here.

#3. I am not sure what you want to do in this example and because of this
#2 is still my favourite.


Thanks

Allan

Hi,

I want to execute a DTS in VB and found that there are few ways to do
that:
1. Create the DTS and schedule the package and use msdb..sp_start_job
to
execute the DTS
2. Use DTS.Package2 LoadFromSQLServer
3. (I havn't try this)
Use DTS.Package2, DTS.Task to create the task from a dts file
for method 1, since my VB connection use application role and can't
access the msdb..sp_start_job unless another connection is used. Or is
there a way to temporary grant access right to access
msdb..sp_start_job?

for method 2, this seems work however the connection cannot use the
current VB connection. The VB connection and the DTS LoadFromSQLServer
are two different connection and result in transaction issue. Is there
a way to use the same connection for VB and DTS?

for method 3, I havn't try it, will this method have the same
transaction issue in method 2?

Thanks in advance!
Martin





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.