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.
Author |
Topic |
reenz
Starting Member
29 Posts |
Posted - 2006-04-10 : 03:47:32
|
Is it possible to do something like thatexec master..xp_cmdshell 'bcp "SELECT * FROM settings" queryout "http://1.2.3.4/test.txt" -c' ORexec master..xp_cmdshell 'bcp "SELECT * FROM settings" queryout "\\1.2.3.4\test.txt" -c' I am getting an errorError = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-10 : 04:37:37
|
not sure about the first option but 2nd option yes, but you need to have the necessary permissions on the location to create the file,also you might want to anticipate that if you get disconnected the task will failanother option is to save it locally then copy it over the target locationthe error tells you that it cannot find/create the file you specifiedHTH--------------------keeping it simple... |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-10 : 07:40:44
|
>>exec master..xp_cmdshell 'bcp "SELECT * FROM settings" queryout "\\1.2.3.4\test.txt" -c' You should use shared Folder or Driveexec master..xp_cmdshell 'bcp "SELECT * FROM settings" queryout "\\1.2.3.4\shared_folder\test.txt" -c' orFollow what jen suggestedMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|