Created
February 18, 2014 10:23
-
-
Save grishin/9068223 to your computer and use it in GitHub Desktop.
How to create linked server to Azure SQL.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- replace MYSERVER, MYDB, MYUSER, MYPASSWORD with real values | |
| EXEC sp_addlinkedserver | |
| @server='azure', | |
| @srvproduct='', | |
| @provider='sqlncli', | |
| @datasrc='MYSERVER.database.windows.net', | |
| @location='', | |
| @provstr='', | |
| @catalog='MYDB' | |
| -- Add credentials and options to this linked server | |
| EXEC sp_addlinkedsrvlogin | |
| @rmtsrvname = 'azure', | |
| @useself = 'false', | |
| @rmtuser = 'MYUSER@MYSERVER', | |
| @rmtpassword = 'MYPASSWORD' | |
| EXEC sp_serveroption 'azure', 'rpc out', true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment