Solved

run DTS Package in Ms SQL Query Analyzer

Posted on 2003-11-02
4
1,086 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Creating and Managing Databases with phpMyAdmin in cPanel.
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…

816 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

12 Experts available now in Live!

Get 1:1 Help Now