Huge Errorlog with SQL Server 2005 Express (15GB) - sql-server

With SQL Server 2005 Express (obeserved on XP and Server 2003), I get sometimes huge Error logs files in production:
The file C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG grows to fill the disk (file size becomes more than 15 GB).
This file is not the transaction log, just the error log : a text log for SQL Server.
The error log starts like this: (seems to be normal)
2009-01-11 09:16:57.04 spid51 Starting up database 'SDomain'.
2009-01-11 10:04:34.21 spid21s SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due
to some database maintenance or reconfigure operations.
2009-01-11 10:04:34.23 spid21s SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'SQL Plans' cachestore (part of plan cache) due to
some database maintenance or reconfigure operations.
2009-01-11 10:04:34.23 spid21s SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due t
o some database maintenance or reconfigure operations.
2009-01-11 10:08:37.32 spid51 Starting up database 'SDomain'.
2009-01-11 10:56:55.48 spid22s SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due
to some database maintenance or reconfigure operations.
2009-01-11 10:56:55.49 spid22s SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'SQL Plans' cachestore (part of plan cache) due to
some database maintenance or reconfigure operations.
2009-01-11 10:56:55.49 spid22s SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due t
o some database maintenance or reconfigure operations.
2009-01-11 11:00:07.51 spid51 Starting up database 'SDomain'.
2009-01-11 11:47:44.73 spid15s SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due
to some database maintenance or reconfigure operations.
2009-01-11 11:47:44.74 spid15s SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'SQL Plans' cachestore (part of plan cache) due to
some database maintenance or reconfigure operations.
2009-01-11 11:47:44.74 spid15s SQL Server has encountered 1 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due t
o some database maintenance or reconfigure operations.
Then the file seems to contain endlessly repeating lines like this:
2008-12-17 00:12:24.03 spid13s The log for database 'SDomain' is not available. Check the event log for related error messages. Resolve any errors and restart the database**
FYI, the windows eventlog contains exactly the same messages.
Any idea of the reason why this problem occurs? Could it be a particular issue of configuration of SQL Server? Or an issue in code causing this?

You have a database named SDomain that is set to auto-close. Whenever is accessed, it is 'started'. Recently you, or someone near you, deleted or moved the LDF file of the database. When the process that is accessing the SDomdain database is trying to open it, SQL Server will complain about the problem in the ERRORLOG. Give the database back its LDF and will stop complaining. Execute sp_cycle_errorlog to start a new ERRORLOG file so you can delete the old one.

Maybe this can help? http://support.microsoft.com/kb/917828

The common reasons why a database would start recovering on its own are:
The SQL Service was shutdown from the Service Control Manager or due a server shutdown
A fatal error occurred on the database which forced SQL Server to shut down the database and recover it
Someone manually initiated a recovery on the database using RESTORE WITH RECOVERY command
A database backup was restored onto the database
During this phase your database will not respond to any user requests. Only once the recovery phase is complete will the database be accessible to users.
To find out why this happened you might want to check the SQL Server ERRORLOG and find out what find right before the recovery started on the database. Any fatal errors or database restore operations would be logged in the SQL Server ERRORLOG.
Also check if Auto Close option is enabled for your database. If thats true you need to turn off that option as follows,
Right click the database.
Select Properties
Click on Options.
AutoClose is the first option and ensure that it is marked as False.

Ensure user account servername\SQLServer2005MSSQLUser$servername$SQLEXPRESS has write access to the directory that your database is residing in.

Related

I have a backup error on SQL SERVER 12, how can i solve

I have a backup issue in sql server. Backup plans are stopping working in first step of backup job.
this is the error description
Backup.LOG,,,The job failed. The Job was invoked by User sa. The last step to run was step 1 (LOG)
Server is have 500 gb of free storage. There is no disk error or low memory warning.
i have checked backup plans and checked if there is a read only protection on the disk but there isnt.
Solved it. Job Activity monitor is not detailed and it says only "An error occurred". I found the error in this directory:
C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\Log
One of the databases are offline and SQL Server can't back it up. I deleted the offline database from the backup settings and it's working.

Error in Restoring backup to secondary database using log shipping

