Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

SQL bcp problem

Posted on 2004-04-28
6
1,623 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
ID: 10937604
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
ID: 10937641
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
ID: 10937654
Did you also check if your server was in Windows Authentication mode only ?

(Like the suggestion above ?)
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 13

Expert Comment

by:danblake
ID: 10937666
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
ID: 10937682
yeah I changed that but its still giving me the same error message
0
 
LVL 13

Accepted Solution

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

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

829 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