x

bcp out gives login failed

I have enabled 'xp_cmdshell', not sure why? created sample table in adventureworks2008 called Exporttab, I started cmd prompt by clicking start cmd and typed the bcp syntax to export out the table but gives me login error. have attached screen shot. what am i doing wrong?

sql.gif (11.9 kB)
more ▼

asked Feb 14, 2013 at 04:52 PM in Default

avatar image

spatel
300 8 11 15

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

user error in the fully qualified name the database is adventureworks2008r2. I missed r2. I successfully managed to output the data from persons table as a practice exercise.

Thank you

more ▼

answered Feb 15, 2013 at 06:25 AM

avatar image

spatel
300 8 11 15

(comments are locked)
10|1200 characters needed characters left

BCP is trying to use your Windows credentials to run. Does your Windows account have enough privileges on that database?

more ▼

answered Feb 14, 2013 at 05:11 PM

avatar image

ggalvan
30

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

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

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x52

asked: Feb 14, 2013 at 04:52 PM

Seen: 963 times

Last Updated: Feb 18, 2013 at 11:30 PM

Copyright 2016 Redgate Software. Privacy Policy