laptop hibernation mode, sql express and data corruption - sql-server

We recently got a corruption problem (error 824) from a database hosted in sql server express 2005 on a latop configured to use hibernation (windows xp). I do not have access to this laptop yet to perform disk tests.
Is there any known problems using hibernation mode and sql server express on laptops?
Thanks a lot.

I've seen it mentioned rarely (not being able to create new connections after coming out of hibernation, I think it was).
I have a similar setup, although I'm now using the 2008 version, and I routinely (every single day, basically) send my machine to hibernation mode at the end of the day, and have not seen a similar problem.
I'd start with the event log (system and application) and see if you notice anything related to file or IO errors at the time you sent it to hibernate, or when SQL server was trying to start.

Related

Significant performance differences between Access on Windows Server 2008 R2 and Windows Server 2019

In our company we have to support a large legacy system built on Microsoft Access 2010 as frontend and SQL Server 2008 R2 as backend. The backend SQL server runs on Windows Server 2008 R2. Currently our users works on Terminal Server sessions on a Windows Server 2008 R2. A couple of days ago we started to test Windows Server 2019 and Notebooks with the latest version of Windows 10. We recognized a big performance difference while executing the same Access databases on the different environments.
For instance the creation of a report takes 27 seconds (new environment) instead of 7 seconds (old environment). The database.accdb is identical, the backend is identical (still Windows 2008 R2 Server with SQL Server 2008 R2 and SP2), only the execution environment (Windows) changed.
Does anyone of you have an idea how to explain this?
In Access 2010 the SQL server tables are linked using System-DSN data sources. On the old environment ODBC is used (Driver: SQL Server, Version: 6.01.7601.17514).
On the new environment I tested the following drivers:
ODBC Driver 11 for SQL Server (2014.120.5543.11)
ODBC Driver 17 for SQL Server (2017.173.01.01)
SQL Server (10.00.17763.01)
SQL Server Native Client 10.0 (2009.100.4000.00)
SQL Server Native Client 11.0 (2011.110.5058.00)
I created a new System-DSN using the different drivers and updated the linked tables in Access. But in any case the performance is still bad. I also tested the latest version of Access which comes with Office 2019, but again it is slow.
Sounds like your terminal sessions are getting throttled. Despite the fact that you have a SQL Server back end, Access is still doing a fair bit of thunking with the result sets, so any resource throttling differences between your Server 2008 and Server 2019 policies could be choking Access in the new server.
I think your answer is going to be found in Windows System Resource Manager. The page says it's not being maintained, but following the "Recommended Version" link leads to a generic Server 2019 page. Here's another article about how WSRM might be throttling sessions: Using WSRM to control RDS Dynamic Fair Share Scheduling.
Compare the Weighted_Remote_Sessions policy in 2008 and 2019 servers. There's either been a change to the default settings or behavior or the 2008 server policy was modified in the past to get to the current performance level.
Ok, a number of things to check.
First thing to check:
Launch the ODBC manager and check if SQL log tracing is on. I don’t know why, but I see sql logging turned on.
You NEED to be 100% sure it is turned off.
You MUST launch the ODBC manager from the command line or start menu, since the one in the control panel is for the x64 bit version, and you are using Access x32 (I assume).
So launch this version:
c:\Windows\SysWOW64\odbcad32.exe
So VERY important to launch the x32. It is assumed you are using a FILE dsn. So check these two settings:
(Make sure they are un-checked).
Next up?
Link access using the IP address of the sql server.
So, place of say:
myServer\SQLEXPRESS
Use:
10.50.10.101\SQLEXPRESS
(Of course use the IP address of sql server, not the above “example” IP).
The above things are quite easy to check.
Still no performance fix?
Then disable the fire wall on your new Terminal server (I seen this REALLY cause havoc).
And, disable windows defender on the new TS server if running.
The above tips should fix your issues.
If above don’t work, then next would be to check the priority settings for the TS server (GUI over server).
However, I am betting the above checks should restore your performance.

