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 2008
»
SQL Server 2008 Administration
»
database log file
database log file
Rate Topic
Display Mode
Topic Options
Author
Message
sqlfriends
sqlfriends
Posted Tuesday, December 04, 2012 6:30 PM
SSCommitted
Group: General Forum Members
Last Login: 2 days ago @ 4:55 PM
Points: 1,597,
Visits: 2,770
If a database is setup to readonly and in simple recovery mode.
Will the log file grow or not?
thanks
Post #1392760
Lynn Pettis
Lynn Pettis
Posted Tuesday, December 04, 2012 6:48 PM
SSC-Insane
Group: General Forum Members
Last Login: Today @ 8:34 AM
Points: 21,588,
Visits: 27,385
It shouldn't since you can't run insert, update, or delete statements. In addition you can't update the statistics or reorganize or rebuild indexes.
Lynn Pettis
For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here
or
when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here
and
here
Managing Transaction Logs
SQL Musings from the Desert
Fountain Valley SQL
(My Mirror Blog)
Post #1392763
Bhuvnesh
Bhuvnesh
Posted Wednesday, December 05, 2012 3:21 AM
SSCrazy
Group: General Forum Members
Last Login: Tuesday, March 26, 2013 8:41 AM
Points: 2,562,
Visits: 3,451
sqlfriends (12/4/2012)
If a database is setup to readonly.
Will the log file grow or not?
thanks
NO
sqlfriends (12/4/2012)
If a database is setup in simple recovery mode.
Will the log file grow or not?
thanks
Yes
-------Bhuvnesh----------
While 1 = 1 (Learning SQL....)
Click to get fast response of your post
Post #1392881
sqlfriends
sqlfriends
Posted Wednesday, December 05, 2012 4:17 PM
SSCommitted
Group: General Forum Members
Last Login: 2 days ago @ 4:55 PM
Points: 1,597,
Visits: 2,770
So if a database is set to read only , and by just querying the database, it won't create any log transactions, so no affect on log file, is that correct?
Thanks,
Post #1393262
George M Parker
George M Parker
Posted Wednesday, December 05, 2012 4:30 PM
Mr or Mrs. 500
Group: General Forum Members
Last Login: Thursday, May 09, 2013 1:13 PM
Points: 516,
Visits: 1,004
sqlfriends (12/5/2012)
So if a database is set to read only , and by just querying the database, it won't create any log transactions, so no affect on log file, is that correct?
Thanks,
That is correct. You can confirm that using fn_dblog(null,null).
USE [master]
GO
ALTER DATABASE [DBA_Rep] SET READ_ONLY WITH ROLLBACK IMMEDIATE
GO
SELECT * FROM fn_dblog(null,null)
Returned 3 transaction log records in my development environment
SELECT * FROM dbo.Backup_History
SELECT * FROM fn_dblog(null,null)
Returned the same 3 transaction log records
Post #1393265
GilaMonster
GilaMonster
Posted Thursday, December 06, 2012 1:52 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 8:44 AM
Points: 37,645,
Visits: 29,898
sqlfriends (12/5/2012)
So if a database is set to read only , and by just querying the database, it won't create any log transactions, so no affect on log file, is that correct?
Selects are never logged, in any recovery model in any database setting. Database changes are what are logged. A read only database can't be changed and hence won't get any log records.
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 #1393371
sqlfriends
sqlfriends
Posted Thursday, December 06, 2012 12:29 PM
SSCommitted
Group: General Forum Members
Last Login: 2 days ago @ 4:55 PM
Points: 1,597,
Visits: 2,770
Thanks much, that helps
Post #1393701
« 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.