dbTalk Databases Forums  

execute osql within DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss execute osql within DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jim Trowbridge
 
Posts: n/a

Default execute osql within DTS - 08-12-2004 , 12:11 AM






If I execute an osql command from a dos/command prompt
like this
osql -S <servername> -E -i <inputSQLfile> -o <outputfile>
Quote:
logfile
with all valid files, etc, I will get the SQL output in
<outputfile> and an empty <logfile>.
If the osql command fails, ie <inputSQLfile> doesn't
exist, I get error message(s) in <logfile>.
Good so far.

If I execute the exact same command within a DTS package
using an Execute Process Task, then this part of the above
command "> <logfile>" is invalid, so I can't get these
error messages.

Is there a way to make this work ?


Reply With Quote
  #2  
Old   
Jacco Schalkwijk
 
Posts: n/a

Default Re: execute osql within DTS - 08-12-2004 , 06:34 AM






Why would you need osql in DTS for this? It's simpler to use a Data
Transform Task from a SQL Server connection (input file) to a text file
connection (output file).

--
Jacco Schalkwijk
SQL Server MVP


"Jim Trowbridge" <jtrowbridge (AT) adelaidebank (DOT) com.au> wrote

Quote:
If I execute an osql command from a dos/command prompt
like this
osql -S <servername> -E -i <inputSQLfile> -o <outputfile
logfile

with all valid files, etc, I will get the SQL output in
outputfile> and an empty <logfile>.
If the osql command fails, ie <inputSQLfile> doesn't
exist, I get error message(s) in <logfile>.
Good so far.

If I execute the exact same command within a DTS package
using an Execute Process Task, then this part of the above
command "> <logfile>" is invalid, so I can't get these
error messages.

Is there a way to make this work ?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.