473,216 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,216 software developers and data experts.

Executing a DTS Package using an ASP (VBScript)

I'm looking for an example of how to execute an existing DTS* package
from an
ASP (VB)script and would appreciate any and all response. *I don't
even
know if it's possible
Thanks
- Chuck Gatto
Dan Guzman Apr 27 2000, 12:00 am show options

Newsgroups: comp.databases.ms-sqlserver
From: "Dan Guzman" <DGuz...@nospamplease-earthlink.net&g*t; - Find
messages by this author
Date: 2000/04/27
Subject: Re: Executing a DTS Package using an ASP (VBScript) Script
Reply to Author | Forward | Print | Individual Message | Show original
| Report Abuse

This VBScript example loads and executes an existing DTS pac*kage from
SQL
Server.
Option Explicit
Const PackageName = "PackageName"
Const ServerName = "ServerName"
Const UserName = "UserName"
Const Password = "Password"
Dim DTSPk
Set DTSPk = CreateObject("dts.package")
DTSPk.LoadFromSQLServer ServerName, UserName ,Password
,,,,,*PackageName
DTSPk.Execute
If DTSPk.Steps(1).ExecutionResult = 0 Then
Response.Write "Package execution completed"
Else
Response.Write "Package execution failed"
End If
Set DTSPk = Nothing
You can also create the entire package from scratch from wit*hin your
asp and
execute it.
Hope this helps.

Chuck Gatto <cga...@anchorsystems.com> wrote in message
news:8e**********@slb7.atl.mindspring.net...
- Hide quoted text -
- Show quoted text -
I'm looking for an example of how to execute an existing D*TS package from
an ASP (VB)script and would appreciate any and all response.* I don't even know if it's possible
Thanks
- Chuck Gatto

Chuck Gatto May 1 2000, 12:00 am show options

Newsgroups: comp.databases.ms-sqlserver
From: "Chuck Gatto" <cga...@anchorsystems.com> - Find messages by this
author
Date: 2000/05/01
Subject: Re: Executing a DTS Package using an ASP (VBScript) Script
Reply to Author | Forward | Print | Individual Message | Show original
| Report Abuse

Below code works 100% in VB but the load fails in ASP. I g*et...
"Microsoft OLE DB Provider for SQL Server. Login failed for *user "\".
error.
I think the IIS (server a) is set for NT auth. and sql7 (on *server b)
as
well but I can't be sure.
Any idea what I should look for.
Thanks

"Dan Guzman" <DGuz...@nospamplease-earthlink.net> wrote in m*essage
news:sg***********@corp.supernews.com...
- Hide quoted text -
- Show quoted text -
This VBScript example loads and executes an existing DTS p*ackage from SQL Server. Option Explicit
Const PackageName = "PackageName"
Const ServerName = "ServerName"
Const UserName = "UserName"
Const Password = "Password"
Dim DTSPk
Set DTSPk = CreateObject("dts.package")
DTSPk.LoadFromSQLServer ServerName, UserName ,Password ,,,*,,PackageName DTSPk.Execute
If DTSPk.Steps(1).ExecutionResult = 0 Then
Response.Write "Package execution completed"
Else
Response.Write "Package execution failed"
End If
Set DTSPk = Nothing
You can also create the entire package from scratch from w*ithin your asp
and execute it.
Hope this helps.
Chuck Gatto <cga...@anchorsystems.com> wrote in message
news:8e**********@slb7.atl.mindspring.net...
I'm looking for an example of how to execute an existing* DTS package
from
an
ASP (VB)script and would appreciate any and all respons*e. I
don't even know if it's possible
Thanks
- Chuck Gatto
Dan Guzman May 1 2000, 12:00 am show options

Newsgroups: comp.databases.ms-sqlserver
From: "Dan Guzman" <DGuz...@nospamplease-earthlink.net&g*t; - Find
messages by this author
Date: 2000/05/01
Subject: Re: Executing a DTS Package using an ASP (VBScript) Script
Reply to Author | Forward | Print | Individual Message | Show original
| Report Abuse

