local host or online host

zezo2021

Member
Local time
Today, 16:41
Joined
Mar 25, 2021
Messages
415
Hello

Is there any easy way to know if MS SQL DBis hosted locally or online host

Thank you so much
 
Check the server name? Just thinking out loud...
 
Can you explain more
 
Is there any easy way to know if MS SQL DBis hosted locally or online host
There is neither a hard nor an easy way to know this for sure.
Even a SQL Server running on your local computer can also be available online.
Even a SQL Server running on a VM in a data center at the other end of the world, can also have an IP address of your local network.
 
I don't have a specific connection string

if possible general rules

The general rule is, you need to know the topology of your network to answer that question. There ARE no general rules, particularly in the realm of VMs - for which if you are on one VM instance and your SQL Server is on another VM instance IN THE SAME PHYSICAL VM HOST, there will be an IP address that has the appearance of being on a different machine. If the IP address that links to your SQL Server is 127.0.0.1 then you are on a locally hosted SQL Server connection because that is the internal loopback connection.

But the next question, is WHY? What would you do differently if your SQL server was on the same host or was NOT on the same host?
 
This query may give you some clue as to where the current connection is:
SELECT DISTINCT MSysObjects.Database FROM MSysObjects WHERE (((MSysObjects.Database) Is Not Null));
 
The general rule is, you need to know the topology of your network to answer that question. There ARE no general rules, particularly in the realm of VMs - for which if you are on one VM instance and your SQL Server is on another VM instance IN THE SAME PHYSICAL VM HOST, there will be an IP address that has the appearance of being on a different machine. If the IP address that links to your SQL Server is 127.0.0.1 then you are on a locally hosted SQL Server connection because that is the internal loopback connection.

But the next question, is WHY? What would you do differently if your SQL server was on the same host or was NOT on the same host?
Working with Online MS SQL is good because I don't need a Team viewer. work any time I prefer


asking the client about DB is Online or Local

Not good (I think)
Show you that you don't have any experience
 
Not good (I think)
Show you that you don't have any experience

Or perhaps you simply say, "I want to optimize connection issues but don't want to actively probe your network."
 

Users who are viewing this thread

Back
Top Bottom