DB2 common dummies 1000 questions (part 4)

Source: Internet
Author: User
Tags db2 port

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.

 

 

 

115. What permissions does DCL have?
CONTROL permission: if a user creates an object, the user can access the object completely.
GRANT the permission to the user.
The REVOKE statement revokes the permission of a user.

116. What are DDL functions?
CREATE
DECLARE
ALTER
DROP
And so on
117. What about DML?
INSERT
SELECT
UPDATE
DELETE
And so on
  
118. Is there a boolean type in DB2?
No
  
119. How do I query the built-in functions of DB2?
Built-in document ADMINISTION --> SQLREFERENCE --> FUNCTIONS

120. How to execute the DB2 script file?
DB2-VTFFILENAME
  
121. What is ROWNUM () like ORACLE in DB2?
ROW_NUMBER () OVER ()
  
122. How does DB2 get an explanation of the error code?
DB2? SQLCODE

123. What is the function for converting VARCHAR to INTEGER in DB2?
CAST ()
  
124. The function for converting INTEGER in DB2 to VARCHAR is?
CHAR ()
  
125. What is the function for converting VARCHAR to DATE in DB2?
DATE ()
  
126. The DATE function in DB2 to convert to VARCHAR is?
CHAR ()
  
127. Can I modify the TRIGGER in DB2?
No. Only reconstruction can be deleted.
  
128. How do I know the DB2 port number in WINDOWS?
\ WINNT \ SYSTEM32 \ DRIVERS \ ETC \ SERVICES
  
129. How does DB2 execute stored procedures?
DB2CALLPROCEDURE_NAME
  
130. How do I access the doscommand of DB2?
DB2CMD
  
131. How do I obtain the DB2 process number?
DB2LISTAPPLICATIONS
  
132. How to kill the DB2 process?
FORCEAPPLICATION (ID)
  
133. After user A installs DB2, how does user B start the DATABASE?
Add the. PROFILE file under user B.
./HOME/DB2INST/SQLLIB/DB2PROFILE
  
134. What are ORACLE-like snapshots in DB2?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.