dbTalk Databases Forums  

How to execute a DTS script

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


Discuss How to execute a DTS script in the microsoft.public.sqlserver.dts forum.



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

Default How to execute a DTS script - 10-03-2005 , 11:06 PM






I have a completed DTS package in my SQL server.

The examples talk about creating and executing a DTS from VB, but no
connection information is ever provided. I just want to execute the
already existing package, not create another.

I would REALLY like to execute the package, that’s already in my SQL
server, from an ASP. Does anyone have an example / documentation on
how to simply execute an already existing DTS from VB or an ASP?


--
bnhcomputing

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

Default Re: How to execute a DTS script - 10-04-2005 , 12:35 AM






Have a look here

Execution
(http://www.sqldts.com/default.aspx?104)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote


Quote:
I have a completed DTS package in my SQL server.

The examples talk about creating and executing a DTS from VB, but no
connection information is ever provided. I just want to execute the
already existing package, not create another.

I would REALLY like to execute the package, that's already in my SQL
server, from an ASP. Does anyone have an example / documentation on
how to simply execute an already existing DTS from VB or an ASP?


--
bnhcomputing


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

Default Re: How to execute a DTS script - 10-04-2005 , 03:24 PM



Good news, I am able to execute the DTS package from the ASP. The BAD NEWS,
none of the datapump tasks complete. The little loop that returns the error
codes, says evert datapump task failed, AND they are NOT executed in the
order of the work flow. The only thing that seems to execute is the active-x
components in the DTS. None of the Datapumps, and none of the ExecuteSQL
task work either.

If I run the package from the server via enterprise manager, it runs.

Any suggestions
--
bnhcomputing


"Allan Mitchell" wrote:

Quote:
Have a look here

Execution
(http://www.sqldts.com/default.aspx?104)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote in message
news:E94123C4-3880-4EC7-9221-DBE8B00368B3 (AT) microsoft (DOT) com:

I have a completed DTS package in my SQL server.

The examples talk about creating and executing a DTS from VB, but no
connection information is ever provided. I just want to execute the
already existing package, not create another.

I would REALLY like to execute the package, that's already in my SQL
server, from an ASP. Does anyone have an example / documentation on
how to simply execute an already existing DTS from VB or an ASP?


--
bnhcomputing



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

Default Re: How to execute a DTS script - 10-04-2005 , 04:00 PM



This is most probably a permissions thing.

Have a look here

Execute a package from Active Server Pages (ASP)
(http://www.sqldts.com/default.aspx?207)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote


Quote:
Good news, I am able to execute the DTS package from the ASP. The BAD
NEWS,
none of the datapump tasks complete. The little loop that returns the
error
codes, says evert datapump task failed, AND they are NOT executed in the
order of the work flow. The only thing that seems to execute is the
active-x
components in the DTS. None of the Datapumps, and none of the
ExecuteSQL
task work either.

If I run the package from the server via enterprise manager, it runs.

Any suggestions
--
bnhcomputing


"Allan Mitchell" wrote:


Have a look here

Execution
(http://www.sqldts.com/default.aspx?104)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote in
message
news:E94123C4-3880-4EC7-9221-DBE8B00368B3 (AT) microsoft (DOT) com:


I have a completed DTS package in my SQL server.

The examples talk about creating and executing a DTS from VB, but no
connection information is ever provided. I just want to execute the
already existing package, not create another.

I would REALLY like to execute the package, that's already in my SQL
server, from an ASP. Does anyone have an example / documentation on
how to simply execute an already existing DTS from VB or an ASP?


--
bnhcomputing





Reply With Quote
  #5  
Old   
bnhcomputing
 
Posts: n/a

Default Re: How to execute a DTS script - 10-04-2005 , 05:03 PM



Allan:

Thanks for the input and help thus far. I know I'm close, I just can't seem
to get over this last bump in the road.

This link leads to the same place as the one you sent before. Yes, I have
seen that sample. That is exactly what I implemented. It can do the
Active-X components of the DTS, but not the DataPump or Execute SQL, and this
is a security isse?

It would seem to me, that executing Ative-X should have more security not
less.

Anyway, the article doesn't layout, at least for a simpleton like me, what
the problem is. I used the sample code in the link, and it informed me that:

1. The DataPump steps fail.
2. The Execute SQL steps fail.
3. There is no additional information other than the fail message to tell
me why.
4. The DTS Package executes properly via Enterprise Manager on the Work
Station.
5. The DTS Package executes properly via Enterprise Manager on the Server.

I'm using sa as my user, and have supplied the correct password. What
possible security issue could it be?

still very confused.....


------------
bnhcomputing


"Allan Mitchell" wrote:

Quote:
This is most probably a permissions thing.

Have a look here

Execute a package from Active Server Pages (ASP)
(http://www.sqldts.com/default.aspx?207)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote in message
news:C63384EA-9D03-4257-BA66-39FE0AD0F9F6 (AT) microsoft (DOT) com:

Good news, I am able to execute the DTS package from the ASP. The BAD
NEWS,
none of the datapump tasks complete. The little loop that returns the
error
codes, says evert datapump task failed, AND they are NOT executed in the
order of the work flow. The only thing that seems to execute is the
active-x
components in the DTS. None of the Datapumps, and none of the
ExecuteSQL
task work either.

If I run the package from the server via enterprise manager, it runs.

Any suggestions
--
bnhcomputing


"Allan Mitchell" wrote:


Have a look here

Execution
(http://www.sqldts.com/default.aspx?104)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote in
message
news:E94123C4-3880-4EC7-9221-DBE8B00368B3 (AT) microsoft (DOT) com:


I have a completed DTS package in my SQL server.

The examples talk about creating and executing a DTS from VB, but no
connection information is ever provided. I just want to execute the
already existing package, not create another.

I would REALLY like to execute the package, that's already in my SQL
server, from an ASP. Does anyone have an example / documentation on
how to simply execute an already existing DTS from VB or an ASP?


--
bnhcomputing






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

Default Re: How to execute a DTS script - 10-04-2005 , 05:40 PM



An Active Script task does not in general connect to anything right?
This is where the issue more than likely is.

What is the error? Have the package log the execution


"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote


Quote:
Allan:

Thanks for the input and help thus far. I know I'm close, I just can't
seem
to get over this last bump in the road.

This link leads to the same place as the one you sent before. Yes, I
have
seen that sample. That is exactly what I implemented. It can do the
Active-X components of the DTS, but not the DataPump or Execute SQL, and
this
is a security isse?

It would seem to me, that executing Ative-X should have more security
not
less.

Anyway, the article doesn't layout, at least for a simpleton like me,
what
the problem is. I used the sample code in the link, and it informed me
that:

1. The DataPump steps fail.
2. The Execute SQL steps fail.
3. There is no additional information other than the fail message to
tell
me why.
4. The DTS Package executes properly via Enterprise Manager on the Work
Station.
5. The DTS Package executes properly via Enterprise Manager on the
Server.

I'm using sa as my user, and have supplied the correct password. What
possible security issue could it be?

still very confused.....


------------
bnhcomputing


"Allan Mitchell" wrote:


This is most probably a permissions thing.

Have a look here

Execute a package from Active Server Pages (ASP)
(http://www.sqldts.com/default.aspx?207)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote in
message
news:C63384EA-9D03-4257-BA66-39FE0AD0F9F6 (AT) microsoft (DOT) com:


Good news, I am able to execute the DTS package from the ASP. The
BAD
NEWS,
none of the datapump tasks complete. The little loop that returns
the
error
codes, says evert datapump task failed, AND they are NOT executed in
the
order of the work flow. The only thing that seems to execute is the
active-x
components in the DTS. None of the Datapumps, and none of the
ExecuteSQL
task work either.

If I run the package from the server via enterprise manager, it
runs.

Any suggestions
--
bnhcomputing


"Allan Mitchell" wrote:



Have a look here

Execution
(http://www.sqldts.com/default.aspx?104)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote in

message

news:E94123C4-3880-4EC7-9221-DBE8B00368B3 (AT) microsoft (DOT) com:



I have a completed DTS package in my SQL server.

The examples talk about creating and executing a DTS from VB,
but no
connection information is ever provided. I just want to execute
the
already existing package, not create another.

I would REALLY like to execute the package, that's already in my
SQL
server, from an ASP. Does anyone have an example /
documentation on
how to simply execute an already existing DTS from VB or an ASP?


--
bnhcomputing








Reply With Quote
  #7  
Old   
Dave
 
Posts: n/a

Default RE: How to execute a DTS script - 10-05-2005 , 09:16 AM



If you are using asp/iis.

Assuming you are using anonymous access, you already have these two accounts
set up: IWAM_<machine name>, IUSR_<machine name>

These two accounts need to have permission to your SQL server database.

David

"bnhcomputing" wrote:

Quote:
I have a completed DTS package in my SQL server.

The examples talk about creating and executing a DTS from VB, but no
connection information is ever provided. I just want to execute the
already existing package, not create another.

I would REALLY like to execute the package, that’s already in my SQL
server, from an ASP. Does anyone have an example / documentation on
how to simply execute an already existing DTS from VB or an ASP?


--
bnhcomputing

Reply With Quote
  #8  
Old   
bnhcomputing
 
Posts: n/a

Default Re: How to execute a DTS script - 10-05-2005 , 09:20 AM



Allan:

You are right, it's a security issue. One that I don't know how to resolve.

<<---- Code ---->>

Set oPkg = Server.CreateObject("DTS.Package")
oPkg.LoadFromSQLServer sServer, sUID, sPWD, iSecurity , sPkgPWD, "", "",
sPkgName

' Execute the Package
oPkg.Execute

<<---- Emd/Code ---->>


sUID is set to "sa", and I am using the proper sa password.

The log however, reports a different user. It appears to use the UID I
supply to load the package, but then use the connected/generic/internet user
to execute the package.

Granting additional rights to the connected/generic/internet USER is a
security issue. So how do I get it to "Execute" the package with the SA
username/password I am suppling?

--
bnhcomputing


"Allan Mitchell" wrote:

Quote:
An Active Script task does not in general connect to anything right?
This is where the issue more than likely is.

What is the error? Have the package log the execution


"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote in message
news:57A9CF64-623B-48CD-A8A5-8D10E978B436 (AT) microsoft (DOT) com:

Allan:

Thanks for the input and help thus far. I know I'm close, I just can't
seem
to get over this last bump in the road.

This link leads to the same place as the one you sent before. Yes, I
have
seen that sample. That is exactly what I implemented. It can do the
Active-X components of the DTS, but not the DataPump or Execute SQL, and
this
is a security isse?

It would seem to me, that executing Ative-X should have more security
not
less.

Anyway, the article doesn't layout, at least for a simpleton like me,
what
the problem is. I used the sample code in the link, and it informed me
that:

1. The DataPump steps fail.
2. The Execute SQL steps fail.
3. There is no additional information other than the fail message to
tell
me why.
4. The DTS Package executes properly via Enterprise Manager on the Work
Station.
5. The DTS Package executes properly via Enterprise Manager on the
Server.

I'm using sa as my user, and have supplied the correct password. What
possible security issue could it be?

still very confused.....


------------
bnhcomputing


"Allan Mitchell" wrote:


This is most probably a permissions thing.

Have a look here

Execute a package from Active Server Pages (ASP)
(http://www.sqldts.com/default.aspx?207)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote in
message
news:C63384EA-9D03-4257-BA66-39FE0AD0F9F6 (AT) microsoft (DOT) com:


Good news, I am able to execute the DTS package from the ASP. The
BAD
NEWS,
none of the datapump tasks complete. The little loop that returns
the
error
codes, says evert datapump task failed, AND they are NOT executed in
the
order of the work flow. The only thing that seems to execute is the
active-x
components in the DTS. None of the Datapumps, and none of the
ExecuteSQL
task work either.

If I run the package from the server via enterprise manager, it
runs.

Any suggestions
--
bnhcomputing


"Allan Mitchell" wrote:



Have a look here

Execution
(http://www.sqldts.com/default.aspx?104)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote in

message

news:E94123C4-3880-4EC7-9221-DBE8B00368B3 (AT) microsoft (DOT) com:



I have a completed DTS package in my SQL server.

The examples talk about creating and executing a DTS from VB,
but no
connection information is ever provided. I just want to execute
the
already existing package, not create another.

I would REALLY like to execute the package, that's already in my
SQL
server, from an ASP. Does anyone have an example /
documentation on
how to simply execute an already existing DTS from VB or an ASP?


--
bnhcomputing









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

Default Re: How to execute a DTS script - 10-05-2005 , 03:25 PM



Ok so the sUID and sPWD you supply here are ONLY to get you onto the SQL
Server to retrieve the package. Nothing more. In your Package there
are connections and it would appear these are set to Windows
authentication which means it is your IIS accounts that are being used
to validate the connections.

Allan



"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote


Quote:
Allan:

You are right, it's a security issue. One that I don't know how to
resolve.

---- Code ----

Set oPkg = Server.CreateObject("DTS.Package")
oPkg.LoadFromSQLServer sServer, sUID, sPWD, iSecurity , sPkgPWD, "", "",
sPkgName

' Execute the Package
oPkg.Execute

---- Emd/Code ----


sUID is set to "sa", and I am using the proper sa password.

The log however, reports a different user. It appears to use the UID I
supply to load the package, but then use the connected/generic/internet
user
to execute the package.

Granting additional rights to the connected/generic/internet USER is a
security issue. So how do I get it to "Execute" the package with the SA
username/password I am suppling?

--
bnhcomputing


"Allan Mitchell" wrote:


An Active Script task does not in general connect to anything right?
This is where the issue more than likely is.

What is the error? Have the package log the execution


"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote in
message
news:57A9CF64-623B-48CD-A8A5-8D10E978B436 (AT) microsoft (DOT) com:


Allan:

Thanks for the input and help thus far. I know I'm close, I just
can't
seem
to get over this last bump in the road.

This link leads to the same place as the one you sent before. Yes,
I
have
seen that sample. That is exactly what I implemented. It can do
the
Active-X components of the DTS, but not the DataPump or Execute SQL,
and
this
is a security isse?

It would seem to me, that executing Ative-X should have more
security
not
less.

Anyway, the article doesn't layout, at least for a simpleton like
me,
what
the problem is. I used the sample code in the link, and it informed
me
that:

1. The DataPump steps fail.
2. The Execute SQL steps fail.
3. There is no additional information other than the fail message
to
tell
me why.
4. The DTS Package executes properly via Enterprise Manager on the
Work
Station.
5. The DTS Package executes properly via Enterprise Manager on the
Server.

I'm using sa as my user, and have supplied the correct password.
What
possible security issue could it be?

still very confused.....


------------
bnhcomputing


"Allan Mitchell" wrote:



This is most probably a permissions thing.

Have a look here

Execute a package from Active Server Pages (ASP)
(http://www.sqldts.com/default.aspx?207)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote in

message

news:C63384EA-9D03-4257-BA66-39FE0AD0F9F6 (AT) microsoft (DOT) com:



Good news, I am able to execute the DTS package from the ASP.
The

BAD

NEWS,
none of the datapump tasks complete. The little loop that
returns

the

error
codes, says evert datapump task failed, AND they are NOT
executed in

the

order of the work flow. The only thing that seems to execute is
the
active-x
components in the DTS. None of the Datapumps, and none of the
ExecuteSQL
task work either.

If I run the package from the server via enterprise manager, it

runs.


Any suggestions
--
bnhcomputing


"Allan Mitchell" wrote:




Have a look here

Execution
(http://www.sqldts.com/default.aspx?104)


Allan

"bnhcomputing" <bnhcomputing (AT) discussions (DOT) microsoft.com> wrote
in


message


news:E94123C4-3880-4EC7-9221-DBE8B00368B3 (AT) microsoft (DOT) com:




I have a completed DTS package in my SQL server.

The examples talk about creating and executing a DTS from
VB,

but no

connection information is ever provided. I just want to
execute

the

already existing package, not create another.

I would REALLY like to execute the package, that's already
in my

SQL

server, from an ASP. Does anyone have an example /

documentation on

how to simply execute an already existing DTS from VB or an
ASP?


--
bnhcomputing











Reply With Quote
  #10  
Old   
bnhcomputing
 
Posts: n/a

Default RE: How to execute a DTS script - 10-05-2005 , 05:05 PM



I changed my methodology. I am using a stored procedure. Activate the
stored procedure from ASP. Stored Procedure activates DTS. Seems to get
around security issues.

--
bnhcomputing


"Dave" wrote:

Quote:
If you are using asp/iis.

Assuming you are using anonymous access, you already have these two accounts
set up: IWAM_<machine name>, IUSR_<machine name

These two accounts need to have permission to your SQL server database.

David

"bnhcomputing" wrote:

I have a completed DTS package in my SQL server.

The examples talk about creating and executing a DTS from VB, but no
connection information is ever provided. I just want to execute the
already existing package, not create another.

I would REALLY like to execute the package, that’s already in my SQL
server, from an ASP. Does anyone have an example / documentation on
how to simply execute an already existing DTS from VB or an ASP?


--
bnhcomputing

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.