I have an instance of SQL Server running on a Centos 7 VPS together with an application running on .net core 2.2.
I tried running the application on a separate VPS instance remotely connecting to the SQL Server VPS. But the queries where running really really slow. Like 100-500 times as slow to be precise.
I've also noticed that as of recently (it didn't use to) MSSMS also hangs for a bit each time I right click anything in the Object Explorer.
The connection string looks like the following:
Server=(IP of the VPS running SQL Server);Database=master;User Id=(username); Password=(password);
Any suggestions on what to do?
I figured out that the issue was resolved by using servers geographically closer to each other.
Related
we are developing a web application that use SQL Server 2016 (Express) as a database engine.
We have noticed that the queries we make from application side take 20-30ms (average) when SQL Server is installed locally while, if installed on a remote machine, it take 400-500ms. We tried different versions of JDBC (now version 7.2.2) but the timing is the same. Both PC are connected on same switch.
The connection string we use is:
jdbc:sqlserver://${database.address};SelectMethod=cursor;database=${database.name};useUnicode=true;characterEncoding=UTF-8;charactetrResultSets=UTF-8
We tried to delete SelectMethod=cursor; and the timing improve but not significantly.
It is not a DNS problem because as address we use the IP.
Can someone tell me how to solve the problem?
I got strange feeling that my local computer runs several versions of SQL Server. How to know all running SQL Servers on my PC?
How to know all running SQL servers on my PC?
Best way would be to go through configuration manager ..As per your version you can open configuration manager and see all the versions of sqlserver installed.
Below is a snippet from my local machine
One more way would be to go through discovery manager,if you have installation media on your system.. you can double click the setup file and click on tools as shown below
and finally you can see all versions of sqlserver in a report like below .Distinct instance Id is the number of instances here.Opening sqlserver 2016 discovery report won't show 2017 instances,so always open with highest version
I'm trying to figure out how to get back the list of SQL servers in my Visual Studios (2012, 2015) and even in MS SQL Server management studio... I've been searching for a solution but I'm lost. Is there any way to get these servers back? Everything is working properly, I can write server manually but I'm to lazy to ask my colleagues.
The SQL Server Browser service is running. There are no Windows updates to install and the computer has been rebooted many times.
Thank you for any advice.
The SQL Server Browser service is running
Do you mean on your computer? You'll need it running on the machines you are trying to get to appear in the list.
It's a pretty standard dialog - assuming that it uses the same technology as SSMS, according to MSDN:
This dialog is populated by the SQL Server Browser service on the
server computers. There are several reasons why the name of an
instance might not appear in the list:
The SQL Server Browser service might not be running on the computer running SQL Server.
UDP port 1434 might be blocked by a firewall.
The HideInstance flag might be set.
I would like to know if an installation of SQL Server Express is required on my client PCs? I have searched a fair bit and so far all I've seen were related to attached databases or local databases.
Here's the setup of my system.
There will be a Windows Server PC that will be hosting the SQL Server instance.
Client PCs will be running a VBNet based windows form application where connection strings will be fed to table adapters that would allow them to connect to the server.
Now I have tested running the application on a Windows 7 PC without SQL Server Express installed and it works, connection was a success and data can be retrieved etc. However the system is actually going to be run on Windows XP when it goes live.
So I was wondering if the client PCs would require an installation of SQL Server Express or any sort of dlls for it to be able to connect to the server? Or would the .Net Framework be sufficient?
Thanks in advance.
You will not require a SQL instance on your client PCs. The app can just make the connection to the server via the connection strings. Our app is very similar in the fact that we support Windows Xp and SQL Server 2005 and it works well without any instance on the client PCs. We do install a local instance on the client but this is only used when transferring data to a laptop so it can be used when disconnected from the network. HTH
I think you should install .Net framework on your client pc. I'm not entirely sure if it's the case but to be sure, run it on a Windows XP machine. If you dont have an xp machine, try using desktop simulater like virtualbox of sorts.
I have an application that I have developed 2 years ago that stopped working due to not be able to connect to a remote SQL Server 2008 anymore, and I can't figure it out why this is happening.
This is the situation: I have a desktop where I have jdk1.6.0_31 and I developed a small 'helloworld' like application to test the connection to this remote SQL Server, even with the firewall off I can't make it connect. Still on this desktop I have Visual Studio where I'm able to connect to this SQL Server (so firewall is not the problem I guess).
I have a laptop where I tested this 'helloworld' JDBC app, and on this laptop the application works, and I just copied the app from the desktop to the laptop.
I also copied the app to my virtual server (that hosts the application that I developed 2 years ago) and there this 'helloworld' app does not work also, with firewall on or off, it doesn't matter.
So I'm wondering, what in the world could be leading to such a strange situation? JDBC on desktop does not work, but through visual studio it does, JDBC on laptop works, and JDBC on virtual server does not?? I'm really confused about this. I have been struggling with this for a week already. And that's why I really need your help people!!
Best regards and thanks in advance!
Bruno
I expect this is as simple as a connection string issue. The format for a connection string might change for different languages (Java vs C#). Can you please post the connection string you are using -- rename constants of course -- I just want to see the format you are using.