DB 3 Bjorklund

download DB 3 Bjorklund

of 79

Transcript of DB 3 Bjorklund

  • 7/28/2019 DB 3 Bjorklund

    1/79

    DB-3: Tips for Database Administrators

    Gus Bjrklund Wizard, Progress Software Corporation

  • 7/28/2019 DB 3 Bjorklund

    2/79

    2007 Progress Software Corporation2 DB-3: Tips for Database Administrators

    Ask questions as we goif I am not clear about something.

    Warning: there is a mistake in these slides.

  • 7/28/2019 DB 3 Bjorklund

    3/79

    2007 Progress Software Corporation3 DB-3: Tips for Database Administrators

    Topics

    Tip Nr. 0x00 Tip Nr. 0x16

  • 7/28/2019 DB 3 Bjorklund

    4/79

    2007 Progress Software Corporation4 DB-3: Tips for Database Administrators

    Tip Number 0x00

    If it is not broken, dont fix it !

  • 7/28/2019 DB 3 Bjorklund

    5/79

    2007 Progress Software Corporation5 DB-3: Tips for Database Administrators

    Tip Number 0x01

    If you do fix something, test your fix !

  • 7/28/2019 DB 3 Bjorklund

    6/79

    2007 Progress Software Corporation6 DB-3: Tips for Database Administrators

    Tip Number 0x02

    Read the man pages

  • 7/28/2019 DB 3 Bjorklund

    7/79 2007 Progress Software Corporation7 DB-3: Tips for Database Administrators

    Read the man pages

    man manman [ -s section ] nameRead the man pages!

  • 7/28/2019 DB 3 Bjorklund

    8/79 2007 Progress Software Corporation8 DB-3: Tips for Database Administrators

    Tip Number 0x03

    SSH is your friend!

    Like Linux, more great stuff fromFinland

  • 7/28/2019 DB 3 Bjorklund

    9/79 2007 Progress Software Corporation9 DB-3: Tips for Database Administrators

    SSH

    SSH replaces telnet, rlogin, rcp, rsh, etc. All connections are encryptedUse for remote access over Internet

  • 7/28/2019 DB 3 Bjorklund

    10/79 2007 Progress Software Corporation10 DB-3: Tips for Database Administrators

    SSH

    Dont need username, password login Can also use certificates for authentication

    Can send output of local commands to remote host remote commands to local host

    Can do secure file transfer

    scp and sftpCan tunnel other protocols (e.g. X windows)

  • 7/28/2019 DB 3 Bjorklund

    11/79 2007 Progress Software Corporation11 DB-3: Tips for Database Administrators

    Simple remote command execution

    gus@dirac:gus $ ssh bespin lsgus@bespin's password:101arkt90ajdk.txt

    GSIMailNewsa.outa7adb.mangus@dirac:gus $

    Nothing much to see here

  • 7/28/2019 DB 3 Bjorklund

    12/79 2007 Progress Software Corporation12 DB-3: Tips for Database Administrators

    Remote command output to local host

    gus@dirac:gus $ ssh bespin "ls; echo DONE >ls.dat gus@bespin's password:gus@dirac:gus $ cat ls.dat101arkt90ajdk.txt

    GSIMailNewsa.outa7adb.manDONEgus@dirac:gus $

  • 7/28/2019 DB 3 Bjorklund

    13/79 2007 Progress Software Corporation13 DB-3: Tips for Database Administrators

    Local output piped to remote host

    gus@dirac:gus $ cd 4gl; tar -cf - *.p | ssh bespin "cd foo; tar -xf -"gus@bespin's password:gus@dirac:4gl $

  • 7/28/2019 DB 3 Bjorklund

    14/79 2007 Progress Software Corporation14 DB-3: Tips for Database Administrators

    Remote backup piped to local file

    gus@dirac:4gl $ ssh bespin "cd pdr; tar -cvf - ." >backup.tar gus@bespin's password:a ./ 0Ka ./Makefile 1K

    a ./pdrcache.c 131Ka ./pdrproc.c 23Ka ./pdrtrig.c 175Ka ./dsmcon.c 94Ka ./dsmrec.c 17Ka ./dsmseq.c 15Kgus@dirac:4gl $

  • 7/28/2019 DB 3 Bjorklund

    15/79

  • 7/28/2019 DB 3 Bjorklund

    16/79 2007 Progress Software Corporation16 DB-3: Tips for Database Administrators

    Enabling SSH certificate authentication

    gus@dirac:gus $ ssh-keygenGenerating public/private rsa key pair.Enter file in which to save the key (/Users/gus/.ssh/id_rsa):Enter passphrase (empty for no passphrase):Enter same passphrase again:

    Your identification has been saved in /Users/gus/.ssh/id_rsa.Your public key has been saved in /Users/gus/.ssh/id_rsa.pub.The key fingerprint is:3f:a9:2c:a6:74:5e:36:59:39:7f:ed:3f:5d:e3:a6:ee

    [email protected]@dirac:gus $gus@dirac:gus $ ssh-copy-id -i id_rsa gus@bespingus@dirac:gus $

  • 7/28/2019 DB 3 Bjorklund

    17/79

  • 7/28/2019 DB 3 Bjorklund

    18/79 2007 Progress Software Corporation18 DB-3: Tips for Database Administrators

    More about SSH

    www.openssh.com

    http://www.ietf.org/rfc/rfc4251.txt

  • 7/28/2019 DB 3 Bjorklund

    19/79

    2007 Progress Software Corporation19 DB-3: Tips for Database Administrators

    Tip Number 0x04

    Windows can do SSH too

  • 7/28/2019 DB 3 Bjorklund

    20/79

    2007 Progress Software Corporation20 DB-3: Tips for Database Administrators

    SSH for Windows

    Client: use Putty

    http://www.chiark.greenend.org.uk/~sgtatham/putty/

    Server: get Cygwin

    http://www.cygwin.com

  • 7/28/2019 DB 3 Bjorklund

    21/79

    2007 Progress Software Corporation21 DB-3: Tips for Database Administrators

    Tip Number 0x05

    After-image journalling is your friend!

  • 7/28/2019 DB 3 Bjorklund

    22/79

    2007 Progress Software Corporation22 DB-3: Tips for Database Administrators

    After Imaging

    Do you use after-image journalling? YOU SHOULD

    AI records all database changesIntended for disaster recovery hot standby on another machine

  • 7/28/2019 DB 3 Bjorklund

    23/79

    2007 Progress Software Corporation23 DB-3: Tips for Database Administrators

    AI Basics

    Add AI extents to databaseBack up the databaseEnable after-imaging

    Archive ai extents as they become full 10.1 has an automatic archiver

    OpenEdge DBA guide has details

  • 7/28/2019 DB 3 Bjorklund

    24/79

    2007 Progress Software Corporation24 DB-3: Tips for Database Administrators

    AI basics 2

    A failure occurs and you lose your database ..

    Fix the failure replace disk, memory, machine, etc.

    Restore the backup copy of your databaseRoll forward all ai extents you archived You do know where you put them, dont you?

    I hope they werent on the failed disk When roll forward done, start databaseNow you are back to where you were

  • 7/28/2019 DB 3 Bjorklund

    25/79

    2007 Progress Software Corporation25 DB-3: Tips for Database Administrators

    Tip Number 0x06

    Specify scratch space for index rebuild

  • 7/28/2019 DB 3 Bjorklund

    26/79

    2007 Progress Software Corporation26 DB-3: Tips for Database Administrators

    Index rebuild scratch space

    Command line looks like this:proutil dbname -C idxbuild table customer \-SS dbname.srt -TB 31 -TM 32 -B 1000

    Scratch space spec file (dbname.srt) looks like this:300 /user2/db1/first/400 /user3/junk/0 /user4/last/

    note multiple drives in this example

  • 7/28/2019 DB 3 Bjorklund

    27/79

    2007 Progress Software Corporation27 DB-3: Tips for Database Administrators

    Tip Number 0x07

    Tools you should know about

  • 7/28/2019 DB 3 Bjorklund

    28/79

    2007 Progress Software Corporation28 DB-3: Tips for Database Administrators

    Tools

    uptimefindtop

    lsof ifconfigvmstatiostat

    netstatbzip2

  • 7/28/2019 DB 3 Bjorklund

    29/79

    2007 Progress Software Corporation29 DB-3: Tips for Database Administrators

    Tools: uptime

    $ uptime11:26am up 17 day(s), 9:16, 163 users, load average: 3.09, 3.36, 3.76

    $

  • 7/28/2019 DB 3 Bjorklund

    30/79

    2007 Progress Software Corporation30 DB-3: Tips for Database Administrators

    Tools: top

    gus@dirac:gus $ top -l 1Processes: 65 total, 3 running, 62 sleeping... 183 threads 10:51:24Load Avg: 0.04, 0.06, 0.07 CPU usage: 11.1% user, 44.4% sys, 44.4% idleSharedLibs: num = 170, resident = 37.0M code, 5.30M data, 6.44M LinkEditMemRegions: num = 6460, resident = 166M + 16.3M private, 164M sharedPhysMem: 161M wired, 758M active, 879M inactive, 1.76G used, 248M freeVM: 9.47G + 102M 230499(0) pageins, 16746(0) pageouts

    PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE606 top 0.0% 0:00.05 1 17 19 276K 684K 748K 26.9M586 bash 0.0% 0:00.02 1 14 16 224K 1.05M 844K 27.1M585 login 0.0% 0:00.01 1 16 40 172K 768K 636K 26.9M583 Terminal 0.0% 0:01.56 5 130 197 2.64M 11.9M 8.93M 364M563 TextEdit 0.0% 0:00.23 1 67 149 2.05M 8.94M 5.80M 355M558 TeXShop 0.0% 0:03.18 2 109 238 4.49M 20.2M 25.6M 365M467 firefox-bi 0.0% 1:31.55 6 96 389 48.1M 29.4M 67.4M 428M

  • 7/28/2019 DB 3 Bjorklund

    31/79

    2007 Progress Software Corporation31 DB-3: Tips for Database Administrators

    Tools:find

    find files modified more than 30 days ago find . -mtime +30 -print

    delete files modified more than 30 days ago find . -mtime +30 -exec rm {} \;

    find files bigger than 16k find . -size +16384c -print find . -size +32 -print

    delete files bigger than 16k find . -size +16384c -print | xargs -i rm \;

    Read the man page!

  • 7/28/2019 DB 3 Bjorklund

    32/79

    2007 Progress Software Corporation32 DB-3: Tips for Database Administrators

    Tools:lsof

    _progres 26240 bleicher /usr/lib/librt.so.1 _progres 26240 bleicher /usr/lib/libsocket.so.1 _progres 26240 bleicher /usr/lib/libintl.so.1 _progres 26240 bleicher /usr/lib/ld.so.1 _progres 26240 bleicher /usr/lib/libdl.so.1

    . . . _progres 26240 bleicher /tools/solaris/dlc100b/promsgs _progres 26240 bleicher /tools/solaris/dlc100b/bin/_progres

    ftp://vic.cc.purdue.edu/pub/

  • 7/28/2019 DB 3 Bjorklund

    33/79

    2007 Progress Software Corporation33 DB-3: Tips for Database Administrators

    Tools:ifconfig

    1-bespin-gus-> /usr/sbin/ifconfig -alo0: flags=1000849 mtu 8232 index 1

    inet 127.0.0.1 netmask ff000000ce0: flags=1000843 mtu 1500 index 2inet 172.16.7.168 netmask ffff0000 broadcast 172.16.255.255

  • 7/28/2019 DB 3 Bjorklund

    34/79

    2007 Progress Software Corporation34 DB-3: Tips for Database Administrators

    Tools:ifconfig

    gus@dirac:gus $ ifconfig en0en0: flags=8863 mtu 1500

    tunnel inet --> inet6 fe80::217:f2ff:fecc:b686%en0 prefixlen 64 scopeid 0x4inet 172.16.114.99 netmask 0xffff0000 broadcast 172.16.255.255ether 00:17:f2:cc:b6:86

    media: autoselect (1000baseT ) status: activesupported media: autoselect 10baseT/UTP 10baseT/UTP

    10baseT/UTP 10baseT/UTP 100baseT 100baseTX 100baseTX 100baseTX 1000baseT

    1000baseT 1000baseT none

    vlan: 0 parent interface: bond interfaces:

  • 7/28/2019 DB 3 Bjorklund

    35/79

    2007 Progress Software Corporation35 DB-3: Tips for Database Administrators

    Tools:netstat

    1-bespin-gus-> netstat

    TCP: IPv4Local Address Remote Address Swind Send-Q Rwind Recv-Q State

    -------------------- -------------------- ----- ------ ----- ------ -------

    bespin.1023 rdlserv.nfsd 26280 0 49640 116 ESTABLISHEDbespin.32880 bespin.6015 49152 0 49152 0 ESTABLISHEDbespin.32879 bespin.6014 49152 0 49152 0 ESTABLISHEDbespin.6014 bespin.32879 49152 0 49152 0 ESTABLISHEDbespin.6015 bespin.32880 49152 0 49152 0 CLOSE_WAIT

    . . .

  • 7/28/2019 DB 3 Bjorklund

    36/79

    2007 Progress Software Corporation36 DB-3: Tips for Database Administrators

    Tools: netstat -s

    gus@dirac:4gl $ netstat -stcp:

    794419 packets sent37468 data packets (22991001 bytes)51 data packets (11242 bytes) retransmitted0 resends initiated by MTU discovery430311 ack-only packets (196294 delayed)0 URG only packets0 window probe packets322074 window update packets4516 control packets

    1308690 packets received33675 acks (for 22967429 bytes)2270 duplicate acks

    0 acks for unsent data1248341 packets (1521010141 bytes) received in-sequence385 completely duplicate packets (343882 bytes)0 old duplicate packets41 packets with some dup. data (28512 bytes duped)33202 out-of-order packets (38094369 bytes)1 packet (376 bytes) of data after window

  • 7/28/2019 DB 3 Bjorklund

    37/79

    2007 Progress Software Corporation37 DB-3: Tips for Database Administrators

    vmstat

    vmstat 3 50procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----r b swpd free buff cache si so bi bo in cs us sy id wa0 7 3656 226920 16528 5294120 0 0 360 636 281 823 4 4 49 420 6 3656 205504 16584 5302288 0 0 2688 903 1066 4675 7 6 11 752 0 3656 186088 16584 5310512 0 0 2656 684 1010 4687 6 6 8 80

    22 28 3656 165196 16600 5319748 0 0 2887 871 1096 4623 8 6 8 780 94 3656 138524 16648 5331008 0 0 3909 815 1292 3455 8 6 6 79

    . . .

  • 7/28/2019 DB 3 Bjorklund

    38/79

    2007 Progress Software Corporation38 DB-3: Tips for Database Administrators

    iostat

    gus@dirac:gus $ iostat 5 5disk0 cpu

    KB/t tps MB/s us sy id18.07 4 0.07 7 3 900.00 0 0.00 2 1 970.00 0 0.00 4 1 950.00 0 0.00 2 2 960.00 0 0.00 3 1 95

  • 7/28/2019 DB 3 Bjorklund

    39/79

    2007 Progress Software Corporation39 DB-3: Tips for Database Administrators

    Tools:bzip2

    $ ls -l tips_for_dbas_00.ppt-rw-r--r-- 1 gus staff 644096 Apr 23 09:18 tips_for_dbas_00.ppt

    $ bzip2 tips_for_dbas_00.ppt

    $ ls -l tips_for_dbas_00.ppt.bz2-rw-r--r-- 1 gus staff 246356 Apr 23 09:18 tips_for_dbas_00.ppt.bz2

  • 7/28/2019 DB 3 Bjorklund

    40/79

    2007 Progress Software Corporation40 DB-3: Tips for Database Administrators

    Tools: Windows tabbed console

  • 7/28/2019 DB 3 Bjorklund

    41/79

    2007 Progress Software Corporation41 DB-3: Tips for Database Administrators

    Tools: windows tabbed console

    http://sourceforge.net/projects/console/

  • 7/28/2019 DB 3 Bjorklund

    42/79

    2007 Progress Software Corporation42 DB-3: Tips for Database Administrators

    Tools: More Windoze Stuff http://www.microsoft.com/technet/sysinternals

    Some useful stuff you can get there:

    Handle: Who has what files openProcess Monitor: Lots of information about processes

    and disk activity Autorun: what programs get started automaticallyRegmon: monitors registry activityTcpview: shows all active TCP and UDP endpointsPsTools: list processes, system info, who is logged on

    Zoomit: zoom in on parts of screenLots more

  • 7/28/2019 DB 3 Bjorklund

    43/79

    2007 Progress Software Corporation43 DB-3: Tips for Database Administrators

    Tools: Still More Windoze Stuff

    http://www.baremetalsoft.com/baretail

  • 7/28/2019 DB 3 Bjorklund

    44/79

    2007 Progress Software Corporation44 DB-3: Tips for Database Administrators

    Tools: Solaris

    pldd List the dynamic libraries linked into each process

    pfiles Report fstat(2) and fcntl(2) information for all open filesin each process.

    pmap print information about the address space of a process

    plimit get or set the resource limits of running processes

    pargs print process arguments, environment variables

    preap force a defunct process to be reaped by its parent

    pkginfo list what packages are installed

  • 7/28/2019 DB 3 Bjorklund

    45/79

    2007 Progress Software Corporation45 DB-3: Tips for Database Administrators

    Tools: AIX svmon

    svmon -G -Isize inuse free pin virtual

    memory 1048576 425275 623301 66521 159191pg space 262144 31995

    work pers clntpin 46041 0 0in use 129600 275195 0

    PageSize PoolSize inuse pgsp pin virtuals 4 KB - 404795 31995 46041 159191L 16 MB 5 0 0 5 0

    List top 15 memory consumers

    svmon -Pt15 | perl - e while(){print if($.==2||$&&&!$s++);$.=0 if(/^ -+$/)}

    l

  • 7/28/2019 DB 3 Bjorklund

    46/79

    2007 Progress Software Corporation46 DB-3: Tips for Database Administrators

    Tools: AIX vmstat

    vmstat -v1048576 memory pages1002054 lruable pages478136 free pages

    1 memory pools95342 pinned pages80.1 maxpin percentage20.0 minperm percentage80.0 maxperm percentage36.1 numperm percentage

    362570 file pages. . .

    Use vmo command to adjustminperm, maxperm, numperm as needed

    i b 0 08

  • 7/28/2019 DB 3 Bjorklund

    47/79

    2007 Progress Software Corporation47 DB-3: Tips for Database Administrators

    Tip Number 0x08

    Windows scripting

    Wi d i i

  • 7/28/2019 DB 3 Bjorklund

    48/79

    2007 Progress Software Corporation48 DB-3: Tips for Database Administrators

    Windows scripting

    Cygwin provides lots of Unix tools and a shell for

    Windows. Also SSH server Download from: www.cygwin.com

    Windows Services for UNIX Version 3.5 From Micro$oft, but free Lots of goodies: Korn, C, bash shells, 350 UNIX

    commands, NFS, NFS gateway, telent, telnetd Download from http://technet.microsoft.com/en-us/interopmigration/bb380242.aspx

    Windows .bat scripts are brain damaged

    Ti N b 0 09

    http://www.cygwin.com/http://www.cygwin.com/
  • 7/28/2019 DB 3 Bjorklund

    49/79

    2007 Progress Software Corporation49 DB-3: Tips for Database Administrators

    Tip Number 0x09

    how to turn off Windows indexing service

    S Wi d i d i i

  • 7/28/2019 DB 3 Bjorklund

    50/79

    2007 Progress Software Corporation50 DB-3: Tips for Database Administrators

    Stop Windows indexing service

    Go to the Start menu, pick run. Type services.msc, click OK. Services dialog will show.

    Right-click on indexing service to showproperties dialog,if service running, click stop.select disabled.click applyclose.

    Ti N b 0 0

  • 7/28/2019 DB 3 Bjorklund

    51/79

    2007 Progress Software Corporation51 DB-3: Tips for Database Administrators

    Tip Number 0x0a

    creating Windows services

    U SRVANY t Wi d S i

  • 7/28/2019 DB 3 Bjorklund

    52/79

    2007 Progress Software Corporation52 DB-3: Tips for Database Administrators

    User SRVANY to run Windows Services

    Lets you create user defined WindowsservicesInstructions and download from

    http://www.tacktech.com/display.cfm?ttid=197Warning: This is not for n00bs.

    Study before using Read http://support.microsoft.com/kb/137890

    Ti N b 0 0b

  • 7/28/2019 DB 3 Bjorklund

    53/79

    2007 Progress Software Corporation53 DB-3: Tips for Database Administrators

    Tip Number 0x0b

    How to telnet to Windows

    E bl Wi d t l t l gi b / d

  • 7/28/2019 DB 3 Bjorklund

    54/79

    2007 Progress Software Corporation54 DB-3: Tips for Database Administrators

    Enable Windows telnet login by name/passwd

    NTLM authentication by defaultTo fix: run TLNTADMN

    take menu pick no 3 (display/change ) pick 7 (NTLM) set value to 1

    take menu pick no 4 (restart service)BUT: dont use telnet

    Ti N b 0 0

  • 7/28/2019 DB 3 Bjorklund

    55/79

    2007 Progress Software Corporation55 DB-3: Tips for Database Administrators

    Tip Number 0x0c

    scripting Progress backup

    Scripting back p

  • 7/28/2019 DB 3 Bjorklund

    56/79

    2007 Progress Software Corporation56 DB-3: Tips for Database Administrators

    Scripting backup

    bkupdev="${DB_bkupdir}/${DB_name}.bkup"rm -f ${bkupdev}* 2>&1#echo "Backing up database $DB_dir/$DB_name to $bkupdev"#$DLC/bin/probkup online $DB_dir/$DB_name ${bkupdev}01 \-vs 250000 -bf 40

  • 7/28/2019 DB 3 Bjorklund

    57/79

    2007 Progress Software Corporation57 DB-3: Tips for Database Administrators

    Tip Number 0x0d

    scripting promon

    Scripting promon

  • 7/28/2019 DB 3 Bjorklund

    58/79

    2007 Progress Software Corporation58 DB-3: Tips for Database Administrators

    Scripting promon

    $DLC/bin/promon $DBNAME > promon.log \

  • 7/28/2019 DB 3 Bjorklund

    59/79

    2007 Progress Software Corporation59 DB-3: Tips for Database Administrators

    Tip Number 0x0e

    scripting after imaging

    Scripting ai archiving

  • 7/28/2019 DB 3 Bjorklund

    60/79

    2007 Progress Software Corporation60 DB-3: Tips for Database Administrators

    Scripting ai archiving

    EXTENT_NAME=`_rfutil $DB_DIR/$DB -C aimage extent full`#EXTENT_DATE=`date +%Y%m%d-%H%M%S`# like this: 20070516-140856

    tar -czvf /anotherdisk/aiarchives/$EXTENT_DATE $EXTENT_NAMErfutil $DB_DIR/$DB -C aimage extent empty $EXTENT_NAME

    Tip Number 0x0f

  • 7/28/2019 DB 3 Bjorklund

    61/79

    2007 Progress Software Corporation61 DB-3: Tips for Database Administrators

    Tip Number 0x0f

    How much space is being usedby storage areas?

    How much space is being used?

  • 7/28/2019 DB 3 Bjorklund

    62/79

    2007 Progress Software Corporation62 DB-3: Tips for Database Administrators

    How much space is being used?

    for each _AreaStatus where( not _AreaStatus-Areaname matches "*After Image Area*" )no-lock:

    display

    _AreaStatus-Areanum format ">>>" column-label "Num" _AreaStatus-Areaname format "x(20)" column-label "Area Name" _AreaStatus-Totblocks column-label "Tot blocks" _AreaStatus-Hiwater column-label "High water mark" _AreaStatus-Hiwater / _AreaStatus-Totblocks * 100 column-label "% use" _AreaStatus-Extents format ">>>" column-label "Num Extents".

    end.

    from PEG: Dmitri Levin

    Tip Number 0x10

  • 7/28/2019 DB 3 Bjorklund

    63/79

    2007 Progress Software Corporation63 DB-3: Tips for Database Administrators

    Tip Number 0x10

    List tables by storage area

    List tables by storage area

  • 7/28/2019 DB 3 Bjorklund

    64/79

    2007 Progress Software Corporation64 DB-3: Tips for Database Administrators

    List tables by storage area

    for each _Area, each _Storageobjectwhere (_Storageobject._Area-number = _Area._Area-number),

    each _Filewhere (_File._File-Number = _Storageobject._Object-number)

    and (_File._File-Number > 0)break by _File._File-name:

    display _Area._Area-name _File._File-name.end.

    Listing of tables by storage area

  • 7/28/2019 DB 3 Bjorklund

    65/79

    2007 Progress Software Corporation65 DB-3: Tips for Database Administrators

    Listing of tables by storage area

    Area-name File-Name

    Schema Area agedar Schema Area agedar

    Schema Area customer Schema Area customer Schema Area itemSchema Area itemSchema Area monthlySchema Area monthly

    List tables by storage area

  • 7/28/2019 DB 3 Bjorklund

    66/79

    2007 Progress Software Corporation66 DB-3: Tips for Database Administrators

    List tables by storage area

    for each _Area, each _Storageobjectwhere (_Storageobject._Area-number = _Area._Area-number),

    each _Filewhere (_File._File-Number = _Storageobject._Object-number)

    and (_File._File-Number > 0)break by _File._File-name:

    display _Area._Area-name _File._File-name.end.

    List tables by storage area 2

  • 7/28/2019 DB 3 Bjorklund

    67/79

    2007 Progress Software Corporation67 DB-3: Tips for Database Administrators

    List tables by storage area 2

    for each _Area, each _Storageobjectwhere (_Storageobject._Area-number = _Area._Area-number),

    each _Filewhere (_File._File-Number = _Storageobject._Object-number)

    and (_File._File-Number > 0)and (_StorageObject._Object-type eq 1)

    break by _File._File-name:

    display _Area._Area-name _File._File-name.end.

    Tip Number 0x11

  • 7/28/2019 DB 3 Bjorklund

    68/79

    2007 Progress Software Corporation68 DB-3: Tips for Database Administrators

    Tip Number 0x11

    List indices by storage area and table

    List indexes by storage area and table

  • 7/28/2019 DB 3 Bjorklund

    69/79

    2007 Progress Software Corporation69 DB-3: Tips for Database Administrators

    List indexes by storage area and table

    for each _Area, each _Storageobjectwhere (_Storageobject._Area-number = _Area._Area-number),

    each _Indexwhere (_Index._Idx-num = _Storageobject._Object-number)

    and (_StorageObject._Object-type eq 2) :find _File of _Index.if (_File._File-number > 0) then

    display _Area._Area-name _File._File-name _Index._Index-name.end.

    Tip Number 0x12

  • 7/28/2019 DB 3 Bjorklund

    70/79

    2007 Progress Software Corporation70 DB-3: Tips for Database Administrators

    Tip Number 0x12

    Learn to use vi

    vi cheat sheet

  • 7/28/2019 DB 3 Bjorklund

    71/79

    2007 Progress Software Corporation71 DB-3: Tips for Database Administrators

    vi cheat sheet

    Tip Number 0x13

  • 7/28/2019 DB 3 Bjorklund

    72/79

    2007 Progress Software Corporation72 DB-3: Tips for Database Administrators

    Tip Number 0x13

    Tom Bascoms protop

    protop

  • 7/28/2019 DB 3 Bjorklund

    73/79

    2007 Progress Software Corporation73 DB-3: Tips for Database Administrators

    protop

    Tom Bascoms Open Source Progress 4GL VSTbased performance monitoring programDisplays tons of useful information

    Study source code to learn how it is doneDownload fromhttp://www.greenfieldtech.com/articles/protop.shtml

    Tip Number 0x14

  • 7/28/2019 DB 3 Bjorklund

    74/79

    2007 Progress Software Corporation74 DB-3: Tips for Database Administrators

    Tip Number 0x14

    Adam Backmans DBA scripts

    Adam Backmans dba scripts

  • 7/28/2019 DB 3 Bjorklund

    75/79

    2007 Progress Software Corporation75 DB-3: Tips for Database Administrators

    Adam Backman s dba scripts

    Available on PEG: http://www.peg.com/utilities.htmlBeen aroud awhile, but very goodStuff they do: backup check ai status check db status look for blocked clients more

    Study code to learn how it is done

    Tip Number 0x15

  • 7/28/2019 DB 3 Bjorklund

    76/79

    2007 Progress Software Corporation76 DB-3: Tips for Database Administrators

    Tip Number 0x15

    Where to get more tips

    Where to learn more

  • 7/28/2019 DB 3 Bjorklund

    77/79

    2007 Progress Software Corporation77 DB-3: Tips for Database Administrators

    Where to learn more

    OpenEdge Database Administration GuidePSDN: www.psdn.progress.com

    Classes (not the only ones) Bravepoint: bravepoint.com White Star Software: wss.com Progress DBA classes

    http://www.progress.com/openedge/services/education/index.ssp

    PSC Tech Support Knowledge Center

    Tip Number 0x16

  • 7/28/2019 DB 3 Bjorklund

    78/79

    2007 Progress Software Corporation78 DB-3: Tips for Database Administrators

    p u be 0 6

    Join the PEG

    www.peg.com

    Ask questions there

  • 7/28/2019 DB 3 Bjorklund

    79/79

    Questions