Title

Kodyaz Development Resources

Development resources, articles, tutorials, samples, codes and tools for .Net, SQL Server, Vista, etc.
Welcome to Kodyaz Development Resources Sign in | Join | Help
in Search

OLE DB provider "SQLNCLI" for linked server "(null)" returned message "Invalid authorization specification".

Last post 11-10-2007, 3:57 PM by eralper. 2 replies.
Sort Posts: Previous Next
  •  05-11-2007, 3:53 AM 537

    OLE DB provider "SQLNCLI" for linked server "(null)" returned message "Invalid authorization specification".

    Hi,

    You may have the same difficulty that I had recently by connecting a remote sql server using OPENROWSET

    My first sql script was like below:

    SELECT FS.* FROM OPENROWSET('SQLNCLI','Server=KODYAZ\YUKON;User id=yukon;pwd=sql2005pwd;database=FS;','SELECT * FROM FSAppliances') AS FS;

    The returned message after running the above t-sql select query is:

    OLE DB provider "SQLNCLI" for linked server "(null)" returned message "Invalid authorization specification".

    OLE DB provider "SQLNCLI" for linked server "(null)" returned message "Invalid connection string attribute".

    Msg 7399, Level 16, State 1, Line 1

    The OLE DB provider "SQLNCLI" for linked server "(null)" reported an error. Authentication failed.

    Msg 7303, Level 16, State 1, Line 1

    Cannot initialize the data source object of OLE DB provider "SQLNCLI" for linked server "(null)".

     

    Then I realized that, the connection string I use is false just because of the "User Id" that must be "Uid" instead.

    The correct syntax for OPENROWSET is as,

    SELECT FS.* FROM OPENROWSET('SQLNCLI','Server=KODYAZ\YUKON;Uid=yukon;Pwd=sql2005pwd;Database=FS;','SELECT * FROM FSAppliances') AS FS;

  •  09-28-2007, 9:45 AM 649 in reply to 537

    Re: OLE DB provider "SQLNCLI" for linked server "(null)" returned message "Invalid authorization specification".

    very much thankful to you and to kodyaz,  i stuggled a lot to find correct arguments.. thanks a lot
  •  11-10-2007, 3:57 PM 690 in reply to 649

    Re: OLE DB provider "SQLNCLI" for linked server "(null)" returned message "Invalid authorization specification".

    Thanks singanan, It is nice to know that I could have helped you save your time :)
View as RSS news feed in XML
Copyright © 2004 - 2008 Eralper Yilmaz. All rights reserved.
Powered by Community Server, by Telligent Systems