Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be...

23
Six Things a DBA Should Know

Transcript of Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be...

Page 1: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Six Things a DBA Should Know

Page 2: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Six things a DBA should know

The best beer Where to get pizza What time the boss goes home The best web sites How to deal with support issues About the latest computer games

Page 3: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Six things a DBA should know

Backup Restore Data Security Query Tuning Monitoring Instance Maintenance

Page 4: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Backup

Should be well understood Should be run on a regular basis and on

demand Enable recovery from unexpected issues

– Hardware failures– Disasters– Corruption due to user error

In addition recovery from– Bad application upgrades– Rollback patches

Page 5: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Backup

The most common problems– Insufficient disk space– Changes not journalled– Backup incomplete– Backup unreadable– Untested recovery

Page 6: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Backup

Ingres solutions– ckpdb– unloaddb– copydb– relocatedb– OS level backup

• Tar • CPIO• Backup• Etc.

– Replication

Page 7: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Restore

A Backup is – One half, a restore is the other– Useless if the data cannot be recovered

Very visible as restores required when– Things are down– In bad shape

Being unable to perform a restore is a career limiting move

Page 8: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Restore

No excuse for not being able to do a restore for• Production systems• The most esoteric restores• Partials• Point in time• Etc.

Practice and be prepared Third party products A restore may be done under pressure Do a successful restore and be a hero

Page 9: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Restore

Ingres supports– rollforwarddb– unloaddb– copydb– OS level backup

• Tar • CPIO• Backup• Etc.

Page 10: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Data Security

Insecure database objects, insecure data Often database security is lax due to

– Applications needing access to common objects– Ignorance– Laziness

Understand the needs– Some tables may be read only– Auditing tables

• Only inserts and selects• Not updates or deletes

Page 11: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Data Security

If data were money, how should it be treated? Give access only to the required data Access might be limited through

– Database procedures– Views

Page 12: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Data Security

Ingres supports– Permits– Grants– Roles– Groups– Database procedures– Views– Security auditing– Security alarms

Page 13: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Query Tuning

Tuning queries is a core skill for a DBA Many DBAs don't know how to

– Read a query plan– Choose a table structure– Create an index in parallel– Tune a query

Not everybody can be – Itzik Ben-Gan and tweak code – Joe Celko and write complex queries

Page 14: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Query Tuning

A DBA should know how to – Reading query plans– Indexing– Determining which indexes are used– Choosing the table structure– Optimization statistics

Performance tuning is– An art as much as a science– It takes experience to do it well

Page 15: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Query Tuning

Ingres supports– printqry– qep– trace point qe90– io_trace– lock_trace– optimizeonly– joinop [no]timeout– joinop [no]greedy– parallel

Page 16: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Monitoring

Systems have performance issues A DBA should be able to explain if

– There is a performance problem– Things are really busy– This is a symptom of a bigger issues

Using– DBMS tools– Performance Monitor tools– System tools

Page 17: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Monitoring

A DBA should be able to determine – If the problem is

• Hardware• Application• DBMS

– What's wrong– How to fix it

Page 18: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Monitoring

Ingres provides– Visual DBA– Visual Performance Monitor– Performance Monitor Wizard– Cache Statistics Monitor– IPM– iimonitor statistics– IMA– Logstat– Lockstat– Trace Points

Page 19: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Instance Maintenance In addition to database backup and restore

– Monitoring disk space usage– Moving objects for better performance– Adding and removing users

Instance tuning– Server monitoring– Changing configuration parameter– Adding or removing servers

Checking database integrity– Verifying system catalogues– Reviewing error and system log

Page 20: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Instance problems

Identify Create a test case Report Apply a patch as needed

Page 21: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Instance Maintenance

Ingres provides– Trace points– verifydb– iimonitor– Ingres Configuration Manager– Configuration By Forms– infodb– extenddb– usermod– sysmod– syscheck

Page 22: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy

Sales Questions - [email protected] Support Questions - [email protected] Partner Issues - [email protected] General Information - [email protected]

www.ingres.com

Page 23: Six Things a DBA Should Knowdownloads.actian.com/online/media/pdf/Education... · A DBA should be able to explain if – There is a performance problem – Things are really busy