Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Backups
»
'Recovering' state of database
'Recovering' state of database
Rate Topic
Display Mode
Topic Options
Author
Message
viduvs
viduvs
Posted Friday, October 09, 2009 2:35 AM
SSC Rookie
Group: General Forum Members
Last Login: Monday, October 29, 2012 4:10 AM
Points: 34,
Visits: 262
I am using SQL Server 2005.
It has multiple databases (more than 1500) created.
We have set auto_close option of these databases set to 'true' and recovery model to 'simple'.
I could see many databases come in this 'recovering' mode for a fraction of second and then go out of this state. Some different set of databases come again in this 'recovering' set for fraction of second and then come to normal state.
This is happening with multiple databases continously, different set of databases each time.
No database is remaining in 'recovering' state for more than a second.
(I could see 'recovering' against database in sql server management studio.)
When I checked the output of sys.databases multiple times, i could see value 0 for column 'is_cleanly_shutdown' for different set of databases each time.
I could see in the logs follwing entries continously for nearly all databases:
CHECKDB for database <database_name> finished without errors on <date time>. This is an informational message only; no use action is required.
<date time> here shown is much older (nearly 1 month old) compared to when we are getting the log entries.
Can anybody please tell me why this is happening?
Also I would like to know what happens when database gets shut down.
How can any database get into recovering mode automatically?
Can "backup log <db_name> with truncate_only" option could compel db to go in recovering mode automatically for few seconds?
Post #800577
Jack Corbett
Jack Corbett
Posted Friday, October 09, 2009 7:59 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 1:41 PM
Points: 10,613,
Visits: 11,952
I'm going to venture a guess here. You are seeing recovering as a the status every time a database is re-opened. When SQL Server starts up a database it has to make sure it is in a transactionally consistent state, so when you restart a SQL Server you see entries like this in the WIndows Event Log:
Event Type: Information
Event Source: MSSQLSERVER
Event Category: (2)
Event ID: 17137
Date: 10/8/2009
Time: 5:28:58 PM
User: N/A
Computer: computer name
Description:
Starting up database 'database name'.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
So my guess is that the same thing is happening when a database is re-opened. The difference being that you can't see that the DB's are in recovering status when you restart a SQL Server because you can't connect to master and query it.
FYI - autoclose really should be turned off. It seriously slows down access the database. Also you should NEVER truncate transaction logs you should manage them. Here a couple of links about why:
Managing Transaction Logs
Importance of Proper Transaction Log Size Management
Jack Corbett
Applications Developer
Don't let the good be the enemy of the best. --
Paul Fleming
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #800758
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.