Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Problem with xp_cmdshell

Author  Topic 

cms9651
Starting Member

28 Posts

Posted - 2013-01-23 : 06:04:10
Hi there, hope in your help.
I need to save in my hard disk the txt file generated with this code, can you help me?
thank you.

The error is:
quote:
“The configuration option ‘xp_cmdshell’ does not exist, or it may be an advanced option.”



EXEC sp_configure 'xp_cmdshell';

EXEC xp_cmdshell 'bcp "SELECT
*
FROM
tkt
" queryout "c:\temp\test.txt" -T -c -t,';

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2013-01-23 : 08:26:34
Try :
EXEC sp_configure ‘show advanced options’, 1
GO
RECONFIGURE
GO
EXEC sp_configure ‘xp_cmdshell’, 1
GO
RECONFIGURE



Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

cms9651
Starting Member

28 Posts

Posted - 2013-01-23 : 08:46:18
thank you!
Go to Top of Page
   

- Advertisement -