SQL bcp problem

I used the command
bcp "Student.dbo.Student3" in C:Student.csv -fc:\Student.fmt -Scsm33068 -Usa

it then asks for my password but when I enter it it gives an error message:

SQLstate = 28000, NativeError=18452
error = login failed for user sa
reason Not associated with a trusted SQL server

Any ideas?
Kegan5Asked:
Who is Participating?
 
danblakeCommented:
Have you tried this with a trusted login (NT Login that has SYSADMIN permissions on the server/database) ?
0
 
danblakeCommented:
Your server is setup to use Windows Authentication only.

You also should not have a blank password specified.
-P<pswd> should be used to define the password.

Try using the -T to use your NT account in the BCP command syntax.

Otherwise you will need to reconfigure your server for both Windows Authentication & SQL Server authentication.

Right Click on the Server in EM, select properties, select the security tab.
Here you can modify to Win Authentication only or SQL Server authentication.
0
 
Kegan5Author Commented:
I have set the password with -Ppassword

it then asks for password: when I enter password in here again it gives me the same error message as above
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
danblakeCommented:
Did you also check if your server was in Windows Authentication mode only ?

(Like the suggestion above ?)
0
 
danblakeCommented:
If the server is in Windows Authentication mode only it is usual for the error message:
SQLstate = 28000, NativeError=18452
error = login failed for user sa
reason Not associated with a trusted SQL server

to be returned.

You need to configure the server for windows / sql server authentication to have a 'sa' account available.
0
 
Kegan5Author Commented:
yeah I changed that but its still giving me the same error message
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.