179
Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant ([email protected])

Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant ([email protected])

Embed Size (px)

Citation preview

Page 1: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Progress Database Admin

1

Jeffrey A. Brown - Technical SupportConsultant ([email protected])

Page 2: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

2

Introduction:

Page 3: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Agenda:

• Lecture - Database Concepts

• Lunch

• Database Workshop (hands-on)

3

Page 4: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

NxTrend & Progress:

• NxTrend & Progress

• NxTrend runs on products we sell.

4

Page 5: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

What Is Progress?

• Not an O/S

• Database engine

• 4GL Programming language

5

Page 6: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Licensing

• Enterprise DB

• Appserver

• 4GL

• Provision (PC Client side)

• Client Networking

• Query/Results (being replaced by SX.explorer)

• Merant (ODBC)

6

Page 7: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Progress Database Concepts:

• Physical Parts of a Database– .db - database– .bi – before image file– .lg – log file– .lk – lock file (only there when Broker is up)

7

Page 8: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

.db

.bi

.lg8

Page 9: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Starting The Database Broker

• Unix Process

• Shared memory– virtual tables

• lock file (.lk)

9

Page 10: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

.db

_mprosrv

.bi

.lg10

Page 11: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

_mprosrv

Shared Memory

.db

.bi

.lg10

Page 12: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Shared Memory Virtual tables

User id Lock TTY PID

11

Page 13: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

u l t p

_mprosrv

Shared Memory Virtual tables

.db

.bi

.lg12

Page 14: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

.lk.lg

u l t p

_mprosrv

Shared Memory Virtual tables

.db

.bi

12

Page 15: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User Login

• Unix Process

• Logs into virtual tables

• Logged in the log file (.lg)

13

Page 16: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

u l t p

User 1

_mprosrv

Shared Memory Virtual tables

.db

.bi

.lk.lg14

Page 17: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

u l t p

User 1

_mprosrv

Shared Memory Virtual tables_progres

.db

.lk.lg

.bi

14

Page 18: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

u l t p

User 1

_mprosrv

Shared Memory Virtual tables_progres

u1

.db

.lk.lg

.bi

14

Page 19: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Shared Memory Virtual tables

User id Lock TTY PID

User 1 tty/01 12345

15

Page 20: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

u l t p

User 1

_mprosrv

Shared Memory Virtual tables_progres

u1

.db

.lk.lg

.bi

16

Page 21: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

u l t p

User 1

_mprosrv

Shared Memory Virtual tables_progres

u1

.db

.lk.lg

.bi

16

Page 22: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Data-Flow Discussion

• Data gets pulled into memory– User reads from memory– User never read from the database

17

Page 23: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

.db

a b c

u l t p

User 1

_mprosrv

Shared Memory Virtual tables_progres

u1

.lk.lg

.bi

18

Page 24: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b c u l t p

User 1

_mprosrv

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

18

Page 25: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b ca b c

u l t p

User 1

_mprosrv

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

18

Page 26: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Data-Flow Discussion

• User Updates data– lock table

19

Page 27: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b ca b d

u l t p

User 1

_mprosrv

c

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

20

Page 28: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

u l t p

User 1

_mprosrv

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

20

Page 29: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Data-Flow Discussion

• Before-Image File– BIW– Data gets written to disk (.bi file)

21

Page 30: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

.lk.lg

.bi

a b da b d

u l t p

User 1

_mprosrv

Shared Memory Virtual tables_progres

u1

.db

a b c

22

Page 31: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

u l t p

User 1

biw

_mprosrv

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

22

Page 32: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

u l t p

User 1

biw

_mprosrv

bt

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

22

Page 33: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c

u l t p

User 1

biw

_mprosrv

bt

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

22

Page 34: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c

u l t p

User 1

biw

_mprosrv

bt

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

22

Page 35: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

22

Page 36: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt et

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

22

Page 37: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Data-Flow Discussion

• Review

23

Page 38: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt et

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

24

Page 39: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt et

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

24

Page 40: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt et

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

24

Page 41: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt et

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

24

Page 42: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt et

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

24

Page 43: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Data-Flow Discussion

• After-Imaging File– AIW

25

Page 44: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

.ai

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt et

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

26

Page 45: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

aiw

bt et

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

.ai

26

Page 46: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Data-Flow Discussion

• Asynchronous Page Writer– APW– Data gets written to .db

27

Page 47: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

.db

a b d

a b da b d

c d

u l t p

User 1

biw

apw

_mprosrv

aiw

bt et

Shared Memory Virtual tables_progres

u1

.lk.lg

.bi

.ai

28

Page 48: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Data-Flow Discussion

• Final Review

29

Page 49: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt et