How to prevent stopping SQL Server instance after a while?

I have SQL Server 2014 Express installed in a firm with my C# application. Every once in a while, when the app isn't used for some time, the SQL Server instance stops. And I have to go there, enter the services and manually start it. After that it works just fine.
How can I prevent this?
I have set the startup type for my SQL Server service to Automatic.
Should I maybe try to set it to Automatic(delayed start)?
The machine that the SQL Server is installed on is running Microsoft Server 2012.
And for now it is not connected to the internet, it's only in LAN.
So I guess the thing with the updates is not the problem, because the machine is not on the internet.
This is the exception that is thrown:
Looks like you're just dealing with default behavior for user instances. Databases will auto close and engine auto shuts down after x minutes. You can extend this by changing the configuration option "user instance timeout". Details can be found at User Instances for Non-Administrators Look for the administration section with detailed scripts for showing and changing the configuration option. You should also check out Lifetime of a User Instance Connection for more details.
This was originally intended to conserve resources that are typically scarce for SQL Express usage scenarios. Quite a bit has changed since the time this was designed. Also, with Developer edition download being free now, you should seriously evaluate your use of Express to see if Developer edition is the better solution for you. Even if it's purely for local use (within your machine) for dev/test purposes, if it will eventually be deployed to a SQL Server in production, you really should use Developer edition instead of Express. If you'll only even run in Express then go ahead and make the tweaks in the paragraph above.

Get List of network SQL servers back

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.

Is SQL Server Installation 2008 Express reliable enough to replace MS Access?

I have tried to install SQL Server Express 2008 on several pcs of different brands. I have no luck or what: nearly each time I get something which prevents it from installing.
Just now I got "Performance counter registry hive consistency check" failed and solution is overwelmingly complex http://support.microsoft.com/kb/300956.
How can one choose SQL Server Express 2008 as a local pc database vs MS Access as a good choice for selling an application knowing that clients risk to encounter such unsolvable problem for most of them as they are not even expert users ?
Why do so many people push for SQL Server ? Is it really objective ?
As a User myself, I have downloaded many softwares which uses SQL Server Express 2008, since I can't install, I just gave up, I won't even complain because I fear most often they wouldn't even bother (and registering for support is always a hassle). That is companies are losing potential clients without even knowing it !
If you just want a local database that you can distribute with your application, do you really need the full-blown SQL Server Express, which needs to be installed?
I think an embedded database (SQL Server CE, SQLite...) is what you need.
They don't require any installation at all, you just have to distribute a few assemblies with your application.
Run the SQL Server 2008 installer again and complete these steps.
I exported the 009 tree with regedit to Perflib.reg
Opened the Perflib.reg in Notepad
Replaced "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009]" to "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\013]"
Save the file
Finally double click the Perflib.reg file.
This should work, you can find more here.

SQL CE Merge Replication: Error 28532: A read operation from the transport returned no data

I am using sql server 2005 and ce framework 3.5 and attempting to use merge replication between my hand held and my sql server. I am getting the following error:
Error 28532 : A read operation from the transport returned no data.
The version of SQL Server Compact 3.5 Client Agent and SQL Server Compact 3.5 Server Agent should match.
I am finding little to no information on the net. Can anyone tell me either how to check the versions of Server Compact 3.5 Client Agent and SQL Server Compact 3.5 Server Agent or any steps i can take to resolve the issue ?
Thanks Loads
Cheryl
This is (probably) unrelated to your specific error, but in general merge replication between SqlCE and SQL Server is unreliable in situations where network connectivity is frequently lost (e.g. over wireless or worse, over cell phone networks), and can lead not just to lost data but to bizarrely corrupted data on the server. This problem has not (to my knowledge) been fixed in SqlCE 3.5.
MS does not advertise this, of course, although after a long struggle to diagnose the problem, their tech support finally acknowledged the problem and said SqlCE replica DBs were guaranteed to merge eventually (i.e. if you try to sync up enough times, it will eventually work correctly).

Resources