Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical...

17
Keeping your Database Healthy and some other configuration suggestions April Sigmon Sr. Technical Analyst October 2008

Transcript of Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical...

Page 1: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Keeping your Database Healthy and some other configuration suggestions

April Sigmon Sr. Technical AnalystOctober 2008

Page 2: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC2

My role with the GlobalWare Product

I work with the Application Support Team. My role covers everything from:

•Performing complex recoveries.

•Database corruptions.

•Assisting with your difficult installations.

•Supporting Terminal services.

Tickets are routed to me by way of the Help Desk in Atlanta.

Page 3: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Items we are going to talk about

• Planning for purges

• Annual recoveries

• Maintaining your current hardware

• Good health check

• Memory utilization

• Backing up your data/disaster recovery

• Duties of a database superstar

Keeping your Database Healthy Copyright © 2008 Travelport, LLC3

Page 4: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC4

Purging

Why Purge?

You should purge because most of you have been building your database for 9 years! It is time to begin off-loading some of that data.

•Increase the performance of your database queries (after your annual recovery).

•Decrease the size of your database (after your annual recovery).

•Your purges should be done on a fast machine. The more RAM you have the better off you are.

•Remember to backup before you purge.

Page 5: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC5

Purge scenario

Your Recovery is scheduled for Friday, July 10th. • Start purging every Friday in January. For example, on January 9 just

before you go home for the day, kick off a Purge. Start by purging a small chunk of data, such as 2 to 4 days.

• The following Friday, purge again, except try purging a little more data: 3 to 6 days. At some point, soon into the regular purges, you will have to watch the purge so that you can see just how long it is taking. This will help you gauge just how much data to purge each time.

• By the next month, you should have a good feel for your purges so that you can increase the amount of data that you can purge.

• Continue to purge every Friday (or more). Then, by the time you start your recovery in July, you will have a significant amount of data purged out of the database.

Page 6: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC6

Annual recovery

Why plan for an annual recovery?• To Keep your Database Healthy

• The recovery will find errors within your DB and either notify you of the problem or in some cases fix it.

Planning for an Annual recovery.• Choose a date to run an annual recovery

• Look at June-September, as ideally this is a slower time of year. Plan a time after hours and give yourself plenty of time to run the recovery process.

• Plan for this event – such as identifying whether you need Travelport assistance before, during, or after your recovery.

• Check for free drive space on your recovery machine. You need enough free space that equals three times the size of your Database. For example, if your database size = 2GB, you need at least 6GB of free space on the recovery drive

Page 7: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC7

Annual recovery

• How fast your recovery runs depends on the machine’s hardware. The better the machine, the quicker it will run. (The more RAM you have, the faster it processes.)

• Turn off anti-virus before you run the recovery.

• Run DeleteDuplicateInvoices prior to the recovery.

Hint! Run a Defrag on the GlobalWare server after every annual recovery.

Page 8: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC8

Maintaining your current hardware

• Clean up the hard drive (Use Disk Clean up).

• Scan for viruses and update virus definitions monthly.

• Open the case and use compressed air to spray out the dust from the fan, and to spray out the dust bunnies. Those bunnies will cause the internal mechanisms to fail.

• Attach an UPS (uninterrupted power supply) on the Database PC.

• Increase the RAM in your current machine

• Develop a plan to replace the old server and invest in a new server.

Page 9: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

A Good Health Check

Run a validation:

A good health check to run periodically throughout the year is a database validation. A validation of the database can insure that the database is not corrupt.

•A validation will scan every record in every table.

•Run the DBVAL on a non-production machine to avoid impacting your production environment.

Check your backup:

Actually restoring the backup onto a non-production machine and verifying the data is a great health check. Perhaps run your validation on this backup to ‘kill two birds with one stone.’ Thus you can ensure that when you need to restore, you have a good backup.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC9

Page 10: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Memory utilization/utilities

> How much RAM do you have in your server?• Do you have 3GB of RAM? Are you using the /3GB switch on your

