There are three main kinds of tools for monitoring the back-motion of online system: System monitoring Interface (SMI), Tbstat and Tbcheck. First, the System monitoring Interface (SMI) we mainly use SQL command operation online Internal Database sysmaster internal table/structure, to obtain relevant maintenance information. The Sysmaster was created automatically when online was first initialized. It actually basically stores some data structures, not real tables. Using SMI has the following limitations:
You cannot lock or use isolation levels for a table in SMI.
Use of statements such as insert,delete,update (read only) is not allowed
Cannot use commands like Dbschema,dbexport
Using the Select ROWID statement will produce unpredictable results the main SMI tables are:
Database information in the Sysdatabases:online
Systabnames: Information for all tables in a database
Syslogs: Logical Log information
Sysdbspaces: Database Information
Syschunks,syslocks, etc.
Example 1: Displays the ordinal number of the chunk in the offline (offline) state and the database space in which it resides
Select chknum,dbsnum from Syschunks where is_offline=1 or misline=!
Example two: Display full chunk information
Select chknum,dbsnum from Syschunks where Nfree=0 II, tbstat lists information for the current moment (it is actually reading an SMI table)
No disk I/O required
system resources such as locks are not required, so system performance usage is not affected: Tbstat [-ABCDKLMPSTUZBDFPRX] [-R Seconds] [-o file] [infile]-a print all info (options:bcdklmps Tu
-B Print buffers (buffer)
-C Print configuration file (profile)
-D print dbspaces and chunks (dbspace and chunk)
-K Print Locks (lock)
-L print logging (log)
-M Print Message log
-P Print Profile
-S print latches (Gate gate)
-T print tblspaces (table space)
-U print Users (users)
-Z Zero profile counts
-B Print all buffers
-D print dbspaces and detailed chunk stats
-F Print Page flushers (page refresh process)
-P print profile, including bigreads
-R print LRU queues (LRU queue)
-X Print entire list of sharers and waiters for buffers
-R repeat options every n seconds (default:5)
-O put shared memory into specified file (default:tbstat.out)
InFile use infile to obtain shared memory information