I'm trying to dump a Sql Server 2005 table's contents into an Excel file.
From a "cmd" prompt, I'm trying the following command:
I'm getting a list of errors from the BCP command:
Oddly, when running this command using the "exec xp_cmdshell" line, I get a bunch of different errors returned from SSMS:
The "WebsiteNames" table does exist on the database ("Websites"), and it is a local database that I'm running on my local Sql Server installation. My machine is on a domain and I have local machine admin rights, as well as the local machines "sa" account (if that makes a difference versus Trusted Authentication).
Anyone have any ideas?
From a "cmd" prompt, I'm trying the following command:
Code:
bcp "USE Websites; SELECT * FROM WebsiteNames" queryout "C:\XLS\names.xls" -c -CRAW -T
I'm getting a list of errors from the BCP command:
Code:
SQLState = 42S02, NativeError = 208
Error = [Microsoft][SQL Native Client][SQL Server]Invalid object name 'WebsiteNames'.
SQLState = 42000, NativeError = 8180
Error = [Microsoft][SQL Native Client][SQL Server]Statement(s) could not be prepared.
Oddly, when running this command using the "exec xp_cmdshell" line, I get a bunch of different errors returned from SSMS:
Code:
NULL
Starting copy...
SQLState = HY000, NativeError = 0
Error = [Microsoft][SQL Native Client]Unable to resolve column level collations
SQLState = 01000, NativeError = 5701
Warning = [Microsoft][SQL Native Client][SQL Server]Changed database context to 'WebsiteNames'.
NULL
BCP copy out failed
NULL
The "WebsiteNames" table does exist on the database ("Websites"), and it is a local database that I'm running on my local Sql Server installation. My machine is on a domain and I have local machine admin rights, as well as the local machines "sa" account (if that makes a difference versus Trusted Authentication).
Anyone have any ideas?