17.07.2015 Views

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3 – Schema Architecture Strategies• Data Source: The textual reference to the instance that is accessedthrough the linked server. The value of this argument is dependentupon the provider used. If the native SQL Server OLD DB provider isused this argument should be omitted. This argument is passed as aproperty to the OLE DB provider.• Location: The textual reference to the location of the linked serverdatabase. This argument is passed as a property to the OLE DBprovider.• Provider String: The textual reference to the connection string tothe instance that is being linked. This argument is passed as a propertyto the OLE DB provider.• Catalog: The textual reference to the specific database that is beingaccessed through the linked server. This argument is passed as aproperty to the OLE DB provider.Not all of the arguments are applicable to all OLE DB providers. In the case ofthe native SQL Server OLE DB provider, simply providing the server nameand product is sufficient.Once a linked server has been created, its logins will need to be established toprovide access to it. This is accomplished by executing thesp_addlinkedsrvlogin system stored procedure, the syntax of which is asfollows:sp_addlinkedsrvlogin [Linked Server Name],[Use Self],[Local Login],[Remote User],[Remote Password]This system stored procedure's arguments are:• Remote Server Name: The textual reference to the linked serverfor which the login is being created.• Use Self: A value of true indicates that the users connect to thelinked server using the credentials that are used on the primary server.A value of false indicates that the credentials that are used to loginto the linked server are different than the credentials used to login tothe primary server.• Local Login: The SQL Login or Windows Login that is used togain access to the linked server.• Remote User: The SQL Login used to gain access to the linkedserver, if the Use Self argument is set to false.80

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!