-
xp_cmshell
I am trying to execute a query through xp_cmdshell. when i run it through command prompt, it works fine.
but when i run the same through xp_cmdshell, it says 0 rows affected.
i have been able to use xp_cmdshell successfully before.
here are the 2 statements. i am running on sql server 7.0, sp 3.
bcp "select * from pubs.dbo.authors" queryout c:\Test\test2.txt -c -q -Sservername -U"username" -P"123"
exec xp_cmdshell 'bcp "select * from pubs.dbo.authors" queryout "c:\\Test\test2.txt" -c -q -Sservername -U"username" -P"123"'
thanks!
Last edited by Ads; 01-27-2003 at 04:32 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|