Hey Dan,


Running a DTS via CF is easily performed...


<!--- get the server name of the SQL box --->
<cfquery name="qServerName" datasource="#attributes.datasource#">
      exec spSQLserverName
</cfquery>


<!--- (spSQLserverName is a simple select @@servername function) --->

<cfquery name="qDTSrun" datasource="#attributes.datasource#">
  exec spDTSrun '#qServerName.output#','#attributes.package#'
</cfquery>


<!--- (spDTSrun is just a simple SP

DECLARE @execcommand varchar(100)
select @execcommand = '"dtsrun  /S'[EMAIL PROTECTED]' /UUSER /PPASSWORD
/N'[EMAIL PROTECTED]'"'
exec master..xp_cmdshell @execcommand

) --->

You can obviously pass in the Username & Password or you can keep them in
the SP (which is more secure, especially if you encrypt it.)

HTH

Neil



________________________________

From: Daniel O'Keefe [mailto:[EMAIL PROTECTED]
Sent: 14 January 2004 16:58
To: CF-Talk
Subject: RE: DTS from SP


I want to run it on demand from a CFM page, hence my problem.

-----Original Message-----
From: Shawn Regan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 9:49 AM
To: CF-Talk
Subject: RE: DTS from SP

Are you just trying to run a DTS package? If so you can use SQL
Agent to run
it or you can run it from a cfm page.

Shawn Regan

-----Original Message-----
From: Dan O'Keefe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 14, 2004 6:30 AM
To: CF-Talk
Subject: DTS from SP

I have combed the archives, and then net, and I think I have found
the
info I need to be able to do this.

I used the DTSRUNUI to create this string:
'DTSRun /S "TESTDATA" /U "sa" /P "password" /N "frDay01_upload" /G
"{F96F01E6-D82C-4ECF-899E-7DDADB1976C6}" /W "0" '

When I run it from the DOS prompt, it works. When I try to run it
with:
exec master..xp_cmdshell, both from QA and a SP, I get the following
error:

DTSRun:  Loading...
Error:  -2147024629 (8007010B); Provider Error:  0 (0)
   Error string:  The directory name is invalid.
   Error source:  Microsoft Data Transformation Services (DTS)
Package
   Help file:  sqldts80.hlp
   Help context:  713
NULL

naturally the most frustrating part is trying to find out more info
on
the error. I have looked in the mentioned .hlp file as well as MS &
google. Anybody have any ideas?

Dan
  _____
  _____
________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to