Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL bcp problem

Posted on 2004-04-28
6
Medium Priority
?
1,653 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
[X]
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
  • 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
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 120 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
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…

597 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