13.02.2015 Views

An Introduction to the Progress Database - Radius

An Introduction to the Progress Database - Radius

An Introduction to the Progress Database - Radius

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>An</strong> <strong>Introduction</strong> <strong>to</strong> <strong>the</strong><br />

<strong>Progress</strong> <strong>Database</strong><br />

David Johnson<br />

Senior Solution Engineer<br />

June 20, 2007


Agenda<br />

• <strong>Database</strong> Basics & Architecture<br />

• Creating, Starting, S<strong>to</strong>pping a <strong>Database</strong><br />

• Backup & Res<strong>to</strong>re<br />

• Dump & Load<br />

• Basic Tuning<br />

• Moni<strong>to</strong>ring & Replicating Data<br />

2<br />

© 2007 <strong>Progress</strong> Software Corporation


What Is a <strong>Database</strong> Management System<br />

• Software that<br />

• Organizes and integrates data<br />

• Shares data<br />

• Provides <strong>the</strong> ability <strong>to</strong><br />

– Create,<br />

– Retrieve,<br />

– Update,<br />

– and Destroy data contained in <strong>the</strong> database<br />

• Manages <strong>the</strong> s<strong>to</strong>rage devices that contain data<br />

• Handles error recovery when something goes<br />

wrong<br />

3<br />

© 2007 <strong>Progress</strong> Software Corporation


Objectives of an RDBMS<br />

• Quick & Efficient access <strong>to</strong> Entity Relational Data<br />

A<br />

F<br />

B<br />

S<br />

R<br />

B<br />

O<br />

C<br />

U<br />

B<br />

O<br />

X<br />

G<br />

L<br />

A<br />

Z<br />

X<br />

U<br />

E<br />

R<br />

Y<br />

C<br />

S<br />

S<br />

A<br />

F<br />

B<br />

X<br />

B<br />

O<br />

A<br />

Y<br />

C<br />

O<br />

R<br />

Z<br />

A<br />

X<br />

B<br />

Y<br />

C<br />

Z<br />

Data On<br />

Disk<br />

Information<br />

In Memory<br />

Knowledge<br />

On Client<br />

4<br />

© 2007 <strong>Progress</strong> Software Corporation


Why use a RDBMS<br />

• Lets you take for granted <strong>the</strong> following:<br />

• Find what you need quickly<br />

• Allow shared access <strong>to</strong> <strong>the</strong> data<br />

• Coordinate concurrent updates <strong>to</strong> <strong>the</strong> same<br />

records<br />

• Enforce security rules<br />

• Ensure structural integrity<br />

• Provide high performance<br />

• Correct <strong>the</strong> data when errors occur<br />

• Perform crash recovery<br />

• Map data structures <strong>to</strong> compact s<strong>to</strong>rage<br />

• Add new data definitions on-line<br />

• <strong>An</strong>d more…<br />

5<br />

© 2007 <strong>Progress</strong> Software Corporation


<strong>Database</strong> S<strong>to</strong>rage<br />

Logical View<br />

• Area: A group of database objects<br />

(tables, indexes)<br />

• Table: A set of records (rows) that are<br />

composed of fields (columns)<br />

• Field: A single data value (or array)<br />

• Index: <strong>An</strong> ordered list of key value-rowid pairs<br />

that identify all rows in a table<br />

• Index entry: one key value-rowid pair<br />

6<br />

© 2007 <strong>Progress</strong> Software Corporation


S<strong>to</strong>rage Areas (<strong>Progress</strong> V9)<br />

Logical<br />

View<br />

Table A<br />

Table B<br />

Index A-1<br />

Index B-1<br />

Table C<br />

Table D<br />

Index C-1<br />

Index D-1<br />

Index E-1<br />

Table E<br />

Index E<br />

Area 6 Area 7 Area 8<br />

Area 51<br />

Physical<br />

View<br />

Extent<br />

Extent<br />

Extent<br />

Extent<br />

Extent<br />

Extent<br />

Extent<br />

Extent<br />

Extent<br />

Extent<br />

Disk S<strong>to</strong>rage - Files or Raw Slices<br />

7<br />

© 2007 <strong>Progress</strong> Software Corporation


<strong>Database</strong> S<strong>to</strong>rage<br />

Physical View<br />

