Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

SELECT from OPENDATASOURCE error Expand / Collapse
Author
Message
Posted Friday, February 15, 2013 12:55 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:10 AM
Points: 7,081, Visits: 12,573
The information you have provided does not compute. Are you sure your login has access to that table?

What does this return?

SELECT  *
FROM OPENDATASOURCE('SQLNCLI', 'Data Source=DESTSERVR\INSTANCE;Integrated Security=SSPI').TESTTBL.sys.tables
WHERE name = 'TBLNAME';

What about when using a username and password?

SELECT  *
FROM OPENDATASOURCE('SQLNCLI', 'Data Source=DESTSERVR\INSTANCE;user id=test;password=psw').TESTTBL.sys.tables
WHERE name = 'TBLNAME';



__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1420728
Posted Tuesday, February 19, 2013 6:52 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, July 11, 2014 1:42 PM
Points: 95, Visits: 603
The query works when I pass it user id and password, but it does not work when I use integrated security. Any idea how to get integrated security to work?


Post #1421623
Posted Tuesday, February 19, 2013 7:19 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:10 AM
Points: 7,081, Visits: 12,573
Define "does not work." Error message? Empty resultset? Remember, I cannot see what you see


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1421641
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse