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
Today, the customer visited (Japanese) and asked me the difference between DB2 and Oracle. Because it's not a DBA, I haven't really summed it up. But my first feeling: One is instance, one is database. Building Ora libraries and DB2 libraries is not
1. Disable DB2Db2stop or db2stop force.In the script, write both of them to avoid using the db2stop force command, for example:Db2stopDb2stop force2. Start DB2Db2start3. view the local node directoryDB2 list node directory4. cataloguing a TCP/IP
The command-line processor is the DB2 interface, which best embodies the power of DB2, as well as the simplicity and versatility of DB2. The author makes a detailed exposition of it through examples.0 Reviews:Blair Adamache, DB2 technology
Common DB2 commands
Common DB2 commandsI. Basics1. db2 connect to -- connect to the local database nameDb2 connect to user using -- connect to the remote database2. db2 force application all -- force all applications to disconnect the database3.
This time, our DB2 is deployed on Windows. Windows has a client that is called a graphical interface. But it does not seem to work well, we have some problems, let's solve it.
First, add a database instance:
Instances of DB2 are independent of each
1. Disable db2
Db2stop or db2stop force.
In the script, write both of them to avoid using the db2stop force command, for example:
Db2stop
Db2stop force
2. Start db2
Db2start
3. Create a database
Db2 create db
Or db2 create db using codeset GBK
First, add a database instance:
Instances of DB2 are independent of each other, and instances can be considered as containers for databases. When the default DB2 is installed, it builds an instance named DB2. We need to create a new one, and
1. Starting and stopping the databaseDb2start --Startdb2stop [Force] --Stop2. Connection to the database, disconnectionDB2 Connect to DBName [user UserID using PWD] --Establishing a connectionDB2 Connect RESET/DB2 Disconnect current --disconnect3.
Recently, due to project requirements, shell programs are used to batch Delete business table data, but business history data needs to be retained according to business needs. Because db2 is used in the project, db2 will generate a large number 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.