• Block: A fixed-size unit of disk I/O and s<strong>to</strong>rage. All<br />

data areas have same block size.<br />

• Extent: A unit of disk s<strong>to</strong>rage<br />

• Ei<strong>the</strong>r a file or a raw disk slice<br />

• May be fixed or variable size<br />

• Area: A group of physical s<strong>to</strong>rage objects<br />

8<br />

© 2007 <strong>Progress</strong> Software Corporation


<strong>Database</strong> Blocks within Extents<br />

Fixed extent<br />

Cluster<br />

<strong>Database</strong> block<br />

Variable extent<br />

Not yet<br />

allocated<br />

by O/S<br />

Filled Partly filled Free Not yet allocated<br />

9<br />

© 2007 <strong>Progress</strong> Software Corporation


Transactions – What Are They<br />

• Transactions are an error handling and<br />

recovery mechanism. If nothing goes wrong,<br />

you don’t need <strong>the</strong>m.<br />

• Eventually, something will go wrong.<br />

• When something does go wrong, or you say<br />

“Ooops, I don’t want <strong>to</strong> do this after all.”<br />

10<br />

The transaction manager graciously puts<br />

everything back <strong>the</strong> way it was, just as if<br />

nothing had ever happened.<br />

© 2007 <strong>Progress</strong> Software Corporation


<strong>Database</strong> Transaction Logs<br />

• <strong>Progress</strong> generates two types of transaction<br />

logs:<br />

• The undo-redo log or Before-Image Log contains<br />

a record of recent changes.<br />

• The redo log or After-Image Journal contains a<br />

record of all changes since a complete backup of<br />

<strong>the</strong> database was made.<br />

• The records (also called “notes”) that are written<br />

<strong>to</strong> <strong>the</strong> two transaction logs are identical.<br />

• O<strong>the</strong>r database systems use similar<br />

techniques<br />

11<br />

© 2007 <strong>Progress</strong> Software Corporation


<strong>Database</strong> Transaction Logs<br />

BI<br />

Undo-Redo Log<br />

(Before-Image Log)<br />

Recorded Changes<br />

Original<br />

<strong>Database</strong><br />

db<br />

Transactions<br />

make changes<br />

db’<br />

Updated<br />

<strong>Database</strong><br />

AI<br />

Redo-Log<br />

(After-Image Journals)<br />

Recorded Changes<br />

12<br />

© 2007 <strong>Progress</strong> Software Corporation


<strong>Progress</strong> RDBMS Architecture<br />

Clients<br />

WebSpeed<br />

4GL Client 4GL Client<br />

AppServer<br />

ODBC<br />

JDBC<br />

ESQL/C<br />

Servers<br />

4GL<br />

<strong>Database</strong><br />

Server<br />

OpenEdge-SQL<br />

<strong>Database</strong><br />

Server<br />

Shared <strong>Database</strong> S<strong>to</strong>rage Engine<br />

13<br />

© 2007 <strong>Progress</strong> Software Corporation


Agenda<br />

• <strong>Database</strong> Basics & Architecture<br />

• Creating, Starting, S<strong>to</strong>pping a <strong>Database</strong><br />

• Backup & Res<strong>to</strong>re<br />

• Dump & Load<br />

• Basic Tuning<br />

• Moni<strong>to</strong>ring & Replicating Data<br />

14<br />

© 2007 <strong>Progress</strong> Software Corporation


Methods <strong>to</strong> Create a <strong>Database</strong><br />

‣ Using PRODB<br />

‣ Using a .ST file, PROSTRCT CREATE,<br />

and PROCOPY<br />

‣ Data Dictionary <strong>to</strong>ol<br />

‣ Data Administration <strong>to</strong>ol<br />

‣ PROREST<br />

‣ PROUTIL CONV89 | CONV910<br />

15<br />

© 2007 <strong>Progress</strong> Software Corporation


Using a .ST File, PROSTRCT CREATE, and<br />

PROCOPY<br />

1<br />

2<br />

PROSTRCT CREATE<br />

Void DB<br />

Source DB<br />

.ST File<br />

3<br />

PROCOPY<br />

Resultant DB<br />

16<br />

© 2007 <strong>Progress</strong> Software Corporation


Structure Description File<br />

• # Sampledb.st file<br />

• b .\Sampledb.b1 f 32000<br />

