11 Eylül 2014 Perşembe

OPENDATASOURCE usage

If you like to reach a server which is not defined for Linked Servers where you are working, and if you know  a user which has access for that server then you can OPENDATASOURCE as follows;

select * from  OPENDATASOURCE('SQLOLEDB','Data Source=ServerYouWantToReach;User ID=userNameForThatServer;Password=passwordForThatServer').databaseName.SchemaName.TableName

You can use this for inner join etc.

Have a good use.

For: More info: http://msdn.microsoft.com/en-us/library/ms179856.aspx

Hiç yorum yok:

Yorum Gönder