How to use an ipaddress instead of server name in a SQL query

1.1k Views Asked by At

How can I use an ipaddress instead of server name in a Sql Query for example.

SELECT * FROM [ipaddress].[databaseName].[dbo].[TableName] 

Instead of [serverName].[databaseName].[dbo].[TableName] I wanted to get the info from a system of xx.xx.xxx.xx IP address.

Instead of serverName I want to get the data from this PC with MSSQL-server installed.

1

There are 1 best solutions below

0
Michael Tobisch On

Register the server as a linked server and use the IP address as the linked server's server name.