local host or online host (1 Viewer)

zezo2021

Member
Local time
Today, 19:44
Joined
Mar 25, 2021
Messages
390
Hello

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

Thank you so much
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:44
Joined
Oct 29, 2018
Messages
21,538
Check the server name? Just thinking out loud...
 

zezo2021

Member
Local time
Today, 19:44
Joined
Mar 25, 2021
Messages
390
Can you explain more
 

sonic8

AWF VIP
Local time
Today, 19:44
Joined
Oct 27, 2015
Messages
999
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.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 12:44
Joined
Feb 28, 2001
Messages
27,319
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?
 

LarryE

Active member
Local time
Today, 10:44
Joined
Aug 18, 2021
Messages
605
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));
 

zezo2021

Member
Local time
Today, 19:44
Joined
Mar 25, 2021
Messages
390
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
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 12:44
Joined
Feb 28, 2001
Messages
27,319
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

Top Bottom