Gestalte GoConqr mit. Was sollen wir als Nächstes hinzufügen?

Mindmap

DB2

Enéas Silva Mainframe Portugiesisch

Mind map about DB2: managing and starting or stopping it, DB2 commands and messages, and DB2 extension

Mind map: DB2

Inhalt der Mindmap

DB2

  1. How to manage DB2

    • how its implemented
      • Data plan
        • company usage and data processing
      • logical and physical design
        • ligica mode is created, relation to data, index
      • Data loaded into DB2
        • to move data sequential to newly created tables
      • Managing DB2
        • Db2 expects less interaction/ only in problems with comands to check status
        • utility programs report data validation, copuin, loading, beckup/ recovey porpuses
      • Fine Tuning the DB2 database
        • ongoing process of evaluating the performance of the database performed
      • load module
        • contains DB2 susbsys parameters
          • these used during Db2 startup to define subsystem characteristics
        • DSNZPARM
          • name of the load module
            • Security
            • Data set names
            • Tracing and checkpoint parameters
            • Performance and optimization settings
            • Log data set management
            • Apllication programming defaults
            • Space allocations
            • Data parameters
            • Databases to start automatically
          • MSTR
          • DBM1
          • DB2 address space
            • DB11IRLM(internal resource lock manager)
              • used to ensure integrity of DB2 data
                • by locking it while it is in use and releasing lock data no longer riquered
            • DB11DBM1
              • This address space handles majority of database related services
            • DB11MSTR
              • This address space perfomrs a number of system related functions
            • DB11DIST
              • distributed data facility provides support for remote requests
            • DB11ADMT
              • Responsible for scheduling execution commonly run user-defined tasks
  2. Enter DB2 commands and internet responses

    • ALTER BUFFERPOOL
      • changes the size and other attributes associated with buffer pools
        • -DB11 ALTER BUFFERPOOL(BP12) VPSIZE(50000)
          • If performance statistics indicate an issue with buffer pools or an error message indicates a problem with the resource, you may be instructed to alter the attributer of buffer pools.
    • -CANCEL THREAD
      • cancels processing for a local or distribted thread
      • -DB11 DISPLAY THREAD(*)
        • gives you the token to cancel a thread.
      • -CANCEL DDF THREAD(DSN10P.APPLPM01.3011003B2121)
        • This command is used to cancel a distribuited thread. The ID that appears here is a logical unit of work identifier that can be determined using the -DISPLAY THREAD command. This identifier can be replaced with the token number for the thread.
      • -CANCEL THREAD(30) DUMP
        • If a diagnostic dump is required as  part of the cancel proccess, then this command can be entered.
      • -CANCEL THREAD(46) NOBACKOUT
        • When a thread is cancelled DB2 will normally attmpt to recoer from any work in progress by performing backout processing. If this is not the action you require, then a NOBACKOUT option can be specified. Note that this will leave objects in an inconsistent state and further recovery action will be required.
      • CANCEL THREAD(12) FORCE
        • If the regular cancel thread has not been successful, you may need to use the FORCE option. Note that this option should be used as a last resort as it can potentially affect the DB2subsystem.
      • D TCPIP,,NETSTAT,CONN,IPADDR=9.28.121.100
        • Identify the TCP/IP connection ID using the IP address shown in the -DISPALY THREAD response
        • V TCPIP,,DROP,CONN=0000010A
          • Use the connection ID with this command, to terminate the connection.
      • D NET ID=SYSF721,SCOPE=ACT
        • The active VTAM sessions can be displayed using this command
        • V NET,TERM,SID=3E101090EA023
          • cancel the SNA session. character on the SESSID field should match one of the active VTAM sessions displayed from the command above.
    • DISPLAY DATABASE
      • Shows the status and attributes of a database
    • DISPLAY LOG
      • Displas the attributes of the current log and offload task.
        • -SET LOG CHKTIME(0)
          • The frequency in which checkpoints are taken can be modified using the CHKTIME and LOGLOAD options. iIn this example, the CHKTIME option is set to 0, which will initiate an immediate system checkpoint. This number can be enything from 0 to 1439 and spedifies the number of minute betewwe successive checkpoints.
        • -set log logload(50000)
          • the LOGLOAD option is used to define the number of log records that are witthen betwenn checkpoints. In this example, 50000 records will be written beforea checkpoint is taken. The value specified can be 1000 to 16000000 when SINGLE mode is in effect or 10000 to 99999999 whe BOTH mode has been invoked. This value can also be set to 0 to instruct DB2 that an immediate checkpoint is to be taken.
        • -SET BOTH CHKTIME(15) LOGLOAD(1000000)
          • This command is used to specify that both the LOGLOAD and CHKTIME parameters are to be used when determining when a checkpoint is taken. When the first criteria of wither item is met, the checkpoint will be take and both thresholds will be reset. In the example here, a checkpoint will be taken either when 15 minutes has elapsed ot 1000000 log record writes have occurred, since the last checkpoint. to revert back to using only one of thesecirteria, BOTH parameter can be replaced with SINGLE. For example, the -SET LOG SINGLE LOGLOAD(1000000) command will invoke a checkpoint using only the number of log records.
        • -SET LOG SUSPEND
          • the -SET LOG SUSPEND command is often used to quiesce DB2 activity so that a backup of data can be taken.
        • -SET NEWLOG(DSNC110.LOGCOPY1.DS01) COPY(1)
          • this command allows you to add a newly created and formatted log data set to the active log inventory. The COPY parameter is used when dual logging has been inplemented, to specify the log copy number.
    • DISPLAY TRACE
      • displays the status of any DB2 traces that are running
    • TERM UTILITY
      • Terminates a utility that is running
        • -TERM UTILITY
          • if theres a problem with some utility may be required to delete the utility yourself
      • -DB11 TERM UTILITY(utilitiname)
        • all utilities can be terminated using the -TERM UTILITY(*) command
    • STOP DB2
      • Stops the DB2 subsystem
        • QUIESCE
          • is default, will allow existing processing to complete
        • FORCE
          • will terminate any programs executing
            • may result additional error messages
            • dumping being produced during sutdown
        • CASTOUT
          • used to specify the action takes with change pages
            • residing in a group buffer pool
            • is the default and will write the buffer pool cahnges to disk
        • -db11 stop database(*)
          • When you may be required to temporaly stop databse so that maintenance activity can be performed.
      • -DB11 STOP DATABASE(DSNDB07)
        • This command will stop the databases individually.
      • variants
        • -STOP DATABASE(DTSPATDB) SPACENAM(GSERGEOM)
          • A especific table or index space can be target with the stop database command by using the SPACENAM  option. This command might be useful if an object needs to be restoreed and it first needs to be made unavailable. Wildcard characters can aalso be specified as part of the name.
        • -STOP DATABASE(DSN8D10A) SPACENAM(DSN8S10E) PART(4)
          • If a table space or index space has been partioned, then a specific partition can be stopped using this format of the command.
        • -STOP DATABASE(DB2OSC) SPACENAM(UTPRCX01) CLONE
          • This command is slightly different to the regular stop command in that currently executing applications can continue to access the object until they issue their next COMMIT. Following, the object will be stopped.
        • -STOP DATABASE(DSN00003) SPACENAM(UTPRCX01) CLONE
    • START DATABASE
      • Makes a database availabe for use
    • SET ARCHIVE
      • defines the attributes associated with archive log processing
    • RECOVER INDOUBT
      • used to recover indoubt threads during a DB2 restart
    • START db2
      • initializes DB2
        • -START DB2
    • IMPORTANT
      • Hyphen(-)
        • often used as default prefix character
      • -DB1A START DB2
        • when has different DB2 subsystem
          • the db2 system name need to be befor the command
      • before entering STOP DB2 command
        • you shoud ensure that DB2 has no outstanding write-to-operator messages
    • -START DB2 PARM(load module name)
      • to start using a different set of system parameters PARM paremeter
    • -START DB2 DECP(load module name)
      • the load module containing the parameters defoul
    • -START DB2 ACCESS(MAINT)
      • this maint option allows only users with
        • SYSSDM
        • SYSOPR
          • To access the database
        • SECADM
    • -START DB2 LIGHT(YES)
      • used to recover retained locks being held by a member
    • START admtproc,TRACE=on
      • administrative task scheduler is started using an MVS
    • -START DB2 MSTR(`REGION=8000K')
      • command you use to override a REGION parameter used by the MSTR DB2 address space
    • MONITORING AND RESOLVING DB2 OPERATIONAL PROBLEMS
      • Display the Status
        • databases
          • -DB1A DISPLAY DATABASE(*)
            • if you need to control the amount of information produced by DB2 commands then limit iption , -DB1A DISPLAY DATABASE(*)LIMIT(*)
            • STATUS
              • RO
                • read-obly
              • RW
                • THE OBJECT HAS BEEN STARTE FOR READ AND WRITE
              • CHKP
                • the object is in check pending status
              • GRECP
                • A failed group buffer pool has resulted in a marked recovery pending status
              • RBDP
                • rebuil pending status
              • RECP
                • recovery pending status
              • STOP
                • object is stopped
              • RESTP
                • restart pending state
              • STOP
                • The object is stopped
              • UT
                • started for utility processing only
              • WEPR
                • There is a physical damage to a page range of pages
            • remember the suttf with the physical I/O errors
            • VARIATIONS
              • -DISPLAY DATABASE(DSNDB01)
                • Information to a especific database
              • -DISPLAY DATABASE(*) RESTRICT
                • table spaces index spaces with restricted status, those objects have been stopped are in read only status or startde forutility only processing
              • -DISPLAY DATABASE(*) SPACENAM(DBD01)
                • The SPACENAM option can be used to specify a particular table space or index space for which details will be displayed
              • -DISPLAY DATABSE(*) USE
                • The USE option of variations can be specified with the DISPLAY DATABASE command that allows you to view more specific information.
              • -DB11 DISPLAY DATABASE(DSNG11A) LOCKS
                • LOCKINFO
                  • H
                    • the lock is held by agent or the Db2 member
                  • IS
                    • it is a lock with read intentions. IX is a lock with update intentions
                  • S
                    • the lock type is a table space logical lock
                  • C
                    • the lock is a freed at commit time
                • CORRID
                  • displays the name associated with the thread
                    • Which in this case show to TSO user IDs
        • buffer pools
        • logs
        • Utilities an threads
      • display atributes
        • log
        • data bases
        • buffer pools
          • -DB11 DISPLAY BUFFERPOOL(buffer pool name)
            • command can be used info for all active and inactive buffer pool
        • utilities an threads
          • -DB11 DISPLAY UTILITY(*)
            • If you are responsible for running or monitoring Db2 utilities used for purposes such as reorganizing file structures, copying Db2 VSAM files or compressing table spaces or indexes, then the progress of these utilities can be tracked using the DISPLAY UTILITY command.
      • Start and stop DB2 databases
      • modify attributes associated
        • buffer pools
        • logs,
        • utilities
        • threads
  3. Start and Stop DB2

    • graceul shutdown, DB2 takes checkpoint recording status log system
      • recording location check point in the bootstrap data set
  4. DUTIES ON DB2

    • Start,stop or restard DB2
    • Recover drom potential errors or problems
    • Respond to initialization messages
    • Respont to error messages
    • issue DB2 commands to display DB2
    • Run DB@ utilities
    • Manage authorizations
  5. DB2 MESSAGES

    • DSNR002I
      • DSN
        • the first 3 characters are DSN signifyin that is a DB2 message
      • R letter
        • this character identifies the DB2 subcomponent that issued it.
      • 002
        • uniq message number within the subcomponent
      • I
        • last chatacter indicates importance of the message. I = informational message
  6. EXTENTION DB2

    • Identify solutuion to DB2 problem
      • need an imergen IPL Hardware/software faisil
        • -STOP DB2 MODE(FORCE)
        • on the message
          • POSTPONED ABORT=3
            • POSTPONED ABORT IN THE RESTART MESSAGES INDICATES THE NUMBER OF UNITS OF WORK THAT COULD NOT PERFOMR BACKOUT WHEN DB2 WAS LAST BROUGHT DOWN. IF AUTOMATIC RECOVERY IS NOT ENABLED, A -RECOVER POSTPONED COMMAND WILL NEED TO BE ISSUED.
      • (BSDS) Bootstrap data sets
        • 3) -RECOVER BSDS command needs to be entered
          • This command will copy the contents from the other BSDS to the new one and reestablish dua BSDS mode.
        • 1 - the problem bootstrap data set shoul be deleted
        • 2 - a new bootstra data set is created with the same name as the problem one
      • log errors
        • out-of-space conditions
          • D R,L
            • command that idendify whether the log offload process is being held up by an outstanding system request.
          • problem associated log offload
            • -ARCHIVE LOG CANCEL OFFLOAD
              • command can be used to cancel any offloading that is currntly ocurring , and to restart the offload process.
            • -SET LOG NEWLOG(new log data set) COPY(copy number)
        • write or read I/O
        • loss dual active logging
    • identify the types of data that need to be gathered for probelm analysis
    • Run Dumps and Trace for DB2
      • HOW do you start DB2 trace
        • What information will get
        • -DB11 DISPLAY TRACE(*)
      • How to perform a dump on DB2 address space
      • What data shoud you gather if DB2 hangs
      • Which commands will provide me with additional system data?
        • D GRS,CONTENTION
          • This command dispays datailed information for active jobs and started tasks, logged-on time-sharing users, active APPC/MVS transaction programs, active initiators, and active system address spaces.
        • D A,ALL
          • This command is used to display the folowing information about all subsystem defined to z/OS
        • D SSI,ALL
          • This command is used to display resource contention information for the current global resource serialization complex.
        • if the DB2 problem does allow you to issue mvs commnad, those may provide valuable informatio
          • -DISPLAY THREAD(*) DETAIL
            • this command will display detailed information on all threads attached to DB2. THIS DISPLAYS INFORMATION ON ALL APPLICATION ATTACHED TO DB2
          • -DISPLAY UTILITY(*)
            • This command will display the status of all utility jobs currently executing within DB2
          • -DISPLAY DATABASE(*) USE
            • This command displays table spaces and indexes spaces for all databases within the db2 subsystem that are currntly in use and shows connection information for the thread linked with the activity.
          • -DISPLAY DATABASE(*) LOCKS
            • This command displays table spaces and index spaces for all databases within the DB2 subsystem that have been locked for use by an entity.
          • if DB2 is not reponsive not accepting any command it could indicate a hang situation
            • you may be instructed to creat a dump of the problem address before cancel db2
              • DUMP COMM=(DUMP OF DB2 MSTR)
                • R 0X,JOBNAME(db2jobnameMSTR)
                  • You can see from the console screen that you are prompted to enter the address space to be dumped. You are going to dump the MSTR Db2 address space, but the DIST, IRLM, and DBM1 address spaces can also be specified if required and are separated by commas in the command.
                • if there are problems you may instructed to run a trace on DB2
                  • -DB11 DISPLAY TRACE(*)
                    • field TYPE indicate the type of trace thta is active: possible values
                      • ACCTG - accounting records
                      • AUDIT - audit data
                      • MONITOR - monitor data
                      • PERFM - performance records
                      • STAT - statistical data
                  • -DB11 MODIFY TRACE(STAT) TNO(1) IFCID(1,2,3) CLASS(01)
                    • In the example shown hete, the command has been entered to modify trace number one so that class type one accepts additional trace events. A display command is then re-entered to show the change.
                  • -START TRACE(X) DEST(Y)
                    • X
                      • PERFM
                        • this atribute whica can substitute X on the big command. As the name suggests, a performance trace would nirmally only be used if there are performance issues and depending on what the trace is covering may impact greatly on the DB2 subsystem performance.
                      • ACCTG
                        • Depending in the classes you select to run, the accounting trace can also vary greatly in its impact on the DB2 subsystem.
                      • STAT
                        • By default, the statistics trace is always turned on and should remain like this unless there is a good reason for it to be turned off.Since statistics are recorded at intervals, the overhead on the DB2 subystem is less than other traces discussed here.
                      • AUDIT
                        • An audit trace may be important to run as a result of compliance issues, and i relation to other traces discussed here, will usually not affect the performance of the DB2 subsystem generally.
                      • MONITOR
                        • The monitor trace captures data used for online monitoring with user-written rograms. Again, the impact on the DB2 subsystem performance can vary depending on what classes are being used by this trace.
                    • y
                      • OPX
                        • The destination for trace records is a generic destination, which uses the first free OP slot.
                      • OPn
                        • The destination for trace records is a specific destination, where n is a number 1 through 8.
                      • SRV
                        • the destination for trace records is an exit to a user-written routine
                      • SMF
                        • The destination for trace records is the system  management facility(SMF)
                      • GTF
                        • The destination for trace records is the generalized trace facility(GTF)
                  • -DB11 START TRACE(PERFM) CLASS(1,2,3) DEST(SMF)
                    • Im this example, support has requested that you run a performance trace as there is an issue with the Db2 susbsystem. They require classes 1,2 and 3 of data to be gathered, with trace output to be recorded in SMF
                    • -DB11 STOP TRACE(PERFM)
                      • when enough data has been captured and support has indicated that the trace should be halted a -STOP TRACE command can be issued.
                      • -DB11 STOP TRACE(PERFM) CLASS(2,3)
                        • Will still allow class 1 records for the performance trace to be captured.
                      • -DB11 STOP TRACE(*)
      • when problems result in DB2 failing
        • you need to gather relevant data as possible
        • first type of data - focus on the activity that was occuring at the time of the error
          • the system log can identify system-wide activity
      • if DB2 is not responsive and does not accept any commands
        • it can indicate a hang situation
        • in this case you may be instructed to create a dumb of the problem
          • DUMP COMM=(DUMP OF DB2 MSTR)
    • Describe DB2 backup and Recovery processing

Informationen

Beschreibung
Mainframe Mindmap am DB2, erstellt von Enéas Silva am 20/04/2020.
Erstellt von
Enéas Silva
Aufrufe
1
Bewertung

Feedback

Worum geht es?

Was sollen wir als Nächstes hinzufügen?