What could cause latency between two VMs on the same physical server? - sql-server

I have a web VM and a database VM on the same physical server (Windows Server 2012 Hyper-V). The web site is a classic ASP site on a Windows 2012 server, and the database is on SQL Server 2012, also on Windows Server 2012.
My colo has a DNS server (not used for these VMs), and when it goes down, the site experiences Script Timeout errors -- the pages take 180+ seconds to process. When inspecting the site profiling, many of the database calls are taking several seconds each.
However, the SQL profile shows no performance issues -- all queries take only a few milliseconds to process. Putting a filter of 1,000+ milliseconds shows no matching results. So this leads me to believe the latency is between the web and database VMs.
However, this makes no sense for several reasons:
The DNS server does not host and entries related to this site or database.
All connections use IPs, not domain/machine names.
The latency is between the two VMs, but these are on the same server, so network issues should not impact the communication between the VMs. I verified this by running Wireshark, no web-to-DB traffic hits the NIC.
What could be causing this?
Edit:
Forgot that the DNS server does have a reverse DNS for the IP and site domain. But still can't imagine how this would result in the latency between the web and DB VMs.
Additional details in response to comments:
The MDAC version, according to this article, is 6.2.9200.16384. I don't remember installing MDAC separately, so I'm assuming it's what comes installed w/ Windows Server 2012.
They are on the same subnet. A tracert shows a direct route from the web server to the DB server.
Here is the connection string:
Provider=SQLNCLI11;Server=[DbServerIp];Integrated Security=SSPI;Network=DBMSSOCN
This is not running VMWare, but instead is Windows Hyper-V. Thought I mentioned that before, but I see now that I didn't (have now added it above).

I think the following link may resolve your very issue:
Read thread to the bottom to disable the NETBIOS Helper
Essentially, as odd as it sounds, try disabling NETBIOS on your network adapter(s):

Related

SSIS Deployment Wizard - Select Destination Page - User name and Password controls disabled

I'm new to SSIS and am working my way through some tutorials and examples from a book I've purchased, so bear with me if this is a basic question. My test environment - VMWare VM with 24 GB RAM with SQL Server 2017 Developer on Windows 10 Pro. SSMS 17.8.1 and Visual Studio 15 Update 3, SSDT 14.0.61712.050 - all running on the same VM.
I've tried running the Deployment Wizard from SSMS and from VS - both give the same result. On the Select Source page, the deployment model is Project Deployment & the .ispac Project deployment file is selected. So far, so good. When I get to the Select Destination page, my local SQL server is selected, Windows Authentication is selected (as it must be, as I understand it), but the User name and Password controls are disabled. Nothing I've tried has affected the enabled setting for these controls.
I've read all the SSIS related questions on this site and have scoured the internet for days, trying to find a solution for this. Based on my lack of success, I'm wondering if this configuration is even supported.
Any thoughts or suggestions on this would be greatly appreciated.
BTW - I don't know if this is related, but I'm also seeing very slow performance connecting to this instance of SQL Server using Windows Authentication from SSMS. Connection is instantaneous using SQL authentication. I spent a couple days chasing that around, too. This is a stand-alone box - not connected to a domain. I work remotely, so I do connect to the corporate network via VPN. It seems to be related to DNS (or reverse DNS), as adding an entry in my HOSTS file (computer-name 127.0.0.1) significantly reduced connection time (still slow, but faster than before) and connection time is slower when VPN is connected (connecting to VPN adds two DNS server addresses).
Image of SSIS Deployment Wizard
"Windows Authentication" means "Windows Integrated Authentication", so you connect to the server "as yourself" without supplying additional credentials. The "User name" and "Password" fields will only get enabled when not using Windows Authentication. I guess that you are wondering how to specify the target location on the server. Well, although "Windows Authentcation" is pre-selected, it isn't "done" yet. You will have to click on "connect" to make it happen.
As for the slow performance while beeing connected via VPN: Yes, it is for sure a DNS problem. While connected to the corporate network, you will use a DNS server from the company network first, and those DNS servers do not know the name of your private computer. An entry in the "hosts" file will help, but I suggest to use just a single dot (.) instead of your hostname when connecting to your local SQL Server.

Does windows authentication work even if the AD server cannot be reached?

