Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Run DTS Package by SQL Query

Author  Topic 

prompratan
Starting Member

30 Posts

Posted - 2005-10-17 : 00:37:59
I want run dts package on sql query.

karuna
Aged Yak Warrior

582 Posts

Posted - 2005-10-17 : 01:02:52
Try this master..xp_cmdshell 'dtsrun /SServerName /UUserName /PPassword /NDtsName'

Thanks

Karunakaran
Go to Top of Page

prompratan
Starting Member

30 Posts

Posted - 2005-10-17 : 02:34:49
master..xp_cmdshell 'dtsrun /SServerName /UUserName /PPassword /NDtsName' is not work.

I use dtsrun on command dos is work. but use on DTS is not work.
Go to Top of Page

karuna
Aged Yak Warrior

582 Posts

Posted - 2005-10-17 : 02:42:22
You have to use dtsrun with xp_cmdshell extended stored procedure. xp_cmdshell will execute the dtsrun inside the command prompt.

Karunakaran
Go to Top of Page

prompratan
Starting Member

30 Posts

Posted - 2005-10-17 : 02:48:22
OK . I write this.
EXEC master..xp_cmdshell 'dtsrun /S intranet /U sa /P test /N "db_hr2 - Import Data C04110167"'
Run on query analyser
Go to Top of Page

prompratan
Starting Member

30 Posts

Posted - 2005-10-17 : 03:00:06
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSDataPumpTask_1
DTSRun OnError: DTSStep_DTSDataPumpTask_1, Error = -2147467259 (80004005)
Error string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Error source: Microsoft OLE DB Provider for SQL Server
Help file:
Help context: 0

Error Detail Records:

Error: -2147467259 (80004005); Provider Error: 17 (11)
Error string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Error source: Microsoft OLE DB Provider for SQL Server
Help file:
Help context: 0

DTSRun OnFinish: DTSStep_DTSDataPumpTask_1
DTSRun: Package execution complete.
NULL


***** This is error message from Query Analyzer. - -a
Go to Top of Page

karuna
Aged Yak Warrior

582 Posts

Posted - 2005-10-17 : 03:22:39
Looks like access issues...
try this

EXEC master..xp_cmdshell 'dtsrun /S intranet /E /N "db_hr2 - Import Data C04110167"'

Thanks

Karunakaran
Go to Top of Page

prompratan
Starting Member

30 Posts

Posted - 2005-10-17 : 03:47:39
This error,
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSDataPumpTask_1
DTSRun OnError: DTSStep_DTSDataPumpTask_1, Error = -2147467259 (80004005)
Error string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Error source: Microsoft OLE DB Provider for SQL Server
Help file:
Help context: 0

Error Detail Records:

Error: -2147467259 (80004005); Provider Error: 17 (11)
Error string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
Error source: Microsoft OLE DB Provider for SQL Server
Help file:
Help context: 0

DTSRun OnFinish: DTSStep_DTSDataPumpTask_1
DTSRun: Package execution complete.
NULL
Go to Top of Page
   

- Advertisement -