/usr/lpp/db2_07_01/instance
#./db2idrop Instname
List all DB2 instances:
# Cd/usr/lpp/db2_07_01/bin
#./db2ilist
Create a catalog for a database
$ DB2 Catalog DB Btpdbs On/db2catalog
Canceling a cataloged database Btpdbs
$ DB2 Uncatalog DB Btpdbs
View version
# Db2level
Show current Database Admin instance
$
1. Open the command line window
# Db2cmd
2. Open the Control Center
# Db2cmd db2cc
3. Open the command editor.
Db2cmd db2ce
===== Operation database commands ====
4. Start a database instance# Db2start
5. Stop a database instance# Db2stop
If you cannot stop the database because of the activated connection, you can run DB2 force application all before running db2stop force.6. Create a database#
from TAB76.IXF of Ixf Commitcount, insert into Achact"DB2 "CREATE table achact_t like Achact"DB2 "Rename table achact_t to Achact"DB2 "INSERT INTO achact_t select * from Achact where txndt>= (select Lstpgdt fromAcmact where Actno=achact.actno) "DB2 get snapshot for Dynaimic SQL on Jining To delete an instance: # cd/us
specific user tables#db2 list tables for schema [user]19. Create a new table (T1) with the same structure as a table (T2) in the database#db2 CREATE table T1 like T220. Import data from one table T1 to another table T2#db2 "INSERT INTO T1 select * from T2"21. Enquiry Form#db2
specific user tables#db2 list tables for schema [user]19. Create a new table (T1) with the same structure as a table (T2) in the database#db2 CREATE table T1 like T220. Import data from one table T1 to another table T2#db2 "INSERT INTO T1 select * from T2"21. Enquiry Form#db2
. List User Tables#db2 List Tables for user18. List specific user tables#db2 list tables for schema [user]19. Create a new table (T1) with the same structure as a table (T2) in the database#db
The following articles mainly introduce you to the basic DB2 commands and related knowledge that you must master as a beginner in DB2 database learning. We all know that you are in the DB2 database getting started course, some friends mentioned this question, and experts answered it and compiled it to help other friend
Db2 command list has been working for more than a month. Because the company wants to use DB2 databases, it always tries its best to read this book. For a while, I have some experiences and summarized some commonly used DB2 commands, share it with you! I hope you will be hel
If you are familiar with the DB2 database, you must first understand and master the basic commands of the DB2 database. This article provides you with some frequently used commands for your reference, hope to help you.
Dasauto-automatically starts the DB2 Management Server
The following articles mainly describe the commands of the DB2 database in the linux operating system, if you are interested in the commands of the DB2 database in the linux operating system, you can click the following article to view the instructions. The following is a detailed introduction of the article. I hope yo
Label:1. Launch instance (DB2INST1): Db2start 2. Stop the Instance (DB2INST1): Db2stop 3. List all instances (DB2INST1) Db2ilist 3-1. List the current instance: DB2 Get Instance 3-2. List all databases: DB2 List Database Directory
Common DB2 commands
Common DB2 commandsI. Basics1. db2 connect to Db2 connect to 2. db2 force application all -- force all applications to disconnect the database3. db2 backup db db2nam
page size is 4 kb, the preceding command creates 3 MB log files, occupying MB of hard disk space. 25600 * 4kb = 102400kb.19. Restore the temporary data to the roll-forward status.DB2 rollforward database testdb to end of logs and complete noretrieve20. view the current CLP settingsDB2 list Comand options21. Update the specific settings of the current CLP sessionDB2 update command options using options...22. Execute operating system
Operation commands in the db2 database
Common DB2 commands. For more information about using db2, see. The management Client no longer has a control center after v9.7, but uses the Data Studio Client. The license key is not applied during the installation of the
the backup success:DB2 List History Backup all for sample can see more records of this backup.The DB2ADUTL query command can also see the return value.5), Remark:The backup command is performed on the primary node (the node in the catalog table space), and this is done for the other node.2. Online Backup:1), first open the database configuration parameters that support Online backup:DB2 Update DB CFG for sample using UserExit on Enable user exitDB2 U
DB2 database commands
1. Start the database
Db2start
2. Stop the database
Db2stop
3. Connect to the database
Db2 connect to o_yd user db2 using pwd
4. Read Database Management Program Configuration
Db2 get dbm cfg
5. Write Database Management Program Configuration
;db2rebind DB2CERT/1 Lizhi.log6. Delete files in the active log path so that the file name is less than S0000100.log:Db2=>prune logfile prior to S0000100.log7. View the settings for the current command line processor:Db2=>list command Options8.DB2 the database Manager to obtain row-level locks:Db2=>alter table (tablename) locksize table9. Forcing the DB2 database
Instance name"
Db2 "update monitor switches using lock ON sort ON bufferpool ON uow ON table ON statement ON"
Db2 "get snapshot for all on Instance name"
9. View stored procedures
Select procname, text from sysibm. sysprocedures;
10. list tables viewing database tables
11. Find the position of the character in the string
Locate ('y', 'xyz ')
Find the location of
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.