WEB开发网
开发学院数据库DB2 DB2 Express-C 9 DBA 和开发人员实验教程,快速实验... 阅读

DB2 Express-C 9 DBA 和开发人员实验教程,快速实验 3:处理实例、数据库和配置

 2009-11-16 00:00:00 来源:WEB开发网   
核心提示: 2.在新实例 newinst 中,用默认值创建一个数据库 newdb 清单 2.创建数据库 newdbsetdb2instance=newinstdb2startdb2createdatabasenewdb**db2create命令语法格式**CREATEDATABASEdatabase-nam

2.在新实例 newinst 中,用默认值创建一个数据库 newdb


清单 2.创建数据库 newdb
set db2instance=newinst 
db2start 
db2 create database newdb 
****************** db2 create 命令语法格式 ****************** 
CREATE DATABASE database-name 
[AT DBPARTITIONNUM | [AUTOMATIC STORAGE {NO | YES}] 
[ON drive[{,drive}...][DBPATH ON drive]] 
[ALIAS database-alias] [USING CODESET codeset TERRITORY territory] 
[COLLATE USING {SYSTEM | IDENTITY | IDENTITY_16BIT | COMPATIBILITY | NLSCHAR}] 
[PAGESIZE integer [K]] 
[NUMSEGS numsegs] [DFT_EXTENT_SZ dft_extentsize] [RESTRICTIVE] 
[CATALOG TABLESPACE tblspace-defn] [USER TABLESPACE tblspace-defn] 
[TEMPORARY TABLESPACE tblspace-defn] [WITH "comment-string"] ] 
[AUTOCONFIGURE [USING config-keyword value [{,config-keyword value}...]] 
[APPLY {DB ONLY | DB AND DBM | NONE}]] 
 
tblspace-defn: 
 MANAGED BY { SYSTEM USING ('string' [ {,'string'} ... ] ) | 
 DATABASE USING ({FILE | DEVICE} 'string' number-of-pages 
 [ {,{FILE | DEVICE} 'string' number-of-pages} ... ]) | AUTOMATIC STORAGE} 
 [EXTENTSIZE number-of-pages] [PREFETCHSIZE number-of-pages] 
 [OVERHEAD number-of-milliseconds] [TRANSFERRATE number-of-milliseconds] 
 [NO FILE SYSTEM CACHING | FILE SYSTEM CACHING] 
 [AUTORESIZE {NO | YES}] [INITIALSIZE integer {K |M |G}] 
 [INCREASESIZE integer {PERCENT |K |M |G}] [MAXSIZE {NONE | integer {K |M |G}}] 
 
 
config-keyword: 
 MEM_PERCENT、WORKLOAD_TYPE、NUM_STMTS、TPM、ADMIN_PRIORITY、 
 NUM_LOCAL_APPS、NUM_REMOTE_APPS、ISOLATION 和 BP_RESIZEABLE。 
 
CREATE TOOLS CATALOG catalog-name {CREATE NEW DATABASE database-name | 
USE EXISTING [TABLESPACE tblspace-name IN] DATABASE database-name} 
[FORCE] [KEEP INACTIVE] 
 

Tags:DB Express DBA

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接