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;