The basic question is this, if our Windows service uses Windows Authentication for connections to SQL Server, and then because of a network disconnect, SQL server and/or the client machine cannot reach AD to authorize or authenticate, will our service still be able to connect to SQL Server and operate?
I’ve tried it and it seems to work, but we are concerned if it will work even after a few days of being disconnected or after server reboots and the like.
The alternative would be to use SQL Server Authentication, but we would rather not have to deal with potentially exposing and having to protect the password on the client computer. This computer may be in a remote location with little supervision. SQL Server would typically be running on this same remote computer.
And for the follow up questions, does it matter which edition of SQL Server we use? Does it matter that both SQL Server and the service are running on the same computer?
If AD connection is lost, existing SQL connections will keep working (at least for some time), and connection pools will be still available (again, for some time). However, I wouldn't get too comfortable with this, because these time spans might depend on settings outside of a typical DBA' reach.
Alternatives are:
Use an AD proxy. Depends on circumstances, might not be always viable;
Use local user accounts instead of AD. Works always.

Deploying a Microsoft Access application with SQL Azure

How can I deploy Access applications to multiple companies, with linked tables to SQL Azure servers?
I'm planning to deploy the Access programs with Microsoft Access runtime, and I'm assuming that I'll need to include the odbc drivers as well? Is there a way to automatically have Azure create a new server when a company signs into my website and downloads a program, and have the Access program link to it? And is there a way to get around the IP address settings in Azure as well? Because companies will be using the programs on multiple PCs. Or is it possible to utilise that and charge per PC?
If you distribute the application pre-linked, then the user should not have to do anything to consume the data.
When using Access with SQL server you can in general use the standard windows built in SQL driver. However in the case of Azure you do need to download + install the native 11 drivers (so I recommend you use that driver during development and setup).
You can also have code include to re-link to the sql server, but as noted, if your application is “already” linked, then you really don’t have to do anything on application startup. Such re-linking would not be required every time the application starts, but only a “one time” re-link is required say if you’re going to change the database, or perhaps the user logon. How to re-link (DSN less) is outlined here:
http://www.accessmvp.com/DJSteele/DSNLessLinks.html
As noted, you really don’t need the above.
As for IP restrictions, in the Azure setup you can turn off such restrictions if you need a connection that will occur from any location, but that does open up a security hole. (when you first create the SQL database you will be prompted for firewall rules).
All of the above assumes you been developing that Access application with SQL server as the back end (you can even use the free edition of SQL express for development on your local machine).
Last but not least:
Because your connection is occurring OVER the internet, then you speed will be MANY times slower then using a local server. Read the following article to get a “grasp” of this speed difference:
http://www.kallal.ca//Wan/Wans.html
So MUCH additional work is required in Access to obtain good performance when your connection is OVER the internet as opposed to SQL server running on your local network.

Connections to an Access database are stalling (looping?) on IIS

I have a pc with windows server 2008 (but it also happens with Windows Server 2003) and IIS, with different installed sites, which normally function properly.
Sometimes (2-3 times a day) it happens that the mdb connection of the server stalling, in the sense that all the sites that read mdb database come into a kind of loop, since the browser returns the classic timeout error.
Not depend on the database or from the site, but occurs on all sites on the server. In general, they are sites in asp with classic ADODB connection. The web access continues to operate, it's just the mdb connection that goes into loop.
It’s sufficient to restart the service of web publishing or restart IIS, to run again the connection, but I want to prevent the problem, not solve it every time someone report it.
May depend on what? Some of the sites that does something that is blocking the mdb connection on entire server? A hacker attack of some kind? How can I monitor any abnormal behavior of the sites or external attacks?
Thank you.
Stop using an Access database file (.mdb or .accdb) as a back-end database for a web application.
Microsoft strongly recommends against it; it is simply the wrong approach for a number of reasons.

Slow performance using local impersonation on ASP

I'm working on a large web application running under IIS 6.0 and connecting to an SQL Server 2005 database. I'm currently trying to connect to the database using Windows Authentication to properly log which user account updates records in the database, but I've run into a bit of a performance issue; The initial connection that establishes the session takes easily over a minute to finish.
There are no network issues (This is a test server, so all tests are local). My IIS is configured to use Basic Authentication (I need the login info plain) and Local Impersonation is enabled, with an empty username/password setting.
This setup establishes the connection properly, but as mentioned, takes way too long to start up (subsequent queries are performed at normal speed)
Does anyone know if Local Impersonation should affect performance this dramatically? Am I looking in the wrong place? Is there any way to force SQL Server to keep the database connection open?
Thanks in advance for any help!
Try changing the way you reference your local server. If your application settings are (local)\instance_name update it to (127.0.0.1)\instance_name.
I’ve had similar performance issue in the past and this fixed it. Note that you’ll need to add this IP address as one of the listeners in SQL Server Configuration manager under Network configuration -> TCP/IP

Resources