DB2 commonly used fool problem

xiaoxiao2021-04-08  507

DB2 commonly used fool problem 1000 asked (五)

Everyone may encounter some seemingly simple questions when applying DB2, especially for newcomers, I have a simple summary, release it to everyone, I hope everyone can help, and also welcome everyone to discuss. Common development, common progress! The following mainly based on DB27.x. The following characters are lowercase. This article is not read for DB2 masters. DB2 functions 135.avg () returns a set of values. Selectavg Salary) fromBSempms; 136.corr (), correlation () returns a relational coefficient of a pair of values. SelectCorRelation (Salary, Bonus) fromBSempms; 137.count () Returns a number of rows or values. SelectCount (*) fromBSempms; 138.covar (), COVARIANCE () Returns a covariance of a pair of values. SELECTCOVAR (Salary, Bonus) fromBSempms; 139.max () Returns the maximum value in a set of values. Selectmax (Salary) fromBSempms; 140.min () Returns a minimum of a set of values. Selectmin (Salary) fromBSempms; 141.stddev () Returns the standard deviation of a set of values. Selectstddev (Salary) fromBSempms; 142.sum () Returns a set of data and. SelectSum (Salary) "143.VAR (), variance () returns a variance of a set of values. Selectvariance (Salary) fromBSempms; 144.abs (), absval () returns an absolute value of the parameter. Selectabs (-3.4) fromBSempms; 145.acos ) Returns the anti-cosrome value of the parameter. Selectacos (0.9) fromBSempms; 146.ascii () Returns the ASCII code of the leftmost character of the integer parameter. Selectascii ('r') fromBSempms; 147.asin () Returns the angle representation of the arc The argument of the anti-stereo function. SELECTASIN (0.9) fromBSempms; 148.atan () Returns an intermediate cut value of the parameter, this parameter The arc parameters represent the angle of the angle. Selectatan (0.9) fromBSempms;

BEST_DBA Published on June 21, 2006 Comments (0) Post a comment

DB2 commonly used fool problem 1000 asked (four)

100. How to delete the sequence? Dropsequencesequence_name 101.db2 supports import (import) file format Is it: Del, ASC, IXF, WSF, etc. 102.DB2 Support Export (export) file format? Has: Del, IXF, WSF The ASC format is not supported. 103.DB2 Support load (LOAD) file format Is it: Del, ASC, IXF, etc. Does not support WSF format. 104.DB2 Support DB2MOVE file format Is there: IXF, etc. ASC, DEL, WSF format. 105.DB2 Database Monitoring two components? SnapshotMonitor can return a snapshot of database activity of a specific time point. Event monitor (EventMonitor) Record the data generated by the event. 106. System The monitoring data element type? Counter records the number of times of activity. The current value of the Gauge measurement entries. Watermark is the maximum or minimum value of the elements from monitoring. Information (Information) monitoring activities Type details. Timestamp activity The date time occurred. Time (time) returns a time taken. 107. How do I know the number of pages needed to monitor the heap? (NumberofMonitoringApplications 1) * (NumberofDatabases * (800 (NUMBEROFTABLES ACCESSED * 20) ((NUMBEROFAPPLICATIONSCONNECTED 1) * (200 (NUMBEROFTABLE SPACES * 100))))) / 4096 by its size parameters MON_HEAD_SZ control 108. how to create an event monitor CREATEEVENTMONITORTABLEMONFORTABLESWRITETOFILE'D:.? / TEMP '109. How to activate the event monitor? STEVENTMONITORTABLEMOMOSTATATE1 110. How to stop the event monitor? SetEventMonitorTableMonState0 111. How to query the status of the monitor? SELECTEVMONNAME, EVENT_MON_STATE (EVMONNAME) fromsyscat.EventMonitors ? 112. How to delete event monitors to create a pipe event monitor on DROPEVENTMONITORTABLEMON 113.UNIX and WINDOWS (PIPE meaning EVNT see MONITOR) of different first step:? Define an event monitor UNIX: CONNECTTOSAMPLE CREATEEVENTMONITORSTMB2FORSTATEMENTSWRITETOPIPE '/ TMP / EVPIPE1' WINDOWS: CONNECTOSMPLE CREATEEVENTMONITORSTMB2FORSTATEMENTSWRITOPIPE '/ / / TMP / EVPIPE1'