I'm trying log shipping between two SQL VMs. The backup is getting generated properly but its not getting restore on secondary database. The error says that the restore job is not able to open the .bak file of the database.
Below are the error details:
TITLE: Microsoft SQL Server Management Studio
------------------------------
SQL Server Management Studio restore database 'TestDB1'
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (SqlManagerUI)
------------------------------
Cannot open backup device '\\vm-p\NetworksharepathTlogs\TestDB1.bak'. Operating system error 5(Access is denied.).
RESTORE FILELIST is terminating abnormally. (Microsoft SQL Server, Error: 3201)
There were 3 sections when configuring log shipping so the first step that was primary backup setting was successful. And backup got generated in the folder. I have given full control to the users involves read, write ,etc. But still my log shipping is failing coz of this error.
In second step of log shipping two actions were performed one was restoring database to secondary server and other is saving secondary destination configuration . So I separately run the jobs and found that restoring database to secondary is causing an issue. This error is thrown on that step failure.
Please help me to solve this issue.
Thanks in advance.

SQL Server crash

I had SQL Server 2016 in one of our servers, then I decided to install SSIS AND SSAS for Bi purpose, and I tried to install these two services (SSAS AND SSRS) in another instance.
After installing the second Instance, I noticed that: I can't connect to the first instance SQL databases (It has been somehow replaced by the second instance).
I get this message when I connect to database:
I get this message while restarting the service:
In SQL Server configuration manager there no service for the first Instance:
That's the last records in my SQL log file:
2020-08-23 14:46:11.87 Backup RESTORE DATABASE successfully processed 96898 pages in 21.859 seconds (34.631 MB/sec).
2020-08-23 17:35:02.25 Server SQL Server is terminating because of a system shutdown. This is an informational message only. No user action is required.
2020-08-23 17:35:02.32 spid12s Always On: The availability replica manager is going offline because SQL Server is shutting down. This is an informational message only. No user action is required.
2020-08-23 17:35:02.53 spid40s Service Broker manager has shut down.
2020-08-23 17:35:02.53 spid40s Error: 17054, Severity: 16, State: 1.
2020-08-23 17:35:02.53 spid40s The current event was not reported to the operating system error log. Operating system error = (null). You may need to clear the operating system error log if it is full.
2020-08-23 17:35:02.53 spid12s .NET Framework runtime has been stopped.
2020-08-23 17:35:09.04 spid12s [INFO] Database ID: [18]. Cleaning up StorageArray. LastClosedCheckpointEndTs: '55'
Questions:
How can I get back to my previous state of SQL Server (the mdf and ldf files exist in their location but I can't find masterdb files)?
Is there a way to restore users and SQL jobs?

Steps to migrate Azure DB from PAAS to On premise or IAAS

My organisation has taken a decision where i am asked to move the complete application along with Databases from azure PAAS to Google IAAS or on Premise architecture.
I had installed sql server 2016 and tried to restore a DB after taking back up from azure to On premise sql server and it got successfully restored. The .bacpac file size was 500MB. I used import functionality of the sql server to restore the Azure DB. How ever when i tried restoring the DB with .bacpac file size of 2 GB i got below errors:
Error SQL72016: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated.
Error SQL72045: Script execution error. The executed script:
/*
Data is bulk loaded at this point in deployment execution
*/
(Microsoft.SqlServer.Dac)
ADDITIONAL INFORMATION:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated. (Microsoft SQL Server, Error: -2)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=13.00.1400&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476
The wait operation timed out
I tried finding some knowledge doc to migrate DB from Azure PAAS to IAAS or on premise but couldn't find any.
Need help on this.
P.S. All my azure DB are on V12.
Its due to migration take long time, Please use SQL Database migration wizard, which can break data and schema transfers into multiple operations.
please refer this link: http://sqlazuremw.codeplex.com/documentation

No transaction active Error message in a distributed transaction while MSDTC is enabled

I have a linked server from server1 to server2.
server1
operating system: windows server2003 sp2
SQL server: SQL server 2008 R2
server2:
operating system: windows server2003 R2
SQL server: SQL server 2k Sp3
MSDTC is enabled on both pcs, but when I have such a distributed transaction I encounter following error:
set xact_abort on
begin distributed transaction
select * from linkedserver1.DbWorkshops.dbo.tbl_Workers
commit
Error message:
OLE DB provider "SQLNCLI10" for linked server "Linkedserver1" returned message "No transaction is active.".
Msg 7391, Level 16, State 2, Line 3
The operation could not be performed because OLE DB provider "SQLNCLI10" for linked server "Linkedserver1" was unable to begin a distributed transaction.
It could be permissions or a firewall issue.
See Troubleshooting MSDTC issues with the DTCPing tool
In Linked server transactions, MSDTC tries to communicate with the dns addresses, not the ip address of the servers. Therefore, it is necessary to make the necessary configuration in the host file of the servers. It took me a lot of time and that's how we figured it out.

Resources