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] {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] {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.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] {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>...
> 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] {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
-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>...
> > 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] {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

没有评论:

发表评论