Step 2: Establish a named pipeline UNIX: You can use the mkfifo () function or mkfifo command. Windows: You can use the CreateNameDpipe () function, the pipe name is the same name with the CreateEventMonitor specified. Step 3: Open Name Pipeline Unix: Use the open () function Windows: Using the connectNamedPipe () function. You can also use the db2evmon command, such as: DB2EVMON-dbsample-evmstmb2 Step 4: Activate Name Pipe Event Monitor Unless automatically activates the named pipe event monitor, setEventMonitorstMB2State1 Step 5: From Named Pipeline Read Data Unix: You can use the read () function. Windows: You can use the readfile () function. Step 6: Stop event monitor setEventMonitorstMB2State0 Step 7: Close Name Division Unix: You can use a close () function. Windows: you can use DISCONNECTNAMEDPIPE () function. Eight step: Delete Named Pipeline Unix: You can use a unlink () function. Windows: You can use a CloseHandle () function. 114.DB2 SQL statement Category? DCL: Data Control Language, provide database objects Access rights. DDL: Data Definition Language, Create, Modify, Delete Database Objects. DML: Data Manipulation Language, Used to Insert, Update, Delete Data. [Page] 115.DCL Who? Control Permissions: If users Create an object, then change the user fully access the object. The GRANT statement grants permissions to the user. The REVOKE statement revokes the permissions of a user. What are the 117.dml of CREATE DECLARE ALTER DROP? Insert SELECT UPDATE DELETE Waiting for 118.db2 Is there a Boolean type? No 119. How to query the built-in function of DB2? Free Document Administration -> SQLReference -> Functions 120. How to perform DB2 script file? DB2-vtffilename 121.db2 in Oracle Rownum () is? ROW _Number () over () 122.db2 How to get an error code? DB2? SQLCODE 123.DB2 VARCHAR converted to Integer's function? Cast () 124.db2 Integer converted to varchar function? Charr ( 125. DATE Switch to Date () 126.DB2 function "CHAR () 127.DB2 The TRIGGER in CHAR () 127.DB2 can be modified? Cannot, only delete reconstruction 128 .Windows How to know the port number of DB2? / Winnt / System32 / drivers / etc / services 129.db2 How to perform a stored procedure? Can DB2CallProcedure_name 130. How to enter DB2 DOS command mode? DB2CMD 131. How to get DB2 process number? DB2ListApplications 132. How to kill DB2 processes? ForceApplication (ID) 133.A User After installing DB2, how to start Database with B users? Plus. Plus in .Profile ./Home_DB2inst/sqllib/db2profile 134.db2 Sato-like Snapshots of Oracle? Best_dba Published on June 21, 2006 Reviews (0) Post a comment

DB2 commonly used fool problem 1000 asked (three)

Everyone may encounter some seemingly simple questions when applying DB2, especially for newcomers, I have a simple summary, release it to everyone, I hope everyone can help, and also welcome everyone to discuss. Common development, make progress together!