Shared Memory Virtual tables_progres

u1

apw aiw

.db

a b d

.lk.lg

.bi

.ai

30

Page 50: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt et

Shared Memory Virtual tables_progres

u1

apw aiw

.db

a b d

.lk.lg

.bi

.ai

30

Page 51: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt et

Shared Memory Virtual tables_progres

u1

apw aiw

.db

a b d

.lk.lg

.bi

.ai

30

Page 52: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

_mprosrv

bt et

Shared Memory Virtual tables_progres

u1

apw aiw

.db

a b d

.lk.lg

.bi

.ai

30

Page 53: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

apw

_mprosrv

aiw

bt et

Shared Memory Virtual tables_progres

u1

.db

a b d

.lk.lg

.bi

.ai

30

Page 54: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

apw

_mprosrv

aiw

bt et

Shared Memory Virtual tables_progres

u1

.db

a b d

.lk.lg

.bi

.ai

30

Page 55: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

apw

_mprosrv

aiw

bt et

Shared Memory Virtual tables_progres

u1

.db

a b d

.lk.lg

.bi

.ai

30

Page 56: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

SX.enterprise Concepts

• Client/server vs self serving clients

• Appserver

31

Page 57: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

_mprosrv

Shared Memory

prowin32

.db

32

Page 58: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

_mprosrv

Shared Memory

prowin32Server

.db

32

Page 59: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

_mprosrv

Shared Memory

prowin32Server

.db

32

Page 60: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

_mprosrv

Shared Memory

prowin32Server

AppServer

.db

32

Page 61: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Appserver Discussion

33

Page 62: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

AppServer Database

Appserver Discussion

34

Page 63: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User requests customer address

34

Page 64: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

AppServer Database

Appserver Discussion

34

Page 65: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User requests a price for a specific customer

34

Page 66: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

AppServer Database

Appserver Discussion

34

Page 67: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

AppServer Database

Appserver Discussion

34

Page 68: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

AppServer Database

Appserver Discussion

34

Page 69: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Appserver Discussion - Summary

• Users are connected to Appserver and Database• Small requests do not use Appserver• Larger requests go through Appserver• Need to have large pipe between

Database Server and Appserver Server

35

Page 70: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Disconnecting Users - shutuser script

• Using shutuser

• Risks in shutting a user out

• Never use kill -9

36

Page 71: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

_mprosrv

_progresu l t p

Shared Memory Virtual tables

u1

.db

37

Page 72: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

_mprosrv

prowin32Server

u l t pShared Memory Virtual tables

u1

.db

38

Page 73: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Database Files & Crash Recovery

• .bi file

• when brokers start after crash, rebuilding shared memory not flushed to disk

• when truncate, flushes to disk

• .lg file

39

Page 74: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Power Outage Scenario #1

• Data Pulled into memory

• User changes data

• Data not written to .bi file

40

Page 75: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

u l t p

User 1

biw

apw

_mprosrv

aiw

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

.ai

41

Page 76: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Loss of Power #1

41

Page 77: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

.db

a b c

.lk.lg

.bi

.ai

41

Page 78: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Power Restored #1

What happens to data?

41

Page 79: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

u l t p

User 1

biw

apw

_mprosrv

aiw

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

.ai

41

Page 80: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Power Outage Scenario #2

• Data pulled into Memory

• User changes data

• Data is being written to Before-Image file

• No “end transaction” written

42

Page 81: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

apw

_mprosrv

aiw

bt

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

.ai

43

Page 82: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Loss of Power #2

43

Page 83: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

c dbt

.db

a b c

.lk.lg

.bi

.ai

43

Page 84: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Power Restored #2

What happens to data?

43

Page 85: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

u l t p

User 1

biw

apw

_mprosrv

aiw

Shared Memory Virtual tables_progres

u1

.db

a b c

.lk.lg

.bi

.ai

43

Page 86: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Power Outage Scenario #3

• Data pulled into Memory

• User changes data

• Data is being written to Before-Image file

• “end transaction” written

44

Page 87: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

a b da b d

c d

u l t p

User 1

biw

apw

_mprosrv

aiw

bt

Shared Memory Virtual tables_progres

u1

et

.db

a b c

.lk.lg

.bi

.ai

45

Page 88: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Loss of Power #3

45

Page 89: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

User 1

c dbt et

.db

a b c

.lk.lg

.bi

.ai

45

Page 90: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Power Restored #3

What happens to data?

45

Page 91: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

u l t p

User 1

biw

apw

_mprosrv

aiw

Shared Memory Virtual tables_progres

u1

.db

a b d

.lk.lg

.bi

.ai

45

Page 92: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Crash Recovery - Summary