server? – By adding in the /3GB switch you can allocate more memory to the application

rather then kernel processes

– http://technet.microsoft.com/en-us/library/bb124810.aspx

• Do you have at least 4GB of RAM on your 2000 Advanced/2003 server? Did you know there are limitations to this much RAM?– The problem without the following switches in place: When processes are

running, they access up to 2GB of memory address space with both physical and virtual memory. The more programs running means more processes that run, and more memory committed to that 2GB of address space. When this happens, you begin a paging process that dramatically affects your performance.

Presentation_title_v1 Legal information here10

Page 11: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Memory utilization/utilities (continued)

• Use PAE (Physical Address Extensions) to provide more physical memory to a program. This reduces the need to swap the memory which increases your performance.

• AWE (Address Window Extension) is an API to the memory manager that allows programs to address more memory than 4GB. It allows programs to reserve physical memory. This is great for large database systems.

Presentation_title_v1 Legal information here11

Page 12: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC12

More on Memory and Utilities

• For Windows to take advantage of the PAE memory, the /PAE switch must be added to the Boot.ini file. It is not enabled by default.

• AWE is already enabled with Windows, but will not reserve memory over 4GB without PAE.

• Use PAE in Boot.ini[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Windows Server 2003, Enterprise“/fastdetect /PAE

• http://support.microsoft.com/kb/283037

• http://www.microsoft.com/whdc/system/platform/server/PAE/PAEdrv.mspx

Page 13: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC13

Main Causes of Database Corruptions

• Defects in the server such as hard disk corruption, memory or cache faults

• Running out of space on the primary hard driveo 30% of all tickets for corruptions that I see are due to running out of

drive space on the primary drive

• Power failure

• Forcefully stopping a Purge

• Viruses on the Database servero Approximately 15% of the corruptions are due to viruses on the server

Page 14: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC14

Backup! Backup! Backup!

• When using the GwSrvBkp.exe on the backup server, it is suggested that you install GlobalWare as a Single user on the server. (We have found that when GW installed as a Workstation Client on the server, the GwSrvBkp (and a few other utilities) will not work like they should.)

• Other suggestions to backing up your GlobalWare server is to set up a batch file with these commands:dbbackup -c "eng=gwsrv;dbn=gwsrv;uid=global;pwd=ware" -d -t -y -o D:\GWbkup\gwbkp.log  D:\GWbkup\gw

-d creates a backup of the main database file only

-t creates a backup of the transaction log only

-y creates directory or replace files without confirmation

-o Log output messages to file (this parameter has to be the last one and is followed

up by your path)

Page 15: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC15

Online backup / Disaster Recovery

• Insurance of your data.

• Continuous backup.

• Recovery from a disaster/backup to any machine, anywhere, anytime.

• No more buying DVDs/CDs/tapes.

• Online backup is easy, transmitted securely (SSL) over the internet and then stored in professional data centers and you are provided personal encryption keys.

Suggestions for online backup:

• Mozy – www.mozy.com

• Idrive –E – www.idive.com

• Carbonite – www.carbonite.com

Page 16: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Database Superstar duties

Pick a date and time to look at the GlobalWare server each month. Look at the following items:

•Look for Errors on server and cross-check them with event viewer.

•Check if the backup (if in-house) is set and still running.

•Verify that the data being backed up is actually being backed up!

•Evaluate the free space on all drives of the server. ( C:\ and D:\ )

•Look at the size of the database.

•Log all the information on the free space and DB size every month .

•Plan purges.

•Plan for annual recovery.

Keeping your Database Healthy Copyright © 2008 Travelport, LLC16

Page 17: Keeping your Database Healthy and some other configuration suggestions April SigmonSr. Technical Analyst October 2008.

Thank you

To conclude:

Good Hardware Configuration

+

Routine Maintenance

=

A Healthy Database

Questions?

Keeping your Database Healthy Copyright © 2008 Travelport, LLC17