There are many DB2 database commands and different functions can be implemented. The following describes some commonly used DB2 database commands in detail, hoping to give you a better understanding of DB2 database commands.
1. vi
Common DB2 commandsI. Common commands
Command
Description
Db2start
Start the current instance
Db2stop
Stop current instance
Db2stop force
Force stop the current instance
Db2icrt
Create an instance
Db2idrop
Delete An Instance
Db2ilist
List instances
The following articles mainly describe the commonly used backups, recovery commands, and correct use of DB2move in DB2 databases. The following are commonly used backups in DB2 databases, A detailed description of the recovery command and the correct use of DB2move. We hope you will have a better understanding of it after browsing.
all on Instance name"
9. View stored procedures
selectprocname,textfromsysibm.sysprocedures;
10. list tables viewing database tables
11. Find the position of the character in the string
locate('y','xyz')
Find the location of 'y' in 'xyz.
12. Calculate the number of days for different dates
days(date('2007-03-01'))-days(date('2007-02-28'))
Days returns the number of days calculated from 0001-01-01.
13. Create Table ing for one
This article tells you about the first 10 of the 30 Basic DB2 operation commands. If you are interested in the first 10 of the 30 Basic DB2 operation commands, you can click the following article to view it, hoping to help you learn it.
This article describes the top 10 basic operation
The following describes nine common DB2 commands for your reference. Common DB2 commands are an important foundation for learning DB2 databases. If you are new to DB2 databases, take a look.
1.
As a result of the work used in DB2, before the contact is not many, the first will be some of the usual commands recorded as follows, hope to help!DB2:1. Open the Command Line window#db2cmd2. Open the control center# Db2cmd DB2CC3. Open the Command editorDb2cmd Db2ce===== Operation Database Command =====#db2start#db2stop#db2
DB2 notes-Common commands visual database management software can use DbVisualizer, suitable for multiple databases. 1. a tablespace is actually a way to organize data files. Oracle organizes data through the tablespace database object. Before inserting data into the Oracle database, you must first create a tablespace and then insert the data into an object in the tablespace. The best way to explain databas
Label: Catalog Database:Catalog INDIRECT:DB2 Catalog Database On/db2sys[dir_name]Catalog REMOTE:DB2 catalog Database as at node Case: DB2 catalog TCPIP node Nodesun remote 192.168.1.1 server 50000 ostype Aix DB2 Catalog db sundb as SUN at node Nodesun Uncatalog Database:DB2 Uncatalog Database The best way to view your local database:DB2 List DB directory On/d
Permissions
db2grantdbadm,createtab,bindadd,connectondatabasetouseruserson
db2grantdbadm,createtab,bindadd,connect,loadondatabasetouseruserson
8. Set the stack size and set the stack size of mas1 to 512.
db2updatedbcfgformas1usingapplheapsz512
9. unmount the database
Db2move mas1 export
10. Export Database statements (export the relevant statements of the database in mas1 to mas1. SQL)
Db2look-d mas1-e-a-o mas1. SQL
11. Database loading
Db2move mas1 import-l/home/lujiadontc
The following articles mainly describe how to correctly execute DB2 commands. If you encounter DB2 commands in actual operations, but you do not know how to solve them correctly, so the following articles must be good teachers and friends for you.
You can use the z/OS console or z/OS applications for environments that
using (path "D:/DB2/node0000/sql00005/sqlt0000.0 ")DB2 set tablespace containers for 1 using (path "D:/DB2/node0000/sql00005/sqlt0001.0 ")DB2 set tablespace containers for 2 using (path "D:/DB2/node0000/sql00005/sqlt0002.0 ")DB2
The following articles mainly describe the six keys for correctly executing DB2 commands. If you are curious about the execution of the six keys of DB2 commands, the following articles will unveil its secrets. The following is a detailed description of the article. I hope you can learn from it.
This article outlines s
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. Creation and deletion of instancesDb2icrt --Create DB2 instanceDb2idrop --delete DB2 instanceSet DB2INTANCE=
This article teaches you how to execute DB2 commands easily. If you operate DB2 commands but you do not know how to operate them correctly, the following articles must be a mentor to you. The following is a detailed description of the main content of the article. I hope you will have a better understanding of it after
1. view the local node directory
In the command window, enter db2 list node directory.
2. cataloguing a TCP/IP Node
Command window: db2 catalog tcpip node
Remote
Server
Ostype
3. Cancel node Cataloguing
Db2 uncatalog node
4. view the system database directory
As a newcomer to the DB2 database, I am very interested in the basic commands and knowledge of DB2. Some experts have answered this question when I started the DB2 database course, the editor has organized it to help other friends learn and grasp it. The following describes the specific solution and hopes it will help
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.