Recently has been doing database optimization this business, found themselves a lot of DB2 commands are forgotten, and even useless, and sometimes become a bottleneck in the efficiency of the work, 工欲善其事, its prerequisite, so did the following summary:1. Open the Command Line window#db2cmd2. Open the control center# Db2cmd DB2CC3. Open the Command editorDb2cmd Db2ce===== Operation Database Command =====4. Start
Http://www.jb51.net/list/list_155_1.htm
1. Open the command-line window #db2cmd2. Open the control center# Db2cmd DB2CC3. Open the Command editorDb2cmd Db2ce===== Operation Database Command ===== 4. Start the DB instance#db2start 5. Stop the DB instance#db2stop If you cannot stop the database due to the active connection, execute DB2 force application before running db2stop all to/db2stop force6. Create a d
1. Open the Command Line window#db2cmd2. Open the control center# Db2cmd DB2CC3. Open the Command editorDb2cmd Db2ce===== Operation Database Command =====4. Start the DB instance#db2start5. Stop the DB instance#db2stopIf you cannot stop the database due to the active connection, execute DB2 force application before running db2stop all to/db2stop force6. Create a database#
db2instprof = "C: Program filessqllib"-GMake registry variables take effectYou need to stop and start the instance (db2stop and db2start ).4. Operating System Environment VariablesA little simpler Export5. DB2 database manager configuration parametersThere are two configuration parameters: database level and instance level. The former variables exist in the Database Configuration File. Changing these varia
1. Open the Command Line window#db2cmd2. Open the control center# Db2cmd DB2CC3. Open the Command editorDb2cmd Db2ce===== Operation Database Command =====4. Start the DB instance#db2start5. Stop the DB instance#db2stopIf you cannot stop the database due to the active connection, execute DB2 force application before running db2stop all to/db2stop force6. Create a database#
dynaimic SQL on jiningDelete an instance:# Cd/usr/lpp/db2_07_01/instance#./Db2idrop InstNameList all DB2 instances:# Cd/usr/lpp/db2_07_01/bin#./Db2ilistCreate a catalog for a database$ Db2 catalog db btpdbs on/db2catalogCancel the compiled destination database btpdbs$ Db2 uncatalog db btpdbsView version# Db2levelDisplays the current database management instance$
target table through the Apply program. The Apply program can run on any server and must be connected to both the source and target servers. Data can be filtered through columns and rows, and merged, for example, through views), or transmitted through SQL expressions during the Apply process. When copying data between DB2 and other related data, the nickname must be created through the joint database system. The relational package and non-relational
Original address:Http://hi.baidu.com/wader2006/blog/item/78406b60b51f8b47ebf8f8f0.htmlDB2 Common Command Set----DB2 maintenance 2007-09-09 10:10 in the DB2 development process, the whole development process also has a very important part of the work is the maintenance of the database, for the maintenance of a huge information system is very necessary; Leave a simple maintenance manual for a rainy night. Som
Put the entire folder (jmam_dq.0) to D:\db_bak\Start-run, enter Db2cmd:1. Create a databaseDB2 Create DB dbname on D:(The database in the D disk, then the system will automatically add sql0000* directory, the result directory such as: D:\db2\node0000\sql0000*\ ...;If the remote connection database is created, perform DB2 attach to Servernode user ... using ... be
Analyze the causes of full DB2 Activity logs and solutions to full DB2 logs, db2 logs
Log usage
Displays the usage of logs under concurrent transaction conditions
There are three concurrent programs: Process 1, Process 2, and Process 3. Each program has two transactions. Blue blocks represent SQL statements, red blocks represent commit operations, and green bloc
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 friends learn and master it.
Common
In the process of DB2 development, one of the most important tasks throughout the development process is the maintenance of the database, which is necessary to maintain a large information system; Leave a simple maintenance manual for a rainy year; The following parts of the maintenance order are collected to treat our maintenance engineers and project managers.
* update:2006-06-14
* Memo: Please use "
printing of column headings
OFF
-Z
saves all output to the output file
OFF
More advanced scripting, including scheduling (scheduling), is available in the Script Center in DB2 ControlCenter, and logs can be used to see what's going on. In prototype (prototyping) mode, the CLP is just a quick way to start a program. Note the-X option in the above output: we ad
1, close DB2.
Db2stop or db2stop force.
Write two of the scripts in general, avoiding the use of Db2stop force commands, such as:
Db2stop
Db2stop Force
2, start DB2
Db2start
3, create the database
DB2 Create DB
or DB2 create DB using CodeSet GBK territory CN
4, delete t
Useradd-m-d/home/db2das-g db2agrp-u 803 db2das
Useradd-m-d/home/db2inst1-g db2igrp-u 801 db2inst1
Useradd-m-d/home/db2fenc1-g db2fgrp-u 802 db2fenc1
Set Password
Passwd db2inst1
Passwd db2fenc1
Passwd db2das
Check whether the creation is successful
Cat/etc/passwd | grep db2
Cat/etc/group | grep db2
To create an instance, you must have a db2 user to manage
an instance, you must have a db2 user to manage DB2.
/Opt/ibm/db2/V9.7/instance #./dascrt-u db2das
./Db2icrt-a server-u db2inst1 db2inst1
Generally, the Instance name is the same as the management user name.
Start the db2admin Manager
Su-db2das
Db2admin start
is not suitable for addressable memory space. (We'll talk in the back to addressable memory.) This means that DB2 cannot start the database because a database must have at least one buffer pool. If the database does not start, you cannot connect to the database, and you cannot change the size of the buffer pool. For this reason,
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.