Solved

SQL bcp problem

Posted on 2004-04-28
6
1,610 Views
Last Modified: 2007-12-19
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?
0
Comment
Question by:Kegan5
  • 4
  • 2
6 Comments
 
LVL 13

Expert Comment

by:danblake
Comment Utility
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
 

Author Comment

by:Kegan5
Comment Utility
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
 
LVL 13

Expert Comment

by:danblake
Comment Utility
Did you also check if your server was in Windows Authentication mode only ?

(Like the suggestion above ?)
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 13

Expert Comment

by:danblake
Comment Utility
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
 

Author Comment

by:Kegan5
Comment Utility
yeah I changed that but its still giving me the same error message
0
 
LVL 13

Accepted Solution

by:
danblake earned 30 total points
Comment Utility
Have you tried this with a trusted login (NT Login that has SYSADMIN permissions on the server/database) ?
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now