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 |
CSK
Constraint Violating Yak Guru
489 Posts |
Posted - 2006-06-16 : 01:37:51
|
Hello Gurus,bcp "Northwind.sa Orders" out "c:\KK Orders.txt" -c -q -U"sa" -P"sa"While running this script In command prompt the following error has cameSQLState = 08001, NativeError = 17Error = [Microsoft][ODBC SQL Server Driver][Shared Memory]SQL Server does not exist or access denied.SQLState = 01000, NativeError = 2Warning = [Microsoft][ODBC SQL Server Driver][Shared Memory]ConnectionOpen (Connect()).Any Thoughts...?ThanksKK |
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-06-16 : 01:45:19
|
don't you need to add -Sservername?--------------------keeping it simple... |
|
|
CSK
Constraint Violating Yak Guru
489 Posts |
Posted - 2006-06-16 : 01:50:38
|
but in syntax i cant find the server name can u please suggest me where i have to include the servername...?ThanksKK |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-06-16 : 02:15:36
|
It is in the BOLquote: bcp UtilityThe bcp utility copies data between an instance of Microsoft® SQL Server™ 2000 and a data file in a user-specified format.Syntaxbcp {[[database_name.][owner].]{table_name | view_name} | "query"} {in | out | queryout | format} data_file [-m max_errors] [-f format_file] [-e err_file] [-F first_row] [-L last_row] [-b batch_size] [-n] [-c] [-w] [-N] [-V (60 | 65 | 70)] [-6] [-q] [-C code_page] [-t field_term] [-r row_term] [-i input_file] [-o output_file] [-a packet_size] [-S server_name[\instance_name]] [-U login_id] [-P password] [-T] [-v] [-R] [-k] [-E] [-h "hint [,...n]"]
KH |
|
|
CSK
Constraint Violating Yak Guru
489 Posts |
Posted - 2006-06-16 : 02:17:24
|
Fine I will Apply Thanks |
|
|
CSK
Constraint Violating Yak Guru
489 Posts |
Posted - 2006-06-16 : 02:25:39
|
Again I faced the same problemthe Script is bcp "Northwind.sa Orders" out "c:\KK_orders.txt" -c -q -S"indrack01"-U"sa" -P"sa" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-06-16 : 08:33:11
|
Try this:bcp "Northwind.dbo.Orders" out c:\KK_orders.txt -Sindrack01 -c -q -Usa -PsaDon't use quotes unless absolutely needed, and make sure there is a space between parameters. Also, sa is not a user name in Northwind, all tables in Northwind are owned by dbo. |
|
|
|
|
|