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 7,2000
»
Administration
»
auto_close
auto_close
Rate Topic
Display Mode
Topic Options
Author
Message
pedro.ribeiro
pedro.ribeiro
Posted Sunday, May 31, 2009 9:29 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Sunday, May 31, 2009 10:19 AM
Points: 103,
Visits: 982
Hi masters,
What does the option auto_close do exacly?
tks,
Pedro
P.s is it good to have the database in a oltp enviroment with this option on?
Post #726337
GilaMonster
GilaMonster
Posted Sunday, May 31, 2009 9:45 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 2:00 AM
Points: 37,651,
Visits: 29,904
Books online says this:
When set to ON, the database is shut down cleanly and its resources are freed after the last user exits. The database automatically reopens when a user tries to use the database again.
It's a very bad idea to have it on on any database that's used a lot. Ok on something that's used maybe once a week or once a month, but if it's used a lot then anytime SQL closes the database it will have to open it again a few seconds later.
Closing a database flushes the data and procedure cache so, not only does the first query after the DB is closed have to wait for it to be brought online again, but queries will be slower than normal for a bit while the data cache is repopulated and queries and procedures are recompiled.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #726340
pedro.ribeiro
pedro.ribeiro
Posted Sunday, May 31, 2009 9:51 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Sunday, May 31, 2009 10:19 AM
Points: 103,
Visits: 982
ok.
But when is the database closed? every time the database as no query's for how much time?
Post #726344
GilaMonster
GilaMonster
Posted Sunday, May 31, 2009 9:53 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 2:00 AM
Points: 37,651,
Visits: 29,904
As I said
When set to ON, the database is shut down cleanly and its resources are freed
after the last user exits
. The database automatically reopens when a user tries to use the database again.
So, when the last connection using that database disconnects.
Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #726346
pedro.ribeiro
pedro.ribeiro
Posted Sunday, May 31, 2009 9:58 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Sunday, May 31, 2009 10:19 AM
Points: 103,
Visits: 982
thank you very much, i understud
Post #726348
« 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.