Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2008
    Posts
    24

    Unanswered: bcp is not working with Windows authentication

    I am trying to bcp data to a remote machine which is having 'windows authentication mode' but it is throwing an error like

    SQLState = 28000, NativeError = 18456
    Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user 'kiran'.

    The command i used for exporting the data is

    C:\>bcp.exe <database>.dbo.test in test.txt -S vista1\SQLEXPRESS -t "," -r "\n" -e sqlerr.txt -c -T

    My machine is windows XP and the remote machine is Winows vista.I am able to connect to remote machine through visual studio express.

    And I am able to do the bcp copy of data with SQL server authentication.

    Please let me know if i am missing something.

    Thanks
    Kiran

  2. #2
    Join Date
    Mar 2007
    Posts
    86
    try putting single quotes around your server name ..
    also, make sure server is setup to allow both domain and sql server authentication
    login to SSMS and check server security.. make sure correct option is checked.

  3. #3
    Join Date
    Dec 2008
    Posts
    24
    Thanks for replying.

    I tried the server name putting in quotes and didn't worked.Is there anything like the remote machine must be NT like windows 2003 etc ?

    Kiran

  4. #4
    Join Date
    Dec 2008
    Posts
    24
    Even i am able to connect through the SQLCMD using the server name

  5. #5
    Join Date
    Jul 2005
    Posts
    2

    Hi

    Is the problem "bcp is not working with Windows authentication" - in your end - if so can you please publish the code ?

  6. #6
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    try this:

    SQLCMD -S"np:vista1\SQLEXPRESS" -T
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •