Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
EXEC spproductionDB.dbo.sp_configure 'show advanced options', 1RECONFIGUREEXEC SPProductionDB.dbo.sp_configure 'xp_cmdshell', 1RECONFIGURE declare @mystr varchar(200)set @mystr = 'BCP "Select * from master..sysobjects" queryout c:\sysobjects.txt -T –S' + @@Servernameexec master..xp_cmdshell @Mystr--I am getting the following error/*Unknown argument 'ûmyserver\SQLEXPRESS' on command line.NULL--I do not know why I can not get BCP to work... Am I missing something?--THANKS!*/Success is 10% Intelligence, 70% Determination, and 22% Stupidity.\_/ _/ _/\_/ _/\_/ _/ _/- 881
khtan
In (Som, Ni, Yak)
17689 Posts
Posted - 2010-03-25 : 23:11:06
the dash "-" before the -S' + @@Servername is not really a dashsee
Nice catch... That's what I get for copying and pasting my code from the internet:)Success is 10% Intelligence, 70% Determination, and 22% Stupidity.\_/ _/ _/\_/ _/\_/ _/ _/- 881