Hi
When running the following on a customer system Iget an error. However
when I run it on my system it works fine. Any help would be
appreciated.
bcp MYDATABASE..MYTABLE in TABLE.dat -c -C RAW >>result.txt -Usa -P
It gives the following error:
usage: bcp [[database_name.]owner.]table_name[:slice_number] {in |
out} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n] [-c] [-t field_terminator] [-r row_terminator]
[-U username] [-P password] [-I interfaces_file] [-S server]
[-a display_charset] [-q datafile_charset] [-z language] [-v]
[-A packet size] [-J client character set]
[-T text or image size] [-E] [-g id_start_value] [-N] [-X]
[-M LabelName LabelValue] [-labeled]
[-K keytab_file] [-R remote_server_principal]
[-V [security_options]] [-Z security_mechanism] [-Q]
Syntax Error in '-C'.
Thanks
/Patrik
Hi,
What version of SQL Server/client is using from clients place. "-C"
parameter is not available in
versions before SQL 7.
Based on the error log I feel that the customer place they are using SQL
6.5. Please verify that.
Thanks
Hari
MCDBA
"Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
news:8d5c526d.0406240242.7aff6ec3@.posting.google.c om...
> Hi
> When running the following on a customer system Iget an error. However
> when I run it on my system it works fine. Any help would be
> appreciated.
> bcp MYDATABASE..MYTABLE in TABLE.dat -c -C RAW >>result.txt -Usa -P
> It gives the following error:
> usage: bcp [[database_name.]owner.]table_name[:slice_number] {in |
> out} datafile
> [-m maxerrors] [-f formatfile] [-e errfile]
> [-F firstrow] [-L lastrow] [-b batchsize]
> [-n] [-c] [-t field_terminator] [-r row_terminator]
> [-U username] [-P password] [-I interfaces_file] [-S server]
> [-a display_charset] [-q datafile_charset] [-z language] [-v]
> [-A packet size] [-J client character set]
> [-T text or image size] [-E] [-g id_start_value] [-N] [-X]
> [-M LabelName LabelValue] [-labeled]
> [-K keytab_file] [-R remote_server_principal]
> [-V [security_options]] [-Z security_mechanism] [-Q]
> Syntax Error in '-C'.
>
> Thanks
> /Patrik
|||Hi
I can not re-create this error! Posting the version of SQL Server you are
using may help as I don't recognise some of the options that are given
and -C is not one of them!!
I would also move the output redirection to the end of the line.
John
"Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
news:8d5c526d.0406240242.7aff6ec3@.posting.google.c om...
> Hi
> When running the following on a customer system Iget an error. However
> when I run it on my system it works fine. Any help would be
> appreciated.
> bcp MYDATABASE..MYTABLE in TABLE.dat -c -C RAW >>result.txt -Usa -P
> It gives the following error:
> usage: bcp [[database_name.]owner.]table_name[:slice_number] {in |
> out} datafile
> [-m maxerrors] [-f formatfile] [-e errfile]
> [-F firstrow] [-L lastrow] [-b batchsize]
> [-n] [-c] [-t field_terminator] [-r row_terminator]
> [-U username] [-P password] [-I interfaces_file] [-S server]
> [-a display_charset] [-q datafile_charset] [-z language] [-v]
> [-A packet size] [-J client character set]
> [-T text or image size] [-E] [-g id_start_value] [-N] [-X]
> [-M LabelName LabelValue] [-labeled]
> [-K keytab_file] [-R remote_server_principal]
> [-V [security_options]] [-Z security_mechanism] [-Q]
> Syntax Error in '-C'.
>
> Thanks
> /Patrik
|||Hi again and thanks for the replies.
The customer claims to have SQL Server 2000 with SP3. However I'm
thinking that they may have an old/other bcp installed which doesn't
recognize the -C option
(as we can see in the error msg, their bcp doesn't seem to support the
-C).
/Patrik
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message news:<O57OAvdWEHA.1164@.tk2msftngp13.phx.gbl>...[vbcol=seagreen]
> Hi
> I can not re-create this error! Posting the version of SQL Server you are
> using may help as I don't recognise some of the options that are given
> and -C is not one of them!!
> I would also move the output redirection to the end of the line.
> John
>
> "Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
> news:8d5c526d.0406240242.7aff6ec3@.posting.google.c om...
|||Hi
-C would be used for backward compatibility, therefore there should not be
any need to use it!!
You may try the command
where bcp.exe
And then check size/date/file versions
John
"Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
news:8d5c526d.0406280400.79dffaad@.posting.google.c om...
> Hi again and thanks for the replies.
> The customer claims to have SQL Server 2000 with SP3. However I'm
> thinking that they may have an old/other bcp installed which doesn't
> recognize the -C option
> (as we can see in the error msg, their bcp doesn't seem to support the
> -C).
> /Patrik
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:<O57OAvdWEHA.1164@.tk2msftngp13.phx.gbl>...[vbcol=seagreen]
are[vbcol=seagreen]
|||Hi
-C would be used for backward compatibility, therefore there should not be
any need to use it!!
You may try the command
where bcp.exe
And then check size/date/file versions
John
"Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
news:8d5c526d.0406280400.79dffaad@.posting.google.c om...
> Hi again and thanks for the replies.
> The customer claims to have SQL Server 2000 with SP3. However I'm
> thinking that they may have an old/other bcp installed which doesn't
> recognize the -C option
> (as we can see in the error msg, their bcp doesn't seem to support the
> -C).
> /Patrik
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:<O57OAvdWEHA.1164@.tk2msftngp13.phx.gbl>...[vbcol=seagreen]
are[vbcol=seagreen]
2012年3月6日星期二
bcp error, Syntax Error in '-C'
Hi
When running the following on a customer system Iget an error. However
when I run it on my system it works fine. Any help would be
appreciated.
bcp MYDATABASE..MYTABLE in TABLE.dat -c -C RAW >>result.txt -Usa -P
It gives the following error:
usage: bcp [[database_name.]owner.]table_name[:slice_number]
23;in |
out} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n] [-c] [-t field_terminator] [-r row_terminator]
[-U username] [-P password] [-I interfaces_file] [-S server]
[-a display_charset] [-q datafile_charset] [-z language] [-v
]
[-A packet size] [-J client character set]
[-T text or image size] [-E] [-g id_start_value] [-N] [-
X]
[-M LabelName LabelValue] [-labeled]
[-K keytab_file] [-R remote_server_principal]
[-V [security_options]] [-Z security_mechanism] [-Q]
Syntax Error in '-C'.
Thanks
/PatrikHi,
What version of SQL Server/client is using from clients place. "-C"
parameter is not available in
versions before SQL 7.
Based on the error log I feel that the customer place they are using SQL
6.5. Please verify that.
Thanks
Hari
MCDBA
"Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
news:8d5c526d.0406240242.7aff6ec3@.posting.google.com...
> Hi
> When running the following on a customer system Iget an error. However
> when I run it on my system it works fine. Any help would be
> appreciated.
> bcp MYDATABASE..MYTABLE in TABLE.dat -c -C RAW >>result.txt -Usa -P
> It gives the following error:
> usage: bcp [[database_name.]owner.]table_name[:slice_number] &
#123;in |
> out} datafile
> [-m maxerrors] [-f formatfile] [-e errfile]
> [-F firstrow] [-L lastrow] [-b batchsize]
> [-n] [-c] [-t field_terminator] [-r row_terminator]
> [-U username] [-P password] [-I interfaces_file] [-S serve
r]
> [-a display_charset] [-q datafile_charset] [-z language] [
-v]
> [-A packet size] [-J client character set]
> [-T text or image size] [-E] [-g id_start_value] [-N] [
;-X]
> [-M LabelName LabelValue] [-labeled]
> [-K keytab_file] [-R remote_server_principal]
> [-V [security_options]] [-Z security_mechanism] [-Q]
> Syntax Error in '-C'.
>
> Thanks
> /Patrik|||Hi
I can not re-create this error! Posting the version of SQL Server you are
using may help as I don't recognise some of the options that are given
and -C is not one of them!!
I would also move the output redirection to the end of the line.
John
"Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
news:8d5c526d.0406240242.7aff6ec3@.posting.google.com...
> Hi
> When running the following on a customer system Iget an error. However
> when I run it on my system it works fine. Any help would be
> appreciated.
> bcp MYDATABASE..MYTABLE in TABLE.dat -c -C RAW >>result.txt -Usa -P
> It gives the following error:
> usage: bcp [[database_name.]owner.]table_name[:slice_number] &
#123;in |
> out} datafile
> [-m maxerrors] [-f formatfile] [-e errfile]
> [-F firstrow] [-L lastrow] [-b batchsize]
> [-n] [-c] [-t field_terminator] [-r row_terminator]
> [-U username] [-P password] [-I interfaces_file] [-S serve
r]
> [-a display_charset] [-q datafile_charset] [-z language] [
-v]
> [-A packet size] [-J client character set]
> [-T text or image size] [-E] [-g id_start_value] [-N] [
;-X]
> [-M LabelName LabelValue] [-labeled]
> [-K keytab_file] [-R remote_server_principal]
> [-V [security_options]] [-Z security_mechanism] [-Q]
> Syntax Error in '-C'.
>
> Thanks
> /Patrik|||Hi again and thanks for the replies.
The customer claims to have SQL Server 2000 with SP3. However I'm
thinking that they may have an old/other bcp installed which doesn't
recognize the -C option
(as we can see in the error msg, their bcp doesn't seem to support the
-C).
/Patrik
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message news:<O57OAvdWEHA.1164@.tk2msftngp1
3.phx.gbl>...[vbcol=seagreen]
> Hi
> I can not re-create this error! Posting the version of SQL Server you are
> using may help as I don't recognise some of the options that are given
> and -C is not one of them!!
> I would also move the output redirection to the end of the line.
> John
>
> "Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
> news:8d5c526d.0406240242.7aff6ec3@.posting.google.com...|||Hi
-C would be used for backward compatibility, therefore there should not be
any need to use it!!
You may try the command
where bcp.exe
And then check size/date/file versions
John
"Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
news:8d5c526d.0406280400.79dffaad@.posting.google.com...
> Hi again and thanks for the replies.
> The customer claims to have SQL Server 2000 with SP3. However I'm
> thinking that they may have an old/other bcp installed which doesn't
> recognize the -C option
> (as we can see in the error msg, their bcp doesn't seem to support the
> -C).
> /Patrik
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:<O57OAvdWEHA.1164@.tk2msftngp13.phx.gbl>...[vbcol=seagreen]
are[vbcol=seagreen]|||The command you are running is not the SQL Server bcp.exe, but the Sybase bc
p.exe. To fix the problem, specify the full path to the SQL Server version.
If you are using xp_cmdshell you may have to put the bcp command into a .B
AT file.
Hope this helps,
Bill
P.S. Check out http://www.sqleditor.com for a great SQL Server explorer.
When running the following on a customer system Iget an error. However
when I run it on my system it works fine. Any help would be
appreciated.
bcp MYDATABASE..MYTABLE in TABLE.dat -c -C RAW >>result.txt -Usa -P
It gives the following error:
usage: bcp [[database_name.]owner.]table_name[:slice_number]
23;in |
out} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n] [-c] [-t field_terminator] [-r row_terminator]
[-U username] [-P password] [-I interfaces_file] [-S server]
[-a display_charset] [-q datafile_charset] [-z language] [-v
]
[-A packet size] [-J client character set]
[-T text or image size] [-E] [-g id_start_value] [-N] [-
X]
[-M LabelName LabelValue] [-labeled]
[-K keytab_file] [-R remote_server_principal]
[-V [security_options]] [-Z security_mechanism] [-Q]
Syntax Error in '-C'.
Thanks
/PatrikHi,
What version of SQL Server/client is using from clients place. "-C"
parameter is not available in
versions before SQL 7.
Based on the error log I feel that the customer place they are using SQL
6.5. Please verify that.
Thanks
Hari
MCDBA
"Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
news:8d5c526d.0406240242.7aff6ec3@.posting.google.com...
> Hi
> When running the following on a customer system Iget an error. However
> when I run it on my system it works fine. Any help would be
> appreciated.
> bcp MYDATABASE..MYTABLE in TABLE.dat -c -C RAW >>result.txt -Usa -P
> It gives the following error:
> usage: bcp [[database_name.]owner.]table_name[:slice_number] &
#123;in |
> out} datafile
> [-m maxerrors] [-f formatfile] [-e errfile]
> [-F firstrow] [-L lastrow] [-b batchsize]
> [-n] [-c] [-t field_terminator] [-r row_terminator]
> [-U username] [-P password] [-I interfaces_file] [-S serve
r]
> [-a display_charset] [-q datafile_charset] [-z language] [
-v]
> [-A packet size] [-J client character set]
> [-T text or image size] [-E] [-g id_start_value] [-N] [
;-X]
> [-M LabelName LabelValue] [-labeled]
> [-K keytab_file] [-R remote_server_principal]
> [-V [security_options]] [-Z security_mechanism] [-Q]
> Syntax Error in '-C'.
>
> Thanks
> /Patrik|||Hi
I can not re-create this error! Posting the version of SQL Server you are
using may help as I don't recognise some of the options that are given
and -C is not one of them!!
I would also move the output redirection to the end of the line.
John
"Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
news:8d5c526d.0406240242.7aff6ec3@.posting.google.com...
> Hi
> When running the following on a customer system Iget an error. However
> when I run it on my system it works fine. Any help would be
> appreciated.
> bcp MYDATABASE..MYTABLE in TABLE.dat -c -C RAW >>result.txt -Usa -P
> It gives the following error:
> usage: bcp [[database_name.]owner.]table_name[:slice_number] &
#123;in |
> out} datafile
> [-m maxerrors] [-f formatfile] [-e errfile]
> [-F firstrow] [-L lastrow] [-b batchsize]
> [-n] [-c] [-t field_terminator] [-r row_terminator]
> [-U username] [-P password] [-I interfaces_file] [-S serve
r]
> [-a display_charset] [-q datafile_charset] [-z language] [
-v]
> [-A packet size] [-J client character set]
> [-T text or image size] [-E] [-g id_start_value] [-N] [
;-X]
> [-M LabelName LabelValue] [-labeled]
> [-K keytab_file] [-R remote_server_principal]
> [-V [security_options]] [-Z security_mechanism] [-Q]
> Syntax Error in '-C'.
>
> Thanks
> /Patrik|||Hi again and thanks for the replies.
The customer claims to have SQL Server 2000 with SP3. However I'm
thinking that they may have an old/other bcp installed which doesn't
recognize the -C option
(as we can see in the error msg, their bcp doesn't seem to support the
-C).
/Patrik
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message news:<O57OAvdWEHA.1164@.tk2msftngp1
3.phx.gbl>...[vbcol=seagreen]
> Hi
> I can not re-create this error! Posting the version of SQL Server you are
> using may help as I don't recognise some of the options that are given
> and -C is not one of them!!
> I would also move the output redirection to the end of the line.
> John
>
> "Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
> news:8d5c526d.0406240242.7aff6ec3@.posting.google.com...|||Hi
-C would be used for backward compatibility, therefore there should not be
any need to use it!!
You may try the command
where bcp.exe
And then check size/date/file versions
John
"Patrik Johansson" <patrikmjohansson@.yahoo.se> wrote in message
news:8d5c526d.0406280400.79dffaad@.posting.google.com...
> Hi again and thanks for the replies.
> The customer claims to have SQL Server 2000 with SP3. However I'm
> thinking that they may have an old/other bcp installed which doesn't
> recognize the -C option
> (as we can see in the error msg, their bcp doesn't seem to support the
> -C).
> /Patrik
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:<O57OAvdWEHA.1164@.tk2msftngp13.phx.gbl>...[vbcol=seagreen]
are[vbcol=seagreen]|||The command you are running is not the SQL Server bcp.exe, but the Sybase bc
p.exe. To fix the problem, specify the full path to the SQL Server version.
If you are using xp_cmdshell you may have to put the bcp command into a .B
AT file.
Hope this helps,
Bill
P.S. Check out http://www.sqleditor.com for a great SQL Server explorer.
2012年2月18日星期六
BCP & odd charachters
Hi
When I BCP out some data from a database that contains german charachters ( in particular characters with hyphens & unlatts on them ), the letter appears as a square box when I open it in a text file.
I run BCP locally on the server that the database is on.
Any ideas what might be causing this? I have the local Regional settings of the server set to German but still no joy.
Any ideas?
Help!!
JWhat happens when you BCP the data back into a database? Sometimes certain products that we use to view files can not display none printable characters to they write out the 'box'. It does not mean that data is incorrect. You should create another test table and BCP the data into the new test table.
When I BCP out some data from a database that contains german charachters ( in particular characters with hyphens & unlatts on them ), the letter appears as a square box when I open it in a text file.
I run BCP locally on the server that the database is on.
Any ideas what might be causing this? I have the local Regional settings of the server set to German but still no joy.
Any ideas?
Help!!
JWhat happens when you BCP the data back into a database? Sometimes certain products that we use to view files can not display none printable characters to they write out the 'box'. It does not mean that data is incorrect. You should create another test table and BCP the data into the new test table.
订阅:
博文 (Atom)