IT Community - Software Programming, Web Development and Technical Support

Sql server 2005 Database Maintenance

This is a discussion on Sql server 2005 Database Maintenance within the Server Management forums, part of the Servers and Hosting category; Hi All, i am looking through the data files directory for my databases and noticed that the log (ldf) files ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Servers and Hosting > Server Management

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 10-25-2007, 05:43 AM
arjkhanna arjkhanna is offline
D-Web Incredible
 
Join Date: Mar 2007
Posts: 1,949
arjkhanna is on a distinguished road
Default Sql server 2005 Database Maintenance

Hi All,

i am looking through the data files directory for my databases and noticed that the log (ldf) files of some of the databases are from 2GB to 4.5GB where as the data files are under 500MB. If I shrink the log files what affect does this have on the database? Should I be setting up regular shrink jobs on the log files?
__________________
A.Rajesh Khanna
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 10-26-2007, 04:29 AM
JSureshkumar JSureshkumar is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Location: in someone's heart
Posts: 139
JSureshkumar is on a distinguished road
Send a message via Skype™ to JSureshkumar
Default Sql server 2005 Database Maintenance

This is a common issue and its been discussed again and again.

check this thread


http://www.discussweb.com/server-man...ql-2005-a.html
__________________
J Suresh Kumar
Google Hacks
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 10-29-2007, 01:44 AM
arjkhanna arjkhanna is offline
D-Web Incredible
 
Join Date: Mar 2007
Posts: 1,949
arjkhanna is on a distinguished road
Default Sql server 2005 Database Maintenance

Hi jsureshkumar,

Thanks for that. Just a few questions.

My Data file is 1148MB. The log file is 2537MB. The recovery model is full. The log file has never been backed up.

Just to confirm. Should I :

1. Backup the log file

2. Truncate the log file

3. Shrink the log file

4. Do a Full backup.

5. Schedule regular log backups.

Currently a full backup is run every night. I am using SQL 2005.


Thanks for your help in advance.
__________________
A.Rajesh Khanna
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 10-30-2007, 10:11 AM
JSureshkumar JSureshkumar is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Location: in someone's heart
Posts: 139
JSureshkumar is on a distinguished road
Send a message via Skype™ to JSureshkumar
Default Sql server 2005 Database Maintenance

Hi,

Do you want POINT IN TIME Recovery of your database? If you need , then keep the full recovery model otherwise you can switch to Simple. If you are in full recovery model , then you should have a job which does TL backup at regular interval. Frequency is again depends upon the growth.

1. Backup the log file : Instead take Full Backup not TL backup

2. Truncate the log file : Yes

3. Shrink the log file : Yes

4. Do a Full backup. : Yes, coz otherwise the backup chain breaks

5. Schedule regular log backups.: Yes
__________________
J Suresh Kumar
Google Hacks
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server 2000 migration to SQL Server 2005 Collation Change - Method? arjkhanna Database Support 5 10-02-2009 09:58 PM
Unable to save string data into a table in SQL Server 2005 database tskmjk VB.NET Programming 0 10-07-2008 03:12 AM
Server Assessment for Sql server 2005? arjkhanna Server Management 3 10-30-2007 10:09 AM
How to Move a database in SQL 2000 to 2005 ? nnraja Server Management 2 10-29-2007 12:08 AM
What is a Linked Server in sql server 2005? Archer Database Support 2 08-14-2007 03:24 AM


All times are GMT -7. The time now is 08:02 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0