• Check the .lg file

• Truncate .bi file after crash

• Check last 3 minutes of work

46

Page 93: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

NxTrend Installation Standards:

• File Systems

• /db (striped filesystem)

• /bi (separate disk)

• /rd (striped filesystem)

47

Page 94: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Directories: /db

• /db/nxt.db

• /db/nxt.bi

• /db/nxt.lg

• /db/nxt.lk

48

Page 95: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Directories: /db/sort

• /db/sort/*.DBI

• /db/sort/*.lbi

• /db/sort/*.srt

49

Page 96: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Directories: /bi

• /bi/nxt.bi

** Only if /bi can be put on it’s own dedicated spindle

50

Page 97: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Directories: /rd

• /rd/bin

• /rd/opsys/ (*.pf, *.sh)

• /rd/dlc

• /rd/dlc/bin

• /rd/src/ (*.p, *.i, *.h)

• /rd/cust/ (*.p, *.i, *.h)

• /rd/exec/ (*.r)

• /rd/lib/nxt.pl

51

Page 98: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Progress Libraries

52

Page 99: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Index .r files

Progress Libraries

53

Page 100: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Progress Libraries

• Replacing files

• Adding files

53

Page 101: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Index .r files

Progress Libraries

53

Page 102: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Index .r files

Progress Libraries

53

Page 103: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Index .r files

Progress Libraries

53

Page 104: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Index .r files

Progress Libraries

53

Page 105: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Review Directories and Libraries:

• /db

• /bi

• /rd

• nxt.pl

54

Page 106: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

NxTrend’s Expectation Of A Database Admin:

• Maintenance

• Crash Recovery

• Troubleshooting

• Scheduled Work

55

Page 107: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Database Admin Maintenance:

• Disconnecting users

• Verify Backup Logs

• Monitor/maintain extent structure – prostats.log

• Purging Database log files

• Promon

• Maintaining Scripts

• Maintain .pf files

• Maintain library file

56

Page 108: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Database Admin Crash Recovery:

• Brokers – start & stop

• Removing .lk files

• Clearing shared memory

• Removing processes

• Disconnecting users

• Truncating BI files

• Error messages in log files

57

Page 109: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Database Admin Scheduled Work:

• Dump/loads

• Progress upgrades/patches

58

Page 110: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Progress Parameter

Discussion:• Database Broker Parameters

• Client Parameters

• BI file parameters for Truncate

59

Page 111: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Database Broker Parameters

/rd/opsys/nxtdb.pf

• –bibufs 30

• –spin 1

• –directio

• –B 3750

• –L 50000

• –n 120

• –db /db/nxt

• –g /bi/nxt.bi

• –H <hostname>

• –S <service name>

• –N TCP

• –minport

• –maxport

60

Page 112: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Client Parameters /rd/opsys/enterprise.pf

• –mmax 512

• –q

• –T /db/tmp

• –t (not needed on PC client)

• –h (not needed for single database)

• –db /db/nxt

• –g /bi/nxt.bi

61

Page 113: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

BI File Parameters For Truncate

/rd/bin/truncate.bi

• –bi 1024 (Cluster)

• –biblocksize 16 (Block)

• –G 0

• –g /bi/nxt.bi

Cluster

Block

.bi file

62

Page 114: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Report Management:

• Report Manager– rptmgr– rptmgr– rptmgr

• Report Scheduler– rptsch.p

• rptrun.p

• rptrun.p

• rptrun.p

• New rptmgr hybrid (SX.enterprise)– rptmgr1– rptmgr2– rptmgr3

63

Page 115: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Report Management:

• Report Manager

• Start/Stop

• Troubleshooting

• rptlog in sasc.printdir– rptmgr.err in /usr/tmp– user definable parameters

64

Page 116: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Database Workshop

Working With Databases (hands-on)

65

Page 117: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Working with databases

• start broker

• identify database broker– shared memory– Unix process– lock file

• stop broker

66

Page 118: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Working with databases

• emergency shutdown

• log file

• progress editor (errors messages)

67

Page 119: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Working with databases

• start APW

• start BIW

68

Page 120: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Working with databases

• crash recovery

• truncate bi file

69

Page 121: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Single-Volume vs Multi-Volume

70

Page 122: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Single-Volume vs Multi-Volume

• .db, .bi • .db, .d1, .d2...

• .b1, .b2...

• no -g option needed

71

Page 123: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Progress File Size Limit

2GB72

Page 124: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Single-Volume vs Multi-Volume

• .db, .bi

• 2GB• .db, .d1, .d2...

• .b1, .b2...

• no -g option needed

• 256 @ 2GB

73

Page 125: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

ExtentsVariable vs Fixed

74

Page 126: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Variable Extents

Variable Extents

New Record

75

Page 127: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Variable Extents

Variable Extents

New Record

OS

75

Page 128: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Variable Extents

Variable Extents

New Record

75

Page 129: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Variable Extents

Variable Extents

New Record

75

Page 130: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Variable Extents

Variable Extents

New Record

OS

75

Page 131: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Variable Extents

Variable Extents

New Record

75

Page 132: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Variable Extents

Variable Extents

75

Page 133: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Fixed Extents

Fixed Extents

76

Page 134: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Fixed Extents

Fixed Extents

New Record

76

Page 135: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Fixed Extents

Fixed Extents

76

Page 136: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Single-Volume vs Multi-Volume

• .db, .bi

• 2GB

• 2 step writes

• .db, .d1, .d2...

• .b1, .b2...

• No -g option needed

• 256 @ 2GB

• Single step writes

77

Page 137: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Inode Locking

78

Page 138: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Inode Locking

78

Page 139: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Single-Volume vs Multi-Volume

• .db, .bi

• 2GB

• 2 step writes

• One inode lock

• .db, .d1, .d2...

• .b1, .b2...

• No -g option needed

• 256 @ 2GB

• Single step writes

• Many inodes to lock

79

Page 140: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Single-Volume vs Multi-Volume - Summary

• NxTrend recommends using Multi-Volume• Multi-Volume is easier to administer• Multi-Volume supports larger databases• Multi-Volume has faster writes• Multi-Volume can have more than one

write at once

80

Page 141: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

• High Water Mark

• RM Blocks

• RM Chain

• Free Chain

• Empty Blocks

81

Page 142: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

High Water Mark

Free Chain

Empty Blocks

RM ChainRM Blocks

Record Management

82

Page 143: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

High Water Mark

Free Chain

Empty Blocks

RM ChainRM Blocks

Record ManagementIndexed

82

Page 144: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

High Water Mark

Free Chain

Empty Blocks

RM ChainRM Blocks

Record Management

Indexed

82

Page 145: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

High Water Mark

Free Chain

Empty Blocks

RM ChainRM Blocks

Record Management

82

Page 146: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

High Water Mark

Free Chain

Empty Blocks

RM ChainRM Blocks

Record Management

82

Page 147: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management Scenario #1

• New Record

• Checks first 3 RM Chain blocks

• Record fits

• New Record fills RM Chain block

• Block gets taken off RM Chain

83

Page 148: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

NewRecord

84

Page 149: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

84

Page 150: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

84

Page 151: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

84

Page 152: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

84

Page 153: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

How full is full?

• Approx. 93% full

• So that record can grow in same block

• Database may grow after dump and load

85

Page 154: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management Scenario #2

• New Record

• Checks first 3 RM Chain blocks

• Record does Not fit

• Block pulled from Free Chain

• New Record gets put on RM Chain

• First 3 RM blocks get moved to end of Chain

86

Page 155: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

NewRecord

87

Page 156: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

87

Page 157: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

87

Page 158: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

87

Page 159: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

87

Page 160: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

87

Page 161: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

1 2 3

87

Page 162: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

1 2 3

87

Page 163: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management Scenario #3

• New Record

• Checks first 3 RM Chain blocks

• Record does Not fit

• No blocks left on Free Chain

• Block pulled from Empty Blocks

• New Record gets put on RM Chain

• First 3 RM blocks get moved to end of Chain

88

Page 164: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

NewRecord

89

Page 165: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

89

Page 166: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

89

Page 167: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

89

Page 168: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

89

Page 169: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

89

Page 170: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

1 2 3

89

Page 171: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management

Free Chain

Empty Blocks

RM ChainRM Blocks

1 2 3

89

Page 172: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Record Management - Summary

• New Records only check first 3 RM Chain blocks• First 3 RM Chain blocks get moved to end of chain• If you delete data, you cannot guarantee space will

be reused• Full Blocks are approx. 93% full

90

Page 173: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Dump & Load Exercise: (hands on)

• What is a dump & load

• m&m analogy

• Why do a dump & load

• How often should you dump & load

• Enable VST

91

Page 174: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Dump & Load

92

Page 175: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Dump & Load

92

Page 176: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Dump & Load

93

Page 177: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Review:

• Question & Answer Session

94

Page 178: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Questions

?

?

?

?

?

?

?

?

?

?

?

?

95

Page 179: Progress Database Admin 1 Jeffrey A. Brown - Technical Support Consultant (jefbrown@nxtrend.com)

Progress Data Flow Exercise

• DB

• Shared Memory

• Auto-Server

• User

• BIW

• BI

• APW

96