OpServer Performance very slow, no auto refresh - sql-server

I installed OpServer on an virtual Server running Windows Server 2012 R2 with 2.5GB of RAM. I configured the SQLSettings.json to monitor the SQL Server cluster (SQL Server 2014 SP1). The cluster has three nodes at the moment with about 200 databases, more or less equally distributed.
The server, on which OpServer runs, is not busy with anything. The SQL Servers are also very relaxed.
Installation was "a snap". Configuration as well..
But now i have the issue, that the "main screen" does not refresh itself, even with "refreshIntervalSeconds": 20 in the SQL config file.
I tried to change the configuration, so that only the instances of the three SQL Servers are shown, but that does not change the time it takes to manually refresh.
If I press "refresh" it takes about 23 seconds until the screen is shown again.
Then, why does OpServer not refresh automatically? Do I need to configure something more??
If I run it locally on my PC, configured to some other SQL Server database servers, the refresh works and the manual refresh is quite fast. I cant test it with the same cluster servers on my local machine due to some multi domain configuration and firewall settings, which are not in my responsibility...
Does any one have an idea why I don't get an automatic refresh and why the manual refresh takes so long?
Thanks

Related

SQL Server 2008 SP2 - Object Explorer Hangs During Actions or While Expanding

I am running an SQL Server 2008 SP2 instance on my work desktop. Recently, after a power outage, I began having issues with the Object Explorer pane (from both local and remote connections). I can query against the databases fine using T-SQL, but if I attempt to initiate any actions using the Object Explorer (Import Data, Update Linked Server, run SQL Agent job), SSMS hangs and I am forced to close the application using Task Manager. Until I reboot the server instance, the Object Explorer will hang indefinitely upon connecting. When it hangs, there doesn't seem to be any unusual network or resource utilization and SSMS.exe does not show the typical "not responding" during a freeze.
The server only hosts data for my own projects, so it isn't anything truly business-critical. As such, downtime is not a real issue. I encounter this hang when accessing the server locally and remotely, so I don't think it's just my SSMS copy. I do have all of the databases backed up, so if necessary I can restore on a new instance (if the issue is corruption), but I wanted to check if anyone had encountered this.
There are three linked servers (2 Oracle, 1 Postgres).
Try executing ssms.exe-log filename and see if you get any more info.

IP Access to SQL Server

We have a Windows VPS server using SQL Server 2005 for our e-commerce site.
A while back we were suffering from attempts to access the database remotely so someone made changes so that only the IP of the server itself could access data. That was about 18 months ago and everything has been fine since.
However, we now have a second site (hosted on another VPS) that needs to access the same database and I can't get in contact with the person who made the original changes.
I know he was working in the SQL Server Management tool when he made the changes, can anyone point me in the correct direction.
Thanks.
SQL Server 2005 came locked down by default. Rather than SSMS, it also installs the SQL Server 2005 Surface Area Configuration tool, which has a Remote Connections setting where you can limit it to Local connections only.
You may also like to check any firewall on the server, which will have to allow Port 1433 (or different if changed from the default) TCP access from whichever machines you want to access it.
He might have turned the TCP/IP protocol off. In this case only the localhost can access the database. This link describes the procedure for sql server express, but the idea is the same

MS Access 2003 + linked tables to SQL Server 2005 + Windows Authentication = slow

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

Question regarding getting exclusive access to SqlServer database for restoring

