Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

Export DTS As Unicode text

I need to take a select statement and export it in a DTS package as a unicode textfile
0
tbaseflug
Asked:
tbaseflug
1 Solution
 
SjoerdVerweijCommented:
Ok... what, specifically, are you having a problem with?
0
 
tbaseflugAuthor Commented:
It gets a little deep from here, but am using MS Baseline Security Analyzer to against a list of servers that are pulled from a SQL table and pumped into a text file - MBSA will only accept unicode format
0
 
cjm30305Commented:
Have you considered using

xp_CmdShell 'isqlw -E -s MYSQLSERVERINSTANCE -F U -i myquery.sql -o myoutput.txt"  

Your results (myoutput.txt) will be in UNICODE format by using the command line switch "-F" for ISQLW.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
tbaseflugAuthor Commented:
cjm30305 -

Where would I run this from?
0
 
cjm30305Commented:
It is an extended stored procedure, and a T-SQL command, so you use an 'Execute SQL Task' object.
0
 
tbaseflugAuthor Commented:
this may be a dumb question - but if I execute it from QA, how will it know where the location of the txt and sql files are - or do I have explicitly set the location \ path in the statement itself, e.g. c:\myoutput.txt, etc.?
0
 
cjm30305Commented:
You are correct.  You have to specify the path....
0
 
tbaseflugAuthor Commented:
cjm30305 -

I am trrying the following and the query seems to just sit and spin with no return

xp_CmdShell 'isqlw -E -s DATK02 -F U -i C:\MBSASamples\myquery.sql -o C:\MBSASamples\myoutput.txt'
0
 
davehilditchCommented:
Run the same command from the command prompt - you must have a dialog box or something popping up.

Go to Start Menu | Run

Type:

Cmd

Then a black box comes up - put the command in there.

isqlw -E -s DATK02 -F U -i C:\MBSASamples\myquery.sql -o C:\MBSASamples\myoutput.txt

And check your error messages.

Dave Hilditch.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now