Solved

run DTS Package in Ms SQL Query Analyzer

Posted on 2003-11-02
4
1,083 Views
Last Modified: 2008-01-16
I'm trying to run DTS package to transform data from AS400/DB2 via Client Access ODBC ( Ms Windows 2000 Server, Ms SQL 2K, Client Access Driver 4.5)

but the result of testing has messed me up

because when i used this command via SQL Query Analyzer

exec master..xp_cmdshell 'DTSRun /S "MySVR" /U "sa" /N "dtsTEST" /G "{482209FD-0891-11D8-868C-00E0299B4BCF}" /A "G1":"8"="20031001" /W "0"'

--it doesn't work--


I wonder why??.. because it can be executed in MS-Dos prompt successfully.

if I type

DTSRun /S "MySVR" /U "sa" /N "dtsTEST" /G "{482209FD-0891-11D8-868C-00E0299B4BCF}" /A "G1":"8"="20031001" /W "0"

in the command line. The data comes from AS400 into MsSQL Server correctly.


If somebody can help, please give me some advices (urgent!!).

Thanks.
0
Comment
Question by:yukund
4 Comments
 
LVL 15

Accepted Solution

by:
namasi_navaretnam earned 63 total points
ID: 9666740
Try This,

declare @cmd varchar(1000)
select @cmd = 'DTSRun /S "MySVR" /U "sa" /N "dtsTEST" /G "{482209FD-0891-11D8-868C-00E0299B4BCF}" /A "G1":"8"="20031001" /W "0"'
select @cmd = ' echo ' + @cmd + ' > c:\mycmd.bat'
exec master..xp_cmdshell @cmd

exec master..xp_cmdshell 'c:\mycmd.bat'

HTH

Namasi Navaretnam
0
 
LVL 34

Assisted Solution

by:arbert
arbert earned 62 total points
ID: 9668406
Don't put the quotes around the parms--they aren't required....
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction: Often, when running a query with joins, the results show up "duplicates", and often, those duplicates can be "eliminated" in the results using DISTINCT, for example. Using DISTINCT is simple: just add it after the SELECT keyword, an…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now