The db2 Tutorial we are reading is: DB2 common dummies: 1000 (4 ). 100. How to delete a sequence?
Drow.quencesequence_name
101. Which of the following file formats does DB2 support IMPORT?
Includes DEL, ASC, IXF, and WSF.
102. What file formats does DB2 support exporting (EXPORT?
Such as DEL, IXF, and WSF.
ASC format is not supported.
103. What file formats does DB2 support LOAD?
Such as DEL, ASC, and IXF.
The WSF format is not supported.
104. Which of the following file formats does DB2 support DB2MOVE?
Such as IXF.
The ASC, DEL, and WSF formats are not supported.
105. What are the two components of DB2 database monitoring?
SNAPSHOTMONITOR returns snapshots of database activity at a specific time point.
Event monitoring records event data.
106. What is the data element type monitored by the system?
COUNTER (COUNTER) records the number of activities.
Current Value of the measurement entry (GAUGE.
WATERMARK refers to the maximum or minimum number of elements that are monitored.
Details of reference types of INFORMATION monitoring activities.
The time when a TIMESTAMP activity occurs.
TIME returns the TIME spent by an activity.
107. How do I know the number of pages required by the monitoring heap?
(NUMBEROFMONITORINGAPPLICATIONS + 1) * (NUMBEROFDATABASES * (800 + (NUMBEROFTABLES
ACCESSED * 20) + (NUMBEROFAPPLICATIONSCONNECTED + 1) * (200 + (NUMBEROFTABLE
SPACES * 100)/4096
Its size is controlled by the MON_HEAD_SZ parameter.
108. How to create an event monitor?
CREATEEVENTMONITORTABLEMONFORTABLESWRITETOFILE 'd: \ TEMP'
109. How to activate the event monitor?
SETEVENTMONITORTABLEMONSTATE1
110. How do I stop the event monitor?
SETEVENTMONITORTABLEMONSTATE0
111. How do I query the monitor status?
SELECTEVMONNAME, EVENT_MON_STATE (EVMONNAME) FROMSYSCAT. EVENTMONITORS
112. How do I delete event monitors?
DROPEVENTMONITORTABLEMON
113. What is the difference between creating a pipeline event MONITOR on UNIX and WINDOWS (for PIPE, see MONITOR for EVNT?
Step 1: Define the event monitor
UNIX:
CONNECTTOSAMPLE
CREATEEVENTMONITORSTMB2FORSTATEMENTSWRITETOPIPE '/TMP/EVPIPE1'
WINDOWS:
CONNECTTOSAMPLE
CREATEEVENTMONITORSTMB2FORSTATEMENTSWRITETOPIPE '\. \ TMP \ EVPIPE1'
Step 2: Create a named pipe
UNIX:
You can use the MKFIFO () function or the MKFIFO command.
WINDOWS:
You can use the CREATENAMEDPIPE () function. The Pipe name is the same as that specified by CREATEEVENTMONITOR.
Step 3: Open the Named Pipe
UNIX:
Use the OPEN () function.
WINDOWS:
Use the CONNECTNAMEDPIPE () function.
You can also use the DB2EVMON command, for example:
DB2EVMON-DBSAMPLE-EVMSTMB2
Step 4: Activate the named pipe event monitor
Unless the named pipe event monitor is automatically activated
SETEVENTMONITORSTMB2STATE1
Step 5: read data from the Named Pipe
UNIX:
You can use the READ () function.
WINDOWS:
You can use the READFILE () function.
Step 6: Stop the event monitor
SETEVENTMONITORSTMB2STATE0
Step 7: Close the Named Pipe
UNIX:
You can use the CLOSE () function.
WINDOWS:
You can use the DISCONNECTNAMEDPIPE () function.
Step 8: Delete the named MPs queue
UNIX:
You can use the UNLINK () function.
WINDOWS:
You can use the CLOSEHANDLE () function.
114. What types of SQL statements does DB2 have?
DCL: Data Control language that provides access permissions to database objects.
DDL: Data Definition Language, creation, modification, and deletion of database objects.
DML: data manipulation language used to insert, update, and delete data.