We are using a trial version of Azure. We are trying to perform cross server queries from our SQL 2012 in-house.
We seem to have our local 2012 linked with Azure. When I
While adding linked server from SQL Management, you are not given option to set default database. So use something like below
EXEC sp_addlinkedserver
@server='name for referring locally', -- here you can specify the name of the linked server
@srvproduct='',
@provider='sqlncli', -- using SQL Server native client
@datasrc='AzureMachineName.database.windows.net', -- add here your server name
@location='',
@provstr='',
@catalog='yourdatabasename'
I figured this works.