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

Post on 06-Jul-2020

9 views 0 download

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

Six Things a DBA Should Know

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

Six things a DBA should know

Backup Restore Data Security Query Tuning Monitoring Instance Maintenance

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

Backup

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

Backup

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

• Tar • CPIO• Backup• Etc.

– Replication

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

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

Restore

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

• Tar • CPIO• Backup• Etc.

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

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

Data Security

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

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

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

Query Tuning

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

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

Monitoring

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

• Hardware• Application• DBMS

– What's wrong– How to fix it

Monitoring

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

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

Instance problems

Identify Create a test case Report Apply a patch as needed

Instance Maintenance

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

Sales Questions - sales@ingres.com Support Questions - support@ingres.com Partner Issues - partners@ingres.com General Information - info@ingres.com

www.ingres.com