- 論壇徽章:
- 0
|
推廣MySQL MaxDB/SAPDB項目
###################################################################################################
#########################利用數(shù)據(jù)庫管理器行命令新建數(shù)據(jù)庫實例
在本地或遠程新建數(shù)據(jù)庫實例。同時,內(nèi)核變量(fast和slow)需要定義。
準備工作
具有數(shù)據(jù)庫實例所駐留服務器的操作系統(tǒng)用戶權(quán)限。
如果在數(shù)據(jù)庫服務器上存在不同版本的系統(tǒng),在數(shù)據(jù)庫實例注冊時我們必須說明數(shù)據(jù)庫實例注冊對應版本數(shù)據(jù)庫系統(tǒng)的路徑。因此在數(shù)據(jù)庫管理器行命令接口中需要使用-R +數(shù)據(jù)庫系統(tǒng)安裝路徑 選項。
語法
db_create [-a|-auto] <database_name>; <dbm_user>;,<dbm_user_password>; [<os_user>;,< os_user_password>;]
-a | -auto 在UNIX系統(tǒng)下該參數(shù)被忽略。
database_name 數(shù)據(jù)庫實例名,最長8個字符。
dbm_user DBM操作者。在開始新建數(shù)據(jù)庫時,該用戶駐留在數(shù)據(jù)庫服務器上。只有該操作者才有后面訪問數(shù)據(jù)庫實例的權(quán)限。
dbm_user_password DBM操作者密碼。
os_user 操作系統(tǒng)用戶。如果想遠程創(chuàng)建數(shù)據(jù)庫實例,必須同時提供遠程服務器的操作系統(tǒng)用戶名。若登陸失敗,數(shù)據(jù)庫實例不會被裝載。
os_user_password 操作系統(tǒng)用戶密碼。
至此,為了訪問新的數(shù)據(jù)庫實例,需要提供<dbm_user>;和<password>;。
范例
UNIX系統(tǒng)命令: dbmcli -s db_create HOTELDB DAVID,BLUE
說明:
登錄到數(shù)據(jù)庫管理器行命令接口
創(chuàng)建本地HOTELDB數(shù)據(jù)庫實例
定義DBM操作者DAVID,密碼BLUE
使用–s選項以避免被認為是操作系統(tǒng)用戶。
反饋
命令成功執(zhí)行后,會出現(xiàn)OK消息。
若出錯,請參考反饋信息格式文檔。
詳細例子:
如何新建數(shù)據(jù)庫實例
如何新建檔案型數(shù)據(jù)庫實例
###################################################################################################
#########################2004-08-11 17:11
#########################如何新建數(shù)據(jù)庫實例
db_create 命令實例
通過數(shù)據(jù)庫管理器CLI新建數(shù)據(jù)庫實例,只需少數(shù)幾個DBMCLI命令。
首先執(zhí)行命令db_create,并定義DBM操作者。
dbmcli db_create <database_name>; <dbm_user>;,<dbm_user_password>;
·如果存在在多個數(shù)據(jù)庫系統(tǒng),需要-R選項選擇其中一個版本來運行。
dbmcli -R <dependent_path>; db_create <database_name>; <dbm_user>;,<dbm_user_password>;。
·如果遠程創(chuàng)建數(shù)據(jù)庫實例,需要使用-n選項。同時要登錄遠程服務器系統(tǒng)。
dbmcli -n <database_server>; db_create <database_name>; <dbm_user>;,<dbm_user_password>; <os_user>;,<os_user_password>;
可以使用DBMCLI腳本來創(chuàng)建新的數(shù)據(jù)庫實例:
dbmcli -d <database_name>; -u <dbm_user>;,<dbm_user_password>; -i <腳本文件>;
腳本實例:
param_startsession
param_init
param_put MAXUSERTASKS 5
param_checkall
param_commitsession
param_addvolume 1 LOG LOG_001 F 2000
param_addvolume 1 DATA DAT_001 F 10000
db_admin
db_activate <sysdba>;,<password>;
load_systab -ud <domain_password>;
根據(jù)需要修改以上數(shù)據(jù)庫參數(shù)。 |
|