Hi @Giorgos ,
Is the reply helpful?
BR,
Mia
If the reply is helped, please do "Accept Answer".--Mia
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I want to make a link between two sql servers 2019. My server is a local machine, the other server is a virtual machine in cloud.
I can connect the virtual to the local very easily but the ip shows up.
Can i make the link and have my own name? without the ip showing up or dynamic dns.
Thank you in advance,
Andreas
Hi @Giorgos ,
Can i make the link and have my own name? without the ip showing up or dynamic dns.
Yes. You can.
You can reference @Dan Guzman ’s reply or reference docs as next:
https://learn.microsoft.com/en-us/sql/relational-databases/linked-servers/create-linked-servers-sql-server-database-engine?view=sql-server-ver15
https://www.sqlshack.com/how-to-create-and-configure-a-linked-server-in-sql-server-management-studio/
BR,
Mia
If the reply is helped, please do “Accept Answer” .
You can create a SQL Server linked server with a custom name by specifying a data source other than "SQL Server" along with the desired SQL Server OLE DB Provider. Below is a T-SQL example that uses the latest Microsoft OLE DB Driver for SQL Server (MSOLEDBSQL) installed from here. You'll also need to set the desired security context and options as you would normally.
EXEC master.dbo.sp_addlinkedserver
@server = N'<custom-name-here>'
, @srvproduct=N''
, @provider=N'MSOLEDBSQL'
, @datasrc=N'<remote-ip-or-hostname>';