Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use OPENROWSET with Trusted Connection

Status
Not open for further replies.

Andel

Programmer
Feb 15, 2001
366
US
I was able to use OPENROWSET before using Trusted Connection but now it's not working because of some SQL patch that we've applied. Is there any other way I can query the information from another server using trusted connection? I can use OPENQUERY but I don't want to setup link server.

Andel
andel@barroga.net
 
This is the query for using trusted connection


SELECT *
FROM
OPENROWSET('Microsoft.Jet.OLEDB.4.0'
,'Excel 8.0;Database=c:\Documents and Settings\Administrator\My Documents\Book1.xls'
,'SELECT * FROM [Sheet1$]'
)
 
Actually, i'd like to read another sql database not other kind of data source-- From SQL to SQL.


Andel
andel@barroga.net
 
What does your connection string look like?

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 

select * from
OPENROWSET( 'SQLoledb',
'Trusted_Connection=yes;Data Source=clairehsu;Initial Catalog=master',
'select * from dbname.dbo.a' )
 
Looks reasonable. Andel, does your server still support NT Authentication Mode or did the patch change that?

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top