The following mainly based on DB27.x. The following characters are lowercase. This article is not read for DB2 masters. All characters are lowercase. 91. How to create a profile of DB2? DB2's profile function is similar to Oracle ! materialized view syntax is: CREATESUMMARYTABLETABLE_NAMEAS (fULLSELECT) ... For example: define a refresh summary tables can be:. CREATESUMMARYTABLETABLE_NAMEAS (SELECT * FROMTABLE_NAME1WHERECOL1 = AAA) DATAINITIALLYDEFERREDREFRESHDEFERRED wherein DATAINITIALLYDEFERRED predetermined data can not be inserted into the table as part of the statement of REFRESHDEFERRED predetermined CREATETABLE The data in the table can be refreshed when any RefreshTable statement is used! 92. How to refresh the overview? REFRESHTABLESUM_TABLE where SUM_TABLE is a profile. 93. How to modify the profile? Altertablesum_table ... 94. How to create a temporary table? Syntax: DECLAREGLOBALTEMPORARYTABLETABLE_NAME AS (fULLSELECT) DEFINITIONONLY EXCLUDINGIDENTITYCOLUMNATTRIBUTES ONCOMMITDELETEROWS NOTLOGGED first row the name of the temporary table of predetermined second line defines a predetermined temporary table column. the third line defines the results are not copied from the source table definition column of the identity fourth predetermined row If you do not open WITHGOLD cursor will delete all the rows in the table to change the provisions of the fifth row of the table does not record such as:.. DECLAREGLOBALTEMPORARYTABLEDEC_BSEMPMS AS (SELECT * FROMBSEMPMS) management DEFINITIONONLY EXCLUDINGIDENTITYCOLUMNATTRIBUTES ONCOMMITDELETEROWS NOTLOGGED 95. view of how to create a view:? CREATEVIEWVIEW_NAMEASSELECT * FROMTABLE_NAMEWHERE ... Delete View: DropViewView_name 96. How do I know the contents of the view definition? Sext in Seter, Serext *,. ​​97. How to create an alias? Createaliasalias_nameforpro_name Pro_Name can be Table, View, Alias, Nickname, etc. 98. How to create a sequence? For example: createquencedsequence_name StartwithStart_Number IncrementByvalue1 NomaxValue NOCYCLEMAXIMUMNUMBEROFSEQUENCEVALUES Name of the first line specified sequence. The second line specifies the start value of the sequence. The third line stipulates the new range. The fourth line requires no maximum numerical limit. 99 How to change the sequence? AltersequenceSequence_name ... You can modify the parameter startwith's Start_Number Increment Value1 NomaxValue NOCYCLEVALUMUMNUMBEROFSEQUENCEVALUES Maximum value BEST_DBA Published on June 21, 2006 Comments (0) Published comments

DB2 commonly used fool problem 1000 asked (2)

Everyone may encounter some seemingly simple questions when applying DB2, especially for newcomers, I have a simple summary, release it to everyone, I hope everyone can help, and also welcome everyone to discuss. Common development, common progress! The following mainly based on DB27.x. The following characters are lowercase.

This article is not read for DB2 masters. All characters are lowercase. 51. Installing DB2 default example names? Devils in Windows or OS / 2 is DB2 in Linux or UNIX environment is DB2Inst1 52. Installation The default account is that the default is DB2Admin in the Linux or UNIX environment in Windows or OS / 2. What are the types of DB2AS 53? CLIENT (Customer) Standalone "Satellite (Satellite) EEDB2 EEE 54. How to create an example? DB2ICRTINSTNAME <... Parameters> 55. How to list all available cases on your system? DB2IList 56. How do you know which example of current conversation? GetInstance 57. How to update the configuration of the example? DB2IUPDT58. Delete example? DB2IDropInstance_name The specific steps are as follows: Stopping Examples All applications perform DB2Terminate on all open command lines DB2TERMINATE Run DB2Stop Backup DB2Instprof registration variables Pointed in the example directory exit example All login Use DB2IDROP or delete ID 59. How to list local All products on the system? DB2LICM-L 60. How to add a product license? DB2LICM-AFILENAME 61. How to delete a product license? DB2LICM-RPRODUCTPASSWORD 62. How to update the number of licenses that have been purchased? DB2LICM-U

63. How to force only the number of purchased numbers? DB2LICM-Ehard64. How to update the licensing policy type used on the system? DB2LICM-P

RegisteredConcurrent 65. How to update the number of processors on the system? DB2LICM-N

66. How to query the version information of the license file record? DB2LICM-V 67. How to query DB2LICM help information? DB2LICM-H 68. What is at least which tablespaces? One or more user table spaces one or more Temporary table space [PAGE] 69. Different of the control mode between the data and the storage space, where is the space (SMS) database management space (SMS) 70. How to list system databases Directory content? ListDatabaseDirectory 71.createDatabase is a SQL command? Not ABC configuration parameter value? UpdatedatabaseConfigurationForAbc Using

转载请注明原文地址:https://www.9cbs.com/read-132893.html

New Post(0)