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
»
Older Versions of SQL (v6.5, v6.0, v4.2)
»
Older Versions of SQL (v6.5, v6.0, v4.2)
»
How do I shrink log files in SQLServer 7.0
How do I shrink log files in SQLServer 7.0
Rate Topic
Display Mode
Topic Options
Author
Message
Cobra-1032610
Cobra-1032610
Posted Monday, March 23, 2009 6:03 AM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, July 08, 2009 11:46 PM
Points: 9,
Visits: 50
Hi guys,
I'm trying to shrink log files in SQL Server 7.0. where I couldn't find an option similar to 2000 or 2005! Please tell me how do I go ahead in Enterprise Manager. Also, tried my hand with DBCC ShrinkFile, but nothing seems to be happening when I run the SQL statement, it just returns the following values:columns "'DbId,FileId,CurrentSize,MinimumSize,UsedPages,EstimatedPages"
Help me guys!!
Thanks in advance!
Post #681343
george sibbald
george sibbald
Posted Monday, March 23, 2009 7:58 AM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 12:30 PM
Points: 5,269,
Visits: 11,205
I cannot remember if there was an option to shrink files via EM in SQL 7 as I always did it via QA. If there is is I would think its right click the databases then under tasks.
The result you received from dbcc shrinkfile is the result you will always get. If the file did not shrink it is because the last virtual log file is used (see BOL for info on this)
to see it it is used run dbcc loginfo(dbname), a value of 2 in the status field means the virtual log is used, so check to see the value in the last row returned.
You will need to cycle this out, best way is to backup the log, sometimes just running the shrink twice does it.
the shrinkfile command should look like this
dbcc shrinkfile(logicallogfilename,size) where size is in MB
All the above is for info only. If you are ok on disk space don't bother to shrink the log file. If this is a one off shrink because its blown up after a one off job, just shrink it to a size it will need to be to support normal functionality.
---------------------------------------------------------------------
Post #681445
Cobra-1032610
Cobra-1032610
Posted Monday, March 23, 2009 10:52 PM
Forum Newbie
Group: General Forum Members
Last Login: Wednesday, July 08, 2009 11:46 PM
Points: 9,
Visits: 50
Thanks for the reply brother!!
DBCC Loginfo() did return a value 2 in the status field in the last row.
So I guess, shrinking the TLog is possible only when the active part of the TLog is at the beginning of the log file, whereas here it is at the last!!
Okie Dokie!! I'll see if I can release space by deleting some temp data.
Thanks again for your advice!
Post #682054
george sibbald
george sibbald
Posted Tuesday, March 24, 2009 3:35 AM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 12:30 PM
Points: 5,269,
Visits: 11,205
Cobra,
what do you mean by this?
Okie Dokie!! I'll see if I can release space by deleting some temp data.
deleting data in the database itself wont wrap round the log file, you need to actually backup or truncate the log file, then shrink. If you truncate the log take a full backup afterwards.
---------------------------------------------------------------------
Post #682157
« 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.