You can specify a trusted connection with flag 256 instead o*f
username and
password. For example:
DTSPk.LoadFromSQLServer ServerName, , , 256,,,,PackageNa*me
Assuming this is an intranet application running under NT 4.*0 and you
want
to execute the package under the invoking user's account, yo*u can do
this as
follows:
Specify 'clear text' for the IIS Directory Security
auth*entication
Remove 'Everyone' from the access list on the files (req*uires
NTFS) and
grant permissions to the users
Grant logins access to the database server
With this method, users must enter their Domain\UserName and* password
when
prompted.
NT authentication presents a challenge when multiple servers* are
involved
because NT 4.0 does not support delegation. See
http://msdn.microsoft.com/workshop/s...e/security.asp for
details.
I understand Windows 2000 provides delegation capabilities b*ut this
can be a
bit tricky to implement.
BTW, if your DTS package does not access SQL Server, you can* save it
to a
file and use the LoadFromStorageFile method instead.
Hope this helps.
If you need to use
Chuck Gatto <cga...@anchorsystems.com> wrote in message
news:8e**********@slb7.atl.mindspring.net...
- Hide quoted text -
- Show quoted text -
Below code works 100% in VB but the load fails in ASP. I* get...
"Microsoft OLE DB Provider for SQL Server. Login failed fo*r user "\".
error. I think the IIS (server a) is set for NT auth. and sql7 (o*n server b) as well but I can't be sure.
Any idea what I should look for.
Thanks

Chuck Gatto May 6 2000, 12:00 am show options

Newsgroups: comp.databases.ms-sqlserver
From: "Chuck Gatto" <cga...@anchorsystems.com> - Find messages by this
author
Date: 2000/05/06
Subject: Re: Executing a DTS Package using an ASP (VBScript) Script
Reply to Author | Forward | Print | Individual Message | Show original
| Report Abuse

Hey Dan
Thanks again. I really appreciate your input and help.
I actually solved the problem by calling dtsrun...
I apologize for the delay getting back w/you but thee recent* virus
atack
sidetracked me.
Thanks again.
"Dan Guzman" <DGuz...@nospamplease-earthlink.net> wrote in m*essage
news:sg***********@corp.supernews.com...
- Hide quoted text -
- Show quoted text -
You can specify a trusted connection with flag 256 instead* of username and password. For example: DTSPk.LoadFromSQLServer ServerName, , , 256,,,,Package*Name
Assuming this is an intranet application running under NT *4.0 and you want to execute the package under the invoking user's account, *you can do this
as follows:
Specify 'clear text' for the IIS Directory Security au*thentication Remove 'Everyone' from the access list on the files (r*equires NTFS)
and grant permissions to the users
Grant logins access to the database server
With this method, users must enter their Domain\UserName a*nd password when prompted.
NT authentication presents a challenge when multiple serve*rs are involved because NT 4.0 does not support delegation. See
http://msdn.microsoft.com/workshop/s...e/security.asp for details. I understand Windows 2000 provides delegation capabilities* but this can be
a bit tricky to implement.
BTW, if your DTS package does not access SQL Server, you c*an save it to a file and use the LoadFromStorageFile method instead.
Hope this helps.
If you need to use
Chuck Gatto <cga...@anchorsystems.com> wrote in message
news:8e**********@slb7.atl.mindspring.net...
Below code works 100% in VB but the load fails in ASP. * I get...
"Microsoft OLE DB Provider for SQL Server. Login failed *for user "\". error.
I think the IIS (server a) is set for NT auth. and sql7 *(on

server b) as well but I can't be sure.
Any idea what I should look for.
Thanks


chris.duni...@agwsha.nhs.uk Jan 31, 10:05 am show options

Newsgroups: comp.databases.ms-sqlserver
From: chris.duni...@agwsha.nhs.uk - Find messages by this author
Date: 31 Jan 2005 10:05:00 -0800
Subject: Re: Executing a DTS Package using an ASP (VBScript) Script
Reply | Reply to Author | Forward | Print | Individual Message | Show
original | Report Abuse

Hi,
I've tried adding this function to my ASP pages and get the *following

error message;
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object: 'DTS.Package'
/asp/pages/dts.asp, line 21
Does anyone have any idea what I need to fix to get the DTS *to work?
I'm v. new to SQL Server and ASP so any help would be apprec*iated.
Many thanks,
Chris Dunigan

Jul 23 '05 #1
4 12625
<ch***********@agwsha.nhs.uk> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
I'm looking for an example of how to execute an existing DTS* package
from an
ASP (VB)script and would appreciate any and all response. *I don't
even
know if it's possible
Thanks
- Chuck Gatto

http://www.google.co.uk/search?hl=en...vbscript&meta=

Your package.
It works OK if you try and run it from Enterprise Manager on your machine?

