2
If i have a connection string like this that I use in a Data Connection in Excel to get data from a SQL Server database:
OLEDB;
Provider=SQLOLEDB.1;
User ID=MY_USERNAME;
Password=MY_PASSWORD;
Persist Security Info=False;
Initial Catalog=ABC;
Data Source=MY_SQL_SERVER_NAME;
Use Procedure for Prepare=1;
Auto Translate=True;
Packet Size=4096;
Use Encryption for Data=False;
Tag with column collation when possible=False
How does my computer know the path to MY_SQL_SERVER_NAME
on the network?
I assume that is somehow set by my company using some sort of configuration file somewhere, but I don't really know how it all works under the hood.
If I were getting data from a website instead of a SQL Server database, the website resource would need to be preceded by a path/domain-name like this: http:\\www.example.com\MY_RESOURCE_NAME.html
Without that path, I couldn't get to MY_RESOURCE_NAME.html
. So, then how does ODBC work without a path preceding MY_SQL_SERVER_NAME
?
My problem is that most of the time this connection string works fine. However, if I'm at home on VPN it doesn't. But I don't have any idea how to troubleshoot it.
Notes:
I don't have a connection set up to MY_SQL_SERVER_NAME
in the Windows ODBC Data Source Administrator, so my computer is somehow accessing the SQL Server by only using the connection string AFAIK.
you could, yes. not sure what you are getting at. – Frank Thomas – 2018-03-27T17:16:52.910
or NBT/SMB technology, or NFS, or Host File, or WINS... in terms of the VPN though, only DNS is an INTERNETWORK namging protocol, so it works across networks, whereas NBT/SMB or WINS have LAN scope, and Host File has local scope. – Frank Thomas – 2018-03-27T17:18:30.713
Any built-in Windows tools available (that don't require admin rights to install/use) that I could use to figure out what
MY_SQL_SERVER_NAME
resolves to on my computer? – BarrettNashville – 2018-03-27T17:26:21.753Found
nslookup
. So if I open a command line and typenslookup MY_SQL_SERVER_NAME
then it shows me the server and IP address its accessing. – BarrettNashville – 2018-03-27T17:31:50.613NSLookup
is a great tool for DNS name checking. for NBT/SMB/WINS you can useNET VIEW
. – Frank Thomas – 2018-03-27T18:17:31.583