2012年3月6日星期二

BCP error message.

First of all I'm brand new to SQL Server (fresh off 7 years of Sybase) and
this newsgroup so forgive me if I should have posted this question else where.
I'm trying to use bcp to output data from a table to a file but keep getting
the error, "An error occurred while trying to process the command line."
This is what I'm trying to execute throught he Command Prompt,
bcp 450_gilroy.dbo.temp_rim out "C:\Program Files\AutoMate\AutoMate
Downloads\output.txt" -T -c -Sqisdevsql1
I'm running this from our development server, which is not where SQL Server
lives, we have a dedicated SQL Server box, qisdevsql1.
What am I doing wrong?This works on my machine. Can you run bcp -v from a command window and see
what you get?
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"DaRock" <DaRock@.discussions.microsoft.com> wrote in message
news:81457C76-EC2B-468A-B8CF-290B396076BB@.microsoft.com...
> First of all I'm brand new to SQL Server (fresh off 7 years of Sybase) and
> this newsgroup so forgive me if I should have posted this question else
> where.
> I'm trying to use bcp to output data from a table to a file but keep
> getting
> the error, "An error occurred while trying to process the command line."
> This is what I'm trying to execute throught he Command Prompt,
> bcp 450_gilroy.dbo.temp_rim out "C:\Program Files\AutoMate\AutoMate
> Downloads\output.txt" -T -c -Sqisdevsql1
> I'm running this from our development server, which is not where SQL
> Server
> lives, we have a dedicated SQL Server box, qisdevsql1.
> What am I doing wrong?
>|||I get, BCP - Bulk Copy Program, some registration info and then Version
9.00.1399.06.
Troy
"Hilary Cotter" wrote:
> This works on my machine. Can you run bcp -v from a command window and see
> what you get?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "DaRock" <DaRock@.discussions.microsoft.com> wrote in message
> news:81457C76-EC2B-468A-B8CF-290B396076BB@.microsoft.com...
> > First of all I'm brand new to SQL Server (fresh off 7 years of Sybase) and
> > this newsgroup so forgive me if I should have posted this question else
> > where.
> >
> > I'm trying to use bcp to output data from a table to a file but keep
> > getting
> > the error, "An error occurred while trying to process the command line."
> >
> > This is what I'm trying to execute throught he Command Prompt,
> > bcp 450_gilroy.dbo.temp_rim out "C:\Program Files\AutoMate\AutoMate
> > Downloads\output.txt" -T -c -Sqisdevsql1
> >
> > I'm running this from our development server, which is not where SQL
> > Server
> > lives, we have a dedicated SQL Server box, qisdevsql1.
> >
> > What am I doing wrong?
> >
> >
>
>|||> bcp 450_gilroy.dbo.temp_rim out "C:\Program Files\AutoMate\AutoMate
> Downloads\output.txt" -T -c -Sqisdevsql1
Since your database name does't confirm to the rules for identifiers, you
need to enclose the name in square brackets:
bcp [450_gilroy].dbo.temp_rim out "C:\Program Files\AutoMate\AutoMate
Downloads\output.txt" -T -c -Sqisdevsql1
Hope this helps.
Dan Guzman
SQL Server MVP
"DaRock" <DaRock@.discussions.microsoft.com> wrote in message
news:81457C76-EC2B-468A-B8CF-290B396076BB@.microsoft.com...
> First of all I'm brand new to SQL Server (fresh off 7 years of Sybase) and
> this newsgroup so forgive me if I should have posted this question else
> where.
> I'm trying to use bcp to output data from a table to a file but keep
> getting
> the error, "An error occurred while trying to process the command line."
> This is what I'm trying to execute throught he Command Prompt,
> bcp 450_gilroy.dbo.temp_rim out "C:\Program Files\AutoMate\AutoMate
> Downloads\output.txt" -T -c -Sqisdevsql1
> I'm running this from our development server, which is not where SQL
> Server
> lives, we have a dedicated SQL Server box, qisdevsql1.
> What am I doing wrong?
>|||Yes that was it. Thanks!
"Dan Guzman" wrote:
> > bcp 450_gilroy.dbo.temp_rim out "C:\Program Files\AutoMate\AutoMate
> > Downloads\output.txt" -T -c -Sqisdevsql1
> Since your database name does't confirm to the rules for identifiers, you
> need to enclose the name in square brackets:
> bcp [450_gilroy].dbo.temp_rim out "C:\Program Files\AutoMate\AutoMate
> Downloads\output.txt" -T -c -Sqisdevsql1
>
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "DaRock" <DaRock@.discussions.microsoft.com> wrote in message
> news:81457C76-EC2B-468A-B8CF-290B396076BB@.microsoft.com...
> > First of all I'm brand new to SQL Server (fresh off 7 years of Sybase) and
> > this newsgroup so forgive me if I should have posted this question else
> > where.
> >
> > I'm trying to use bcp to output data from a table to a file but keep
> > getting
> > the error, "An error occurred while trying to process the command line."
> >
> > This is what I'm trying to execute throught he Command Prompt,
> > bcp 450_gilroy.dbo.temp_rim out "C:\Program Files\AutoMate\AutoMate
> > Downloads\output.txt" -T -c -Sqisdevsql1
> >
> > I'm running this from our development server, which is not where SQL
> > Server
> > lives, we have a dedicated SQL Server box, qisdevsql1.
> >
> > What am I doing wrong?
> >
> >
>
>

没有评论:

发表评论