SQL Server Performance

BCP execute issue - Native Error 18456

Discussion in 'SQL Server DTS-Related Questions' started by braveheart1326, May 25, 2005.

  1. braveheart1326 New Member

    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.


    Yesterday it worked...Today it doesn't - That's Microsoft
  2. Luis Martin Moderator

    Try -P without "

    Luis Martin

    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.

  3. braveheart1326 New Member

    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.


    Yesterday it worked...Today it doesn't - That's Microsoft
  4. satya Moderator

    Do not use EXECUTE statement in the BCP, specifying the object with databasename.ownername.objectname will suffice the condition.

    Satya SKJ
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

Share This Page