bcp and queryout problem

  • Hi all,

    Im getting SQLState = 28000, NativeError = 18456 error while executing the below mentioned query

    exec master.dbo.xp_cmdshell 'bcp "SELECT * FROM customer for XML auto, ELEMENTS XSINIL" queryout e:\sample.txt -c -T -U"sa" -P"e2s"'

    exec master.dbo.xp_cmdshell 'bcp "SELECT * FROM customer for XML auto, ELEMENTS XSINIL" queryout e:\sample.txt -c -T '

    i tried both the queries but still im unable to find the solution

    im using sql server 2005

    USE master

    GO

    EXEC sp_configure 'show advanced options', 1

    GO

    RECONFIGURE WITH OVERRIDE

    GO

    EXEC sp_configure 'xp_cmdshell', 1

    GO

    RECONFIGURE WITH OVERRIDE

    GO

    EXEC sp_configure 'show advanced options', 0

    GO

    no use of changing the configuration ... im still getting the same error pls can anybody give me a solution for this 🙁

    thanks in advance..

    Regards,

    Seetha

  • Please don't cross post. It just wastes peoples time and fragments replies.

    No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic975434-391-1.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply