I am making a website for PvP servers in PHP language. I have to comply with my own server so that my software does not have w-a-r-e-z. But I have to connect to the client's database with sql remote. (SQL Server 2014).
While the script is running very fast on the local connection, the remote sql connection opens 1-2 minutes late. This, in turn, will not please the customer. I can not imagine if they think you get 500-1000 hits. What can I do in this situation?
Related
I am a Support technician for an Application using a 2008 SQL Server Express database and the our client app-installations occasionally loses connection to the SQL Server database.
Note: I am a total beginner with SQL and unfortunately our company no longer has an application Eng.
So where to begin? Our customers usually have a few client applications installed (say 2 to 10) and for the most part the application will connect to the server's DB without error. Then all of a sudden we fail to connect, usually with a simple "Unable to connect to the database" error.
Interestingly, in most cases they can wait 30+mins and the problem goes away.
We have the Named Pipes and TCP/IP enabled for remote connections. Any suggestions to consider?
I have 2 machines which locate in same network. In first is running SQL Server 2014 Express and in second is running a MS Access application which uses the database.
But the problem is if I start MS Access, the first form loads successfully but application is very slow. I have a lot linked tables is MS Access which use database. At the bottom of window has state "Calculating..".
Currently i have allowed remote connection to SQL. I have disabled firewall on the SQL Server machine. I have tested connection via telnet from machine 2 to the SQL Server machine and it was successful.
So what am I missing that my connection via MS Access fails? Can there be some user permissions (but telnet connection was successful)? Is it possible to debug MS Access somehow why the connection is slow?
In an attempt to do some basic profiling on our Azure SQL Server (V12) we enabled Auditing using the Azure portal.
Not many seconds later I had an angry developer on my hands that could not connect to the database using his client (HTML5 page).
I really couldn't see the connection, but since enabling auditing was the only change, I tried disabling Auditing again, and sure enough now the client could connect.
Further info:
I could access the SQL server using SSMS just fine.
The problem was only on the TEST environment from the customers network, not from our DEV environments (which is from Visual Studio on the developers own laptops).
Can anyone tell me why enabling auditing can break this? We tried doing it on other databases too, and sure enough: when I enabled auditing, the connection could not be established...
According to this page, if you want auditing on, the FQDN connection strings need to be changed:
Original server FQDN in the connection string: (server name).database.windows.net
Modified server FQDN in the connection string: (server name).database.secure.windows.net
I usually create queries using Visual Foxpro 9.0 from a desktop computer to a MS SQL Server 2005 running on Windows Enterprise Server (2003). My queries are repetitive and sometimes, one session would query the SQL server 200,000 times in rapid succession. For the first few days, my program is running fairy well but then suddenly the SQL Server is refusing to process the queries.
On checking the logs in the SQL Server, I found out that a certain spid is killing my query process:
Process Id 71 was killed by Hostname SQLSERVER, Host Process ID xxxx.
I am confused because the hostname is not the SQL Server I am querying but another SQL Server.
From the activity monitor I noticed that the offending Process ID has the following information:
62 NO sa master sleeping 0 AWAITING COMMAND Sql Agent - Generic Refresher ..
The details shows a message:
SET NO_BROWSETABLE ON
Lastly, thinking that it may be a problem with visual FoxPro, I tried running queries from the desktop machine from within SQL Server Management studio, I still encountered the same problem when I tried queries to the SQL Server:
A transport-level error has occurred when sending the request to the
server. (provider: TCP Provider, error: 0 - An existing connection was
forcibly closed by the remote host.)
It's mind boggling because I am able to establish connections but my queries are refused by the server. Again, thinking that my desktop is the problem, I tried running the queries from another computer. It was running at first then suddenly the same problems occurred. Now these two desktops are refused by the server.
I am thinking that this might be a security but I don't know how to resolve this problem.
We also tried to restore our database backups to another host, the same scenario happened... Fine at first then the problem appeared after a few query sessions.
The following are the ODBC SQL Server Drivers:
Microsoft Ole DB Provider for Sql Server
Sql Server Native Client 10.0
Sql Server Native Client 11.0
I have search the web for a possible solution and I tried the suggested solutions, spid blocking, chimney offloading, rss, among others but to no avail. Please, In need your expert advise!
Thank you in advance.
Our MS Access application with linked tables to SQL Server 2005 is slow when using Windows Authentication from Windows XP clients.
We've been running it successfully using SQL Server authentication, but now we want to move to Windows Authentication for better security control.
Setup:
Database server: Windows 2003 Server, SQL Server 2005 SP2
Client: Windows XP SP3, SQL Server ODBC driver v2000.85.1132.00
MS Access application: MS Access 2003
Connection string:
DRIVER=SQL Server;SERVER=[server name];Connect Timeout=300;Trusted Connection=True;APP=Microsoft Office 2003;WSID=[server name];DATABASE=[db name]
Only the TCP/IP network protocol is enabled on the server.
The slowness does not happen in these situations:
App on DB server, SQL Server Authentication
App on DB server, Windows Authentication
App on Windows XP client, SQL Server Authentication
SQL Server Management Studio on client, Windows Authentication - I did a small test with running 15 queries in SQL MS. This went fast and did not cause any logon/logoff events in the Security event log on the server.
I've analyzed the slowness using SQL Server Profiler and the event log on the server and it seems to come down to this:
The application runs a query
A new connection to SQL Server is opened (visible in SQL Server Profiler)
The identity of the user is verified (visible in the Security event log on the server, a logon/logoff event happens). This takes several hundreds of milliseconds.
The query runs on SQL Server
Results are returned to Access
This happens for every query. Some of the forms run +- 10 queries when showing a new record (updating sub forms, loading values for combo's etc). This results in very slow performance.
Of course setting up a new connection to SQL Server for every query isn't necessary, and reusing connections might solve the issue. I've been looking around for information on how to make sure Access/ODBC does proper connection pooling. I found these MS KB articles:
Frequently Asked Questions About ODBC Connection Pooling
How to Enable Connection Pooling in an ODBC Application
I've tried calling the SQLSetEnvAttr function from the main form of the Access application, but this didn't improve results.
Any help is greatly appreciated.
The first question I have is: are you running a domain controller? This may sound like a crazy question, but I just want to make sure. Although is less and less common, I've seen organizations run Windows networks with workgroups and "pass-through" authentication. The symptoms you describe are the same as would be observed on a network that is set up in this fashion.
Assuming you do have a proper domain set up, you must have a problem somewhere in the Named Pipes network stack. Named Pipes is the default protocol if you're using Windows authentication. It's not a bad idea to get to the bottom of this if you have the time, but if you just want to fix your performance problem, then I would force the TCP/IP protocol in your connection string:
DRIVER=SQL Server;SERVER=tcp:[server name];Connect Timeout=300;Trusted Connection=True;APP=Microsoft Office 2003;WSID=[server name];DATABASE=[db name]
Note the addition of the tcp: prefix. I got this syntax from Jon Galloway's blog. TCP/IP is the default protocol for SQL Server Authentication. You can also make the protocol switch by disabling Named Pipes support on the server, but this is more of a hassle and could cause other unanticipated problems.
Check Microsoft SQL Server Native Client
at http://www.microsoft.com/downloads/details.aspx?FamilyID=d09c1d60-a13c-4479-9b91-9e8b9d835cdc&displaylang=en