View Single Post
Old 02-02-2010, 01:57 PM   #11
TargetIT
CrackBerry Addict
 
Join Date: Jan 2008
Model: 9700
PIN: N/A
Carrier: Rogers
Posts: 709
Default

osql isn't great for outputing - if you use bcp, you'll find the format much easier to deal with. With the -T flag, you can use windows credentials (assuming you've set the correct permissions in SQL Manager).

Here's one I use to capture out of network BBs (I created a view in SQL Manager):

Code:
bcp "BESMgmt.dbo.OutOfNetworkBBsWithNulls" out "%~dp0BBOutput.txt" -c -t, -S "ServerName\BESMgmt" -T

Last edited by TargetIT; 02-02-2010 at 02:02 PM..
Offline   Reply With Quote