Solved

database admin

Posted on 2012-04-03
6
235 Views
Last Modified: 2012-04-17
Can you guys give me some advice on backing up – clearing log files – rebuilding indexes.

In the past I have used maintenance plans but doing a bit of reading people say they are not really efficient.

Is this the case?
0
Comment
Question by:aneilg
6 Comments
 
LVL 17

Accepted Solution

by:
k_murli_krishna earned 133 total points
ID: 37800262
Go through the following:

A) Backup & Restore

SQL Server 2000 Backup and Restore
http://technet.microsoft.com/en-us/library/cc966495.aspx
Back Up and Restore of SQL Server Databases
http://msdn.microsoft.com/en-us/library/ms187048.aspx
Backup Overview (SQL Server)
http://msdn.microsoft.com/en-us/library/ms175477.aspx
SQL Server 2005 Backups
http://www.simple-talk.com/sql/backup-and-recovery/sql-server-2005-backups/

B) Clearing Log Files

How do you clear the transaction log in a SQL Server 2005 database?
http://stackoverflow.com/questions/56628/how-do-you-clear-the-transaction-log-in-a-sql-server-2005-database
How Can i clear log file in MS SQL SERVER 2005 Express Edition SP2
http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/5e9bfe22-24a4-4600-b735-73603841906f/

C) Rebuilding Indexes

Reorganize and Rebuild Indexes
http://msdn.microsoft.com/en-us/library/ms189858.aspx
Reorganise index vs Rebuild Index in Sql Server Maintenance plan
http://stackoverflow.com/questions/7579/reorganise-index-vs-rebuild-index-in-sql-server-maintenance-plan

You are correct. Following maintenance plans is somewhat inefficient. Instead, it is better to use in-built OR third party tools & instead even better use T-SQL OR DBCC operations. Cheers.
0
 
LVL 25

Assisted Solution

by:Lee Savidge
Lee Savidge earned 132 total points
ID: 37800341
Which version of SQL Server?

Backing up is fine on a maintenance plan. What you back up, how you back up is dependent on your requirements. Most of the time, in a full recovery mode I would do a full back up of the database once a day and then either daily, half daily or hourly backups of the transaction logs.

With rebuilding indexing etc., I would have a maintenance plan that you either run manually or maybe once a month. Much of the requirements here depend on how much usage the database has with regards to updates/deletes/inserts. Consider the indexes are like the ones in a book that is continually being written to or updated. They do go out of date so having a plan to manage this is good but it is pointless running daily unless you have massive record level changes or inserts and deletes.
0
 
LVL 25

Expert Comment

by:Lee Savidge
ID: 37800345
If you are in full recovery mode you must back the transaction logs up otherwise they will simply just grow and fill the disk. If you have simple recovery mode setup then you don't need to back them up.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 30

Expert Comment

by:Rich Weissler
ID: 37800893
One additional datapoint to toss out there.  I'm still rely heavily on the maintenance plan wizard, 'cause it's easy and does almost everything I need, and just tweak things to suit me when I finish.  The alternative I've looked at several times is Ola's maintenance plans -- http://ola.hallengren.com/
0
 

Author Comment

by:aneilg
ID: 37800995
thanks for the responce guys, all very gud tips.

thanks.
0
 

Author Closing Comment

by:aneilg
ID: 37855751
thanks.
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question