DB2 FAQS & TIPS

zhaozj2021-02-16  91

How to use the CLP (Command Line Processor) [Windows] first enter DB2CMD in the Windows command line window, then enter DB2

How to implement online backup? Database Establishment Log Mode The default is a cycle log mode (Circular Log), which is not available online. Therefore, I hope to implement online backups, first change the log mode to archive log mode (Archival log). Take the SAMPLE database as an example to change the configuration parameters of the Sample database in the control center to Recovery, or use DB2 Update DB CFG for Sample Using Logretain on the command line. After changing this parameter, connect the database again to display the database at the backup PENDING state. At this time, you need to make an offline backup of the database. In the Control Center, select the database offline backup or implement it with DB2 Backup DB Sample To 'Path' in the command line. Thereafter, the database can be backed up. You can choose to connect the database in the control center, or implement it with DB2 Backup DB Sample Online to 'Path' in the command line. Note: The relevant log file is also required when the Image file obtained by online backup is recovered.

How to display only the result of the results in the query statement, add Fetch First N Rows Only.

How to perform DB2 Scripts (Script) questions in the command line How to perform DB2 Scripts (Script) solution in the command line, run the DB2 script in the command window, can be implemented with the DB2 -SVTF script file name. For example, the script file is named SAMPLE.SQL, running: db2 -svtf sample.sql parameter: s When you encounter an error, the operation script V represents the output result to the screen T refers to the side of the separator f finger Need to follow the script file name

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

New Post(0)