BCP execute issue – Native Error 18456 | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

BCP execute issue – Native Error 18456

Hi there Attempting to execute the following BCP statement bcp "EXECUTE RonnieTEST.dbo.sp_TestSelect" out c:eek:utput.txt -c -U sa -P "sa password" and I am receiving the following error message: SQLState = 28000, NativeError = 18456
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ‘sa’. Any ideas as this is driving me crazy. All this SP_TestSelect does is select * from a particular table. Thanks
Ronnie
Yesterday it worked…Today it doesn’t – That’s Microsoft
Try -P without " Luis Martin
Moderator
SQL-Server-Performance.com One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important
Bertrand Russell
All postings are provided “AS IS” with no warranties for accuracy.
Tried with the -P as you mentioned but again got an error….Did get a different error though. SQLState = 37000, NativeError = 4060
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login ‘EXECUTE RonnieTEST’. Login fails. Ronnie
Yesterday it worked…Today it doesn’t – That’s Microsoft
Do not use EXECUTE statement in the BCP, specifying the object with databasename.ownername.objectname will suffice the condition. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>