Linux 命令行进入DB2
1. docker ps2.docker exec -it 813cb755c14c /bin/bash3.su - db2inst1 进入DB2账户下4.db2 list db directory 列出目前所有数据库5. db2 直接进入db2数据库命令行模式6.db2 connect to testdb(testdb数据库名称) 如果需要对某一个数据库...
1. docker ps
2.docker exec -it 813cb755c14c /bin/bash
3.su - db2inst1 进入DB2账户下
4.db2 list db directory 列出目前所有数据库
5. db2 直接进入db2数据库命令行模式
6.db2 connect to testdb(testdb数据库名称) 如果需要对某一个数据库操作先连接进去
6.?查看DB2命令帮助指引
db2 => ?
ACTIVATE DATABASE GET CONTACTS REFRESH LDAP
ADD CONTACT GET/UPDATE DB CFG REGISTER LDAP
ADD CONTACTGROUP GET/UPDATE DBM CFG REGISTER XMLSCHEMA
ADD DBPARTITIONNUM GET DBM MONITOR SWITCHES REGISTER XSROBJECT
ADD XMLSCHEMA GET DESCRIPTION FOR HEALTH REORG INDEXES/TABLE
ARCHIVE LOG GET NOTIFICATION LIST REORGCHK
ATTACH GET HEALTH SNAPSHOT RESET ADMIN CFG
AUTOCONFIGURE GET INSTANCE RESET ALERT CFG
BACKUP DATABASE GET MONITOR SWITCHES RESET DB CFG
BIND GET RECOMMENDATIONS RESET DBM CFG
CATALOG APPC NODE GET ROUTINE RESET MONITOR
CATALOG APPN NODE GET SNAPSHOT RESTART DATABASE
CATALOG DATABASE HELP RESTORE DATABASE
CATALOG DCS DATABASE HISTORY REWIND TAPE
CATALOG LDAP DATABASE IMPORT ROLLFORWARD DATABASE
CATALOG LDAP NODE INITIALIZE TAPE RUNCMD
CATALOG LOCAL NODE INSPECT RUNSTATS
CATALOG NPIPE NODE LIST ACTIVE DATABASES SET CLIENT
LIST COMMAND OPTIONS LIST APPLICATIONS SET RUNTIME DEGREE
CATALOG ODBC DATA SOURCE LIST DATABASE DIRECTORY SET TABLESPACE CONTAINERS
CATALOG TCPIP NODE LIST DB PARTITION GROUPS SET TAPE POSITION
CHANGE DATABASE COMMENT LIST DBPARTITIONNUMS SET UTIL_IMPACT_PRIORITY
CHANGE ISOLATION LEVEL LIST DCS APPLICATIONS SET WRITE
COMPLETE XMLSCHEMA LIST DCS DIRECTORY START DATABASE MANAGER
CREATE DATABASE LIST DRDA INDOUBT START HADR
CREATE TOOLS CATALOG LIST HISTORY STOP DATABASE MANAGER
DEACTIVATE DATABASE LIST INDOUBT TRANSACTIONS STOP HADR
DECOMPOSE XML DOCUMENT LIST NODE DIRECTORY TAKEOVER HADR
DECOMPOSE XML DOCUMENTS LIST ODBC DATA SOURCES TERMINATE
DEREGISTER LIST PACKAGES/TABLES UNCATALOG DATABASE
DESCRIBE LIST TABLESPACE CONTAINERS UNCATALOG DCS DATABASE
DETACH LIST TABLESPACES UNCATALOG LDAP DATABASE
DROP CONTACT LIST UTILITIES UNCATALOG LDAP NODE
DROP CONTACTGROUP LOAD UNCATALOG NODE
DROP DATABASE LOAD QUERY UNCATALOG ODBC DATA
DROP DBPARTITIONNUM PING UNQUIESCE DATABASE
DROP TOOLS CATALOG PREP/PRECOMPILE UNQUIESCE INSTANCE
ECHO PRUNE HISTORY/LOGFILE UPDATE ALERT CFG
EDIT PUT ROUTINE UPDATE COMMAND OPTIONS
EXPORT QUERY CLIENT UPDATE CONTACT
FORCE APPLICATION QUIESCE DATABASE UPDATE CONTACTGROUP
GET/UPDATE ADMIN CFG QUIESCE INSTANCE UPDATE NOTIFICATION LIST
GET ALERT CFG QUIESCE TABLESPACES UPDATE HISTORY
GET/UPDATE CLI CFG QUIT UPDATE LDAP NODE
GET CONNECTION STATE REBIND UPDATE MONITOR SWITCHES
GET CONTACTGROUP RECOVER UPGRADE DATABASE
GET CONTACTGROUPS REDISTRIBUTE DB PARTITION XQUERY
Note: Some commands are operating system specific and may not be available.
For further help:
? db2-command - help for specified command
? OPTIONS - help for all command options
? HELP - help for reading help screens
The preceding three options can be run as db2 <option> from an OS prompt.
!db2ic - DB2 Information Center (Windows only)
This command can also be run as db2ic from an OS prompt.
更多推荐
所有评论(0)