Here's my problem: I have an application which uses sql server express 2005, and it is installed under default sql server express instance, SQLExpress
Under this instance there are several other databases, used by other applications (web based or desktop)
If I need to restore the database, sometimes it works, but sometimes it fails, telling that I need exclusive access to database to do this. I understand that, and of course when I try to restore, the application using the db is closed, but probably it was just closed minutes before so sql server still keeps some connections open, for caching purpose.
And in this case I have two options:
restart the sql server instance -
that's easiest to do from user point
of view(right click on server
connection in Enterprise Manager and
select restart (but worst since this
stops all databases)
Detach my db, attach again then restore (this works because detach
have option to close all
connections). But this is harder to
do (takes more time) since I have to
browse through the folders to find
where db is located to attach back (I
keep all db's in a custom location,
not under default sql server database
location)
My question is, is there any other easier way to do this?
Thanks
In SQL server Management Studio (not sure about Express, I'll check) you can use the Activity Monitor under Management to locate any connections still open to the database. Right-click the connection and choose 'Kill'
This way you can clear any outstanding connections.
[EDIT] I've checked a SQL server Express, and it also contains the Activity Monitor.
Alternatively you can use a script to close all connections. See here for an example.

SQL Server Browser showing only hostname, not instance name

I just setup a new Windows Server 2008 machine with an instance of SQL Server 2008 Express. The SQL Browser service does not appear to be working correctly. In Management Studio, browsing for servers shows the hostname of the new server, but not the instance name. When you choose the hostname form the list it doesn't connect. But I can connect manually by typing the hostname\instancename combination.
update 1:
The browser service is running, and I have tried it with several different accounts, including domain administrator which is a bad practice, but I tried anyway for troubleshooting purposes.
I have tried punching the appropriate holes in the firewall, and also completely turning the firewall off.
This is running on a Hyper-V, Windows Server 2008 32 bit guest, which is on a Windows Server 2008 64-bit host. I have done this before (without issues) on this same host, but with SQL 2008 Standard instead of Express.
When I browse for the server in SSMS(Express) on the SQL Server machine, it works fine and shows the whole instance name. When I browse for it on a remote machine (on the same intranet) with SSMS (standard) it just shows the host name.
update 2:
Followed the packets as suggested and found the following
The client sent the broadcast as expected and received correct responses from other SQL Servers on the same network.
The server received the broadcast but did not send a response.
Considering these results, I wonder why the host name ever appears in the client list in the first place. It shouldn't show up at all, right?
update 3:
Spent an hour and a half on the phone with Microsoft support. I learned a few things, but the problem is not yet solved. It was suggested that I try installing an instance of SQL Standard on the same machine. I did that and the new instance exhibits all the same symptoms. The hostname shows up in the browse list only once, not once for each instance.
update 4:
Stackoverflow chose an answer for me thanks to the bounty system, but this question is not answered. Today I tried moving the whole VM to a different host server - everything is exactly the same. The hostname still appears in the browse list, without the instance name.
update 5:
Confirmed that Hyper-V Integration Services are installed on the guest (SQL) server.
check that the browser service is running, it's not turned on by default.
UPDATE1: See if you can install Network Monitor/Wireshark to do a network trace on the SQL Server to see if it's receiving the broadcasts and sending responses. I think this is your best option in troubleshooting this issue. According to MSDN the service uses UDP port 1434, so this is the traffic to watch.
UPDATE2: Does the server have multiple IP's? according to this MSDN article the Windows Server 2008 firewall has issues responding to SQL Browser service broadcasts, even with rules allowing packets through.
I tend not to rely on browsing. You'll get inconsistent results because browsing sends out a broadcast udp/1434 packet and waits for responses back. However, since you are able to connect remotely via SERVERNAME\INSTANCENAME, that aspect of the SQL Browser service is working. If it wasn't, you wouldn't have been able to connect. With that said, to troubleshoot the browsing portion:
Have you tried stopping and restarting the SQL Browser Service?
Have you tried stopping and restarting the instance if that didn't work?
To completely troubleshoot this, unfortunately, you'd have to do packet traces.
Sounds like the browsing service is messed up somehow...
I don't know if you can temporarily take this SQL Server down temporarily. But if so, you may want to try this:
Uninstall all SQL\instances completely.
Run the install of SQL Express 2008
Create a default instance during install (Not a named instance)
Run the installer again and create the default named instance (SQLExpress)
Try connecting to the named instance again. If it works, you can remove the default instance.
I had the same issue in a VM. After shutting down the Firewall it worked.
I just had this same issue. I was not able to see Instance Names in the SSMS Network Servers tab. It turned out that I had set up Hyper-V and created an Internal Network on my local machine. That network was identified as a Public/Guest Network and the Windows Firewall was ENABLED for it, even though my Domain setting has the Firewall DISABLED. Once I disabled that guest network on my computer I could see all the instances.
Machines:
Physical SQL Server 2014 Ent
Windows 8.1 laptop running Hyper-V

Resources