DB2 Common fool question 1000 Q (iv)

Source: Internet
Author: User
Tags db2 db2 port error code port number

100. How do I delete a sequence?
Dropsequencesequence_name
  
101.DB2 the file format that supports importing (import) has?
There are: del,asc,ixf,wsf, etc.

102.DB2 the file format that supports exporting (export) has?
There are: Del,ixf,wsf and so on.
The ASC format is not supported.
  
103.DB2 support Load (load) file formats are available?
There are: DEL,ASC,IXF and so on.
WSF format is not supported.
  
104.DB2 support for Db2move file format?
There are: IXF and so on.
ASC,DEL,WSF format is not supported.
  
105.DB2 the two components of database monitoring?
Snapshot monitoring (Snapshotmonitor) returns a snapshot of the database activity at a specific point in time.
Event Monitoring (Eventmonitor) records the data in which the event occurred.
  
106. What types of data elements are monitored by the system?
Counter (COUNTER) to record the number of times the activity occurred.
Measure (gauge) The current value of a measure entry.
Watermark (watermark) The maximum or minimum number of elements reached from the monitor.
Information (information) monitors the details of the activity's reference type.
Date time that the Point-in-time (TIMESTAMP) activity occurred.
Time returns the time that an activity took.
  
107. How do I know the number of pages required for the monitoring heap?
(numberofmonitoringapplications+1) * (numberofdatabases* 800+ (numberoftables
  
ACCESSED*20) + ((numberofapplicationsconnected+1) * (200+ numberoftable
  
spaces*100)))/4096
Its size is controlled by the parameter MON_HEAD_SZ.
  
108. How to build Event monitor?
Createeventmonitortablemonfortableswritetofile ' D:\TEMP '
  
109. How do I activate the event monitor?
SETEVENTMONITORTABLEMONSTATE1
  
110. How do I stop the event monitor?
SETEVENTMONITORTABLEMONSTATE0
  
111. How to query the status of the monitor?
Selectevmonname,event_mon_state (Evmonname) fromsyscat. Eventmonitors

112. How do I remove the event monitor?
Dropeventmonitortablemon
  
113.UNIX the difference between creating a pipe event monitor (pipe evnt see Monitor) on Windows?
First step: Define Event Monitor
Unix:
Connecttosample
Createeventmonitorstmb2forstatementswritetopipe '/tmp/evpipe1 '
Windows:
Connecttosample
Createeventmonitorstmb2forstatementswritetopipe ' \\.\tmp\evpipe1 '
  
Step two: Establish Named pipes
Unix:
You can use the Mkfifo () function or the Mkfifo command.
Windows:
You can use the CreateNamedPipe () function, which has the same pipe name as the Createeventmonitor rule name.
  
Step three: Open Named pipes
Unix:
Use the open () function.
Windows:
Use the Connectnamedpipe () function.
You can also use the Db2evmon command, such as:
Db2evmon-dbsample-evmstmb2
  
Step Fourth: Activate the named pipe Event Monitor
Unless the named pipe Event Monitor is activated automatically,
Seteventmonitorstmb2state1

Step Fifth: Read data from Named pipes
Unix:
You can use the Read () function.
Windows:
You can use the ReadFile () function.

Step Sixth: Stop the event monitor
Seteventmonitorstmb2state0
  
Step seventh: Close the named pipe
Unix:
You can use the close () function.
Windows:
You can use the Disconnectnamedpipe () function.
  
Step eighth: Delete Named pipes
Unix:
You can use the unlink () function.
Windows:
You can use the CloseHandle () function.
  
114.DB2 The SQL statement of the class?
DCL: A Data Control language that provides access to database objects.
DDL: Data definition language, creating, modifying, and deleting database objects.
DML: A data manipulation language used to insert, update, and delete data.

What are the 115.DCL permissions?
CONTROL permission: If a user creates an object, the user is able to access the object completely.
The GRANT statement grants permissions to the user.
The REVOKE statement revokes the permissions of a user.

What are the 116.DDL?
CREATE
DECLARE
Alter
DROP
Wait
What are the 117.DML?
INSERT
SELECT
UPDATE
DELETE
Wait
  
Is there a Boolean type 118.db2?
No
  
119. How to query DB2 's built-in functions?
Self-contained document Administion-->sqlreference-->functions

120. How do I execute a DB2 script file?
Db2-vtffilename
  
The rownum () of 121.DB2 as Oracle is?
Row_number () over ()
  
122.db2 How do I get a description of the error code?
DB2? SQLCODE

varchar in 123.DB2 is converted to integer function?
CAST ()
  
The integer in the 124.DB2 is converted to the varchar function.
CHAR ()
  
125.DB2 the varchar converted to date is a function of
DATE ()
  
126.DB2 the date in the varchar is converted to a function of?
CHAR ()
  
Can the trigger in 127.DB2 be modified?
No, you can only delete the rebuild
  
128.WINDOWS how to know the DB2 port number?
\winnt\system32\drivers\etc\services
  
129.db2 How do I execute a stored procedure?
Can Db2callprocedure_name
  
130. How to enter the DB2 DOS command mode?
Db2cmd
  
131. How do I get the DB2 process number?
Db2listapplications
  
132. How to kill the DB2 process?
Forceapplication (ID)
  
133.A User installs DB2, how to start database with B user?
Add in. Profile under B user
./home/db2inst/sqllib/db2profile
  
Oracle-like snapshots in 134.DB2?

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.