You tried a real user and password in those fields when you tried that
method?
This would be equal to the user you're logged on as?

--
Regards,
Andy O'Neill
Jul 23 '05 #2


Hi Andy,

Yes the DTS Package works fine when I run it from Enterprise Manager;
and I have used the correct server name, username, password and
packagename.

Having done some more digging into this error I found a site that told
me it could be something to so with the software installed on the PC on
which the database resides.
I think I might need to ensure that dtspkg.dll is correctly installed
(along with a host of other dll and rll's).
As I can't get hold of our IT guys today I haven't been able to see if
this solves my problem.

Does this sound like it may fix the problem??

Regards,
Chris

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3

"Chris Dunigan" <ch***********@agwsha.nhs.uk> wrote in message
news:41**********@127.0.0.1...


Hi Andy,

Yes the DTS Package works fine when I run it from Enterprise Manager;
and I have used the correct server name, username, password and
packagename.

Having done some more digging into this error I found a site that told
me it could be something to so with the software installed on the PC on
which the database resides.
I think I might need to ensure that dtspkg.dll is correctly installed
(along with a host of other dll and rll's).
As I can't get hold of our IT guys today I haven't been able to see if
this solves my problem.

Does this sound like it may fix the problem??

Regards,
Chris

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


These links might help:

http://www.sqldts.com/default.aspx?207
http://support.microsoft.com/default...b;en-us;252987
http://support.microsoft.com/default...b;en-us;323685
http://support.microsoft.com/default...b;en-us;282463

Simon
Jul 23 '05 #4
"Chris Dunigan" <ch***********@agwsha.nhs.uk> wrote in message
news:41**********@127.0.0.1...
Hi Andy,

Yes the DTS Package works fine when I run it from Enterprise Manager;
and I have used the correct server name, username, password and
packagename.

Having done some more digging into this error I found a site that told
me it could be something to so with the software installed on the PC on
which the database resides.
I think I might need to ensure that dtspkg.dll is correctly installed
(along with a host of other dll and rll's).
As I can't get hold of our IT guys today I haven't been able to see if
this solves my problem.

Does this sound like it may fix the problem??


If no dts package works when run from a job on the server.
Quite frankly, I'm confused by your huge initial post as to which technique
you're trying and what's going on.
I'm wondering if this is running and owned by a user can run the dts package
OK on the server using whichever of the alternatives you posted you're
currently trying.

Try this with the package if it's vbscript using any activex.
Open DTS Designer, right-click the task, select Workflow, then Workflow

Properties. On the Options tab, check "Execute on main package thread"
--
Regards,
Andy O'Neill
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nick Coghlan | last post by:
Anyone playing with the CPython interpreter's new command line switch might have noticed that it only works with top-level modules (i.e. scripts that are directly on sys.path). If the script is...
15
by: Nick Coghlan | last post by:
Python 2.4's -m command line switch only works for modules directly on sys.path. Trying to use it with modules inside packages will fail with a "Module not found" error. This PEP aims to fix that...
1
by: Valentina Boycheva | last post by:
Thanks for the reply. I already have "Learning Python" from Mark Lutz and David Ascher, which covers 2.3 (I am in 2.4). However, it seems like heavy artillery to me. What I want is, for instance,...
0
by: Grant | last post by:
Hi, Could any body tell me what is the problem? I wrote a DTS application which will download a large file (about 100M) and bulk insert many records into the database (about 300'000 each time),...
1
by: Jennifer | last post by:
I've created a DTS package and now I need to distribute it to different servers. I've been looking for a way to automatically/programatically create a DTS package, but have not found anything...
1
by: Al-Pacino | last post by:
Hello All, I am am having a strange problem. I am trying to execute a DTS package from VB .NET (.aspx) page. The DTS package takes 21 minutes to execute. When the aspx page sends a command to...
0
by: blueblueblue | last post by:
Hi, I am trying to execute my dts package from sql using command shell as exec master..xp_cmdshell 'dtsrun /Sfiutopiadb /Usa /P /NBulktest' The package works perfectly in enterprise...
1
by: Airtech | last post by:
I am developing a database in Access 2002/2003 for use in Configuration Management. The application has reach the point where users of my application need to execute scripts in various formats. I...
2
by: Carlton Kirby | last post by:
I need to execute a job on a SQL Express 2005 instance (no SQLAgent). The job will be executed manually by a user, so it doesn't need to be scheduled to run automatically. I thought I could...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.