• b .\Sampledb.b2 f 32000<br />

• b .\Sampledb.b3<br />

• #<br />

• d "Schema Area":6,32 .\Sampledb.d1<br />

• #<br />

• d "Employee":7,32;64 .\Sampledb_7.d1 f 32000<br />

• d "Employee":7,32;64 .\Sampledb_7.d2<br />

• #<br />

• d "Inven<strong>to</strong>ry":8,32;64 .\Sampledb_8.d1 f 64000<br />

• d "Inven<strong>to</strong>ry":8,32;64 .\Sampledb_8.d2<br />

• …<br />

• a .\Sampledb.a1 f 32000<br />

• a .\Sampledb.a2 f 32000<br />

• a .\Sampledb.a3<br />

17<br />

© 2007 <strong>Progress</strong> Software Corporation


Data Dictionary & Data Administration<br />

18<br />

© 2007 <strong>Progress</strong> Software Corporation


Starting a <strong>Database</strong> Broker<br />

proserve db –H host –S service<br />

Broker<br />

Shared Memory<br />

19<br />

© 2007 <strong>Progress</strong> Software Corporation


Starting up Multiple Brokers<br />

Primary broker<br />

proserve db –Mn n<br />

SQL<br />

Broker<br />

Shared Memory<br />

Additional broker<br />

proserve db –m3<br />

4GL<br />

Broker<br />

20<br />

© 2007 <strong>Progress</strong> Software Corporation


Using a Parameter File<br />

NEWDB.PF<br />

proserve –pf newdb.pf<br />

-db newdb<br />

-H localhost<br />

-S 3000<br />

-n 101<br />

-Mn 15<br />

-Ma 5<br />

-Mpb 4<br />

-ServerType SQL<br />

…<br />

SQL<br />

Broker<br />

4GL<br />

Broker<br />

Shared Memory<br />

21<br />

© 2007 <strong>Progress</strong> Software Corporation


Shutting Down a <strong>Database</strong> in <strong>the</strong> Multi-User<br />

Environment<br />

‣PROSHUT<br />

‣Can also be used <strong>to</strong> disconnect a user<br />

‣PROMON<br />

22<br />

© 2007 <strong>Progress</strong> Software Corporation


The <strong>Progress</strong> Explorer Tool<br />

23<br />

© 2007 <strong>Progress</strong> Software Corporation


Agenda<br />

• <strong>Database</strong> Basics & Architecture<br />

• Creating, Starting, S<strong>to</strong>pping a <strong>Database</strong><br />

• Backup & Res<strong>to</strong>re<br />

• Dump & Load<br />

• Basic Tuning<br />

• Moni<strong>to</strong>ring & Replicating Data<br />

24<br />

© 2007 <strong>Progress</strong> Software Corporation


Backup & Res<strong>to</strong>re - Planning<br />

‣ Which files of <strong>the</strong> database do we need <strong>to</strong> back up<br />

‣ Which backup utility do we use<br />

‣ What impact would our backup method have on our<br />

users<br />

‣ How much data should we back up<br />

‣ What is <strong>the</strong> cost of our backup and can we afford it<br />

‣ What kind of backup media should we use<br />

‣ When and how often should we back up<br />

‣ How do we label and archive <strong>the</strong> backups<br />

‣ When and how do we test <strong>the</strong> backups<br />

25<br />

© 2007 <strong>Progress</strong> Software Corporation


OpenEdge RDBMS Backup Utility<br />

probkup [ online ] db-name<br />

[ incremental ] device-name<br />

Required files<br />

.DB<br />

.Dn<br />

.Bn<br />

Full backup or…<br />

Incremental backups<br />

26<br />

© 2007 <strong>Progress</strong> Software Corporation


Verify <strong>the</strong> Backup<br />

prorest db-name backup-file -vf<br />

Backup file<br />

.BCK<br />

27<br />

© 2007 <strong>Progress</strong> Software Corporation


Res<strong>to</strong>re <strong>the</strong> Backup<br />

prorest db-name backup-file<br />

Backup file<br />

.BCK<br />

28<br />

© 2007 <strong>Progress</strong> Software Corporation


Agenda<br />

• <strong>Database</strong> Basics & Architecture<br />

• Creating, Starting, S<strong>to</strong>pping a <strong>Database</strong><br />

• Backup & Res<strong>to</strong>re<br />

• Dump & Load<br />

• Basic Tuning<br />

• Moni<strong>to</strong>ring & Replicating Data<br />

29<br />

© 2007 <strong>Progress</strong> Software Corporation


Reasons <strong>to</strong> do a Dump & Load<br />

• Create a new version of a database<br />

• Economize disk space<br />

• Convert a database <strong>to</strong> a new OpenEdge<br />

release or a different operating system<br />

platform<br />

• Load updated data definitions <strong>to</strong> upgrade a<br />

database schema<br />

• Change <strong>the</strong> database block size<br />

30<br />

© 2007 <strong>Progress</strong> Software Corporation


S<strong>to</strong>rage after “months” of database activity<br />

extent 1 (fixed)<br />

Type I S<strong>to</strong>rage Area<br />

extent 2 (variable)<br />

Reserved Blocks<br />

Table 1 data<br />

Table 2 data<br />

Table 3 data<br />

Table 4 data<br />

Table 5 data<br />

Table 6 data<br />

1 <strong>Database</strong> block<br />

High<br />

Water<br />

Mark<br />

Total<br />

Blocks<br />

31<br />

© 2007 <strong>Progress</strong> Software Corporation


Dump and Load Process<br />

proutil db-name –C dump table-name target-dir<br />

Dump<br />

Load<br />

Source <strong>Database</strong><br />

Definitions<br />

Target <strong>Database</strong><br />

Data<br />

proutil db-name –C load .bd-file<br />

32<br />

© 2007 <strong>Progress</strong> Software Corporation


Dump & Load - <strong>Database</strong> Administration Tool<br />

Source <strong>Database</strong><br />

Data.d<br />

33<br />

© 2007 <strong>Progress</strong> Software Corporation


OpenEdge 10<br />

Type II S<strong>to</strong>rage<br />

Type I S<strong>to</strong>rage Area<br />

Type II S<strong>to</strong>rage Area<br />

Db extent (variable)<br />

Db extent (variable)<br />

High<br />

Water<br />

Mark<br />

Total<br />

Blocks<br />

High<br />

Water<br />

Mark<br />

Total<br />

Blocks<br />

Area Control Object<br />

Table 1 data<br />

Table 2 data<br />

Table 3 data<br />

1 <strong>Database</strong> block<br />

34<br />

© 2007 <strong>Progress</strong> Software Corporation


Agenda<br />

• <strong>Database</strong> Basics & Architecture<br />

• Creating, Starting, S<strong>to</strong>pping a <strong>Database</strong><br />

• Backup & Res<strong>to</strong>re<br />

• Dump & Load<br />

• Basic Tuning<br />

• Moni<strong>to</strong>ring & Replicating Data<br />

35<br />

© 2007 <strong>Progress</strong> Software Corporation


<strong>Progress</strong> <strong>Database</strong> Tuning<br />

Server startup<br />

• Buffer Pool Size<br />

• -B, Increase when buffer hit ratio < 90%<br />

• Spinlock Retry Count<br />

• -spin = 50,000 (rule of thumb), Enterprise only<br />

• Start BI Log Writer (BIW)<br />

• 1 per database, Enterprise only<br />

• Start Asynchronous Page Writer (APW)<br />

• Increase until 0 blocks flushed at checkpoint, Ent. only<br />

• Increase BI Log Block Size<br />

• -biblocksize, set <strong>to</strong> 8<br />

• Add BI Log Buffers<br />

• -bibufs, Default = 5, set in range of 25-50<br />

36<br />

© 2007 <strong>Progress</strong> Software Corporation


<strong>Progress</strong> <strong>Database</strong> Tuning<br />

Server startup cont…<br />

• Increase BI Log Cluster Size<br />

• -bi 4096<br />

• Move Data Extents <strong>to</strong> Striped Array<br />

• Move BI Log <strong>to</strong> a Separate Disk<br />

Client side<br />

• -T (Temp files)<br />

• -q (quick request)<br />

• -TM & -TB sort options<br />

37<br />

© 2007 <strong>Progress</strong> Software Corporation


Example Tuning Results<br />

throughput (tps)<br />

800<br />

700<br />

600<br />

500<br />

400<br />

300<br />

200<br />

100<br />

0<br />

30<br />

no tuning<br />

581<br />

simple tuning<br />

38<br />

© 2007 <strong>Progress</strong> Software Corporation


Agenda<br />

• <strong>Database</strong> Basics & Architecture<br />

• Creating, Starting, S<strong>to</strong>pping a <strong>Database</strong><br />

• Backup & Res<strong>to</strong>re<br />

• Dump & Load<br />

• Basic Tuning<br />

• Moni<strong>to</strong>ring & Replicating Data<br />

39<br />

© 2007 <strong>Progress</strong> Software Corporation


Moni<strong>to</strong>ring using Promon<br />

PROGRESS MONITOR Version 9<br />

<strong>Database</strong>: /FULLPATH/DBNAME<br />

1. User Control<br />

2. Locking and Waiting Statistics<br />

3. Block Access<br />

4. Record Locking Table<br />

5. Activity<br />

6. Shared Resources<br />

7. <strong>Database</strong> Status<br />

8. Shut Down <strong>Database</strong><br />

T. Transactions Control<br />

L. Resolve Limbo Transactions<br />

C. Coordina<strong>to</strong>r Information<br />

M. Modify Defaults<br />

Q. Quit<br />

Basic information<br />

can be found on screen 5<br />

Also look under R&D<br />

Go ahead and poke<br />

around; just don’t<br />

choose “Shut Down”<br />

40<br />

© 2007 <strong>Progress</strong> Software Corporation


Key performance activity metrics<br />

41<br />

© 2007 <strong>Progress</strong> Software Corporation


O<strong>the</strong>r Tools For <strong>Database</strong> <strong>An</strong>alysis<br />

Tool<br />

• Prostrct statistics<br />

• Prostrct list<br />

• Proutil dbanalys<br />

• statParse.p<br />

• VST’s<br />

• Top<br />

• Your favorite OS <strong>to</strong>ol<br />

Frequency<br />

(monthly)<br />

(as needed)<br />

(weekly or monthly)<br />

(monthly)<br />

(program dictated)<br />

42<br />

© 2007 <strong>Progress</strong> Software Corporation


Moni<strong>to</strong>ring Using Fathom Management<br />

43<br />

© 2007 <strong>Progress</strong> Software Corporation


Data Replication - Fathom Replication Plus<br />

44<br />

© 2007 <strong>Progress</strong> Software Corporation


<strong>Progress</strong> and <strong>Radius</strong> Solutions<br />

Reliable, Scalable, Efficient, Open, Cost-Effective…<br />

<strong>Progress</strong> Software has over 20 years of proven<br />

success in partnering with ISVs <strong>to</strong> ensure <strong>the</strong><br />

fastest, most cost-effective path for delivering<br />

competitive business applications.<br />

IDC<br />

“…<strong>Progress</strong> partnering approach leads <strong>the</strong> industry”<br />

Forrester reports…<br />

“…40% cost savings on <strong>the</strong> <strong>Progress</strong> platform versus an alternative platform"<br />

45<br />

© 2007 <strong>Progress</strong> Software Corporation


46<br />

© 2007 <strong>Progress</strong> Software Corporation


Why Upgrade <strong>to</strong> OpenEdge <br />

Large <strong>Database</strong> Support<br />

64 bit Rowids<br />

64 bit Sequences<br />

64 bit Integer Datatype<br />

Large Index Key Entries (1970)<br />

32,000 areas<br />

Performance<br />

Type II S<strong>to</strong>rage Areas<br />

Increased addressable shmem<br />

Larger Shmem segment support<br />

Internal pro<strong>to</strong>col enhancements<br />

Buffers, Locks, Indexing<br />

Au<strong>to</strong> Record Defrag<br />

High Availability<br />

Online Schema changes<br />

Online space management<br />

Enabled/Disable ai online<br />

Security<br />

SSL<br />

Auditing<br />

Datatype Support<br />

BLOB, CLOB<br />

Date/Time, Date/Time w/tz<br />

int 64<br />

Maintenance<br />

.st file syntax checker<br />

AI management<br />

More online maintenance<br />

Multi threaded utilities<br />

Log File<br />

New format<br />

Significant events<br />

Improved log file management<br />

Db I/O by User by Object<br />

47<br />

© 2007 <strong>Progress</strong> Software Corporation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!