Linked Server. Dont show ip or dynamic dns

Giorgos 21 Reputation points
2020-08-23T08:24:12.737+00:00

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

SQL Server on Azure Virtual Machines
Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
447 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,480 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Dan Guzman 9,201 Reputation points
    2020-08-23T13:47:54.06+00:00

    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>';  
    
    1 person found this answer helpful.
    0 comments No comments

  2. m 4,266 Reputation points
    2020-08-24T05:22:32.963+00:00

    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” .

    0 comments No comments

  3. m 4,266 Reputation points
    2020-08-25T01:21:42.317+00:00

    Hi @Giorgos ,

    Is the reply helpful?

    BR,
    Mia
    If the reply is helped, please do "Accept Answer".--Mia

    0 comments No comments

  4. m 4,266 Reputation points
    2020-08-26T01:27:06.933+00:00

    Hi @Giorgos ,

    Is the reply helpful?

    BR,
    Mia
    If the reply is helped, please do "Accept Answer".--Mia

    0 comments No comments

  5. m 4,266 Reputation points
    2020-08-28T01:33:17.58+00:00

    Hi @Giorgos ,

    Is the reply helpful?

    BR,
    Mia
    If the reply is helped, please do "Accept Answer".--Mia

    0 comments No comments