Clicky

Hi Experts,
can I pass the initial catalog as a parameter to my bcp?

asked 12/06/2011 07:05

dionisio_79's gravatar image

dionisio_79 ♦♦


8 Answers:

bcp "select * from dbo.app_bretella" queryout "C:\Documents and Settings\EE20019\My Documents\we.txt " -t ; -S ...SERVERNAME -d ...DATABASENAME -U secretoUR -P secretoUR -c
i GET AN UNKNOWN OPTION -d
link

answered 2011-12-07 at 03:29:26

dionisio_79's gravatar image

dionisio_79

are you sure you are using the SQL Server bcp, and don't have another bcp in the "path"?
that's what I have seen as usual reason for this "error"
link

answered 2011-12-07 at 03:40:09

angelIII's gravatar image

angelIII

sure, no other bcp executables in the path
link

answered 2011-12-07 at 04:19:22

dionisio_79's gravatar image

dionisio_79

I notice you have spaces between the option names and the values, can you please try without those spaces:
1:
bcp "select * from dbo.app_bretella" queryout "C:Documents and SettingsEE20019My Documentswe.txt " -t; -S...SERVERNAME -d...DATABASENAME -UsecretoUR -PsecretoUR -c
link

answered 2011-12-07 at 04:33:23

angelIII's gravatar image

angelIII

tryied without spaces, same result
link

answered 2011-12-07 at 04:40:30

dionisio_79's gravatar image

dionisio_79

any other suggestions?
link

answered 2011-12-07 at 04:45:22

dionisio_79's gravatar image

dionisio_79

can you please show the output of:
bcp

so, without parameters ?
link

answered 2011-12-07 at 05:18:05

angelIII's gravatar image

angelIII

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×1

Asked: 12/06/2011 07:05

Seen: 274 times

Last updated: 12/14/2011 07:30