標籤:
1,確定資料庫全域變數名和執行個體名
DB_NAME = ORCL
SID = ORCL
2,確定資料庫管理員的認證方式;
管理員的認證方式包括作業系統認證和口令認證兩種,本例採用作業系統認證
3,建立初始化參數檔案
可以拷貝一個檔案修改下
oracle 11g提供的參數檔案位於C:\app\Administrator\admin\orcl\pfile下,具體內容如下,可根據自己需要修改,修改後放在C:\app\Administrator\admin\orcl\pfile檔案夾下,命名為initorcl.ora。
############################################################################### Copyright (c) 1991, 2001, 2002 by Oracle Corporation############################################################################## ############################################ Shared Server###########################################dispatchers="(PROTOCOL=TCP) (SERVICE=orclXDB)" ############################################ Miscellaneous###########################################compatible=11.2.0.0.0diagnostic_dest=C:\app\Administratormemory_target=396337664 ############################################ Security and Auditing###########################################audit_file_dest=C:\app\Administrator\admin\orcl\adumpaudit_trail=dbremote_login_passwordfile=EXCLUSIVE ############################################ Database Identification###########################################db_domain=""db_name=orcl ############################################ File Configuration###########################################control_files=("C:\app\Administrator\flash_recovery_area\orcl\control01.ctl", "C:\app\Administrator\flash_recovery_area\orcl\control02.ctl","C:\app\Administrator\flash_recovery_area\orcl\control03.ctl")db_recovery_file_dest=C:\app\Administrator\flash_recovery_areadb_recovery_file_dest_size=402029312 ############################################ Cursors and Library Cache###########################################open_cursors=300 ############################################ System Managed Undo and Rollback Segments###########################################undo_tablespace=UNDOTBS1 ############################################ Network Registration###########################################local_listener=LISTENER_ORCL ############################################ Processes and Sessions###########################################processes=150 ############################################ Cache and I/O###########################################db_block_size=8192
4,建立執行個體
選擇“程式-->運行”,輸入“cmd”命令,開啟DOS介面
(1)將環境變數ORACLE_SID設定為“ORCL”
C:\SET ORACLE_SID=ORCL
(2)利用ORADIM命令建立ORCL資料庫
C:\ORADMIN -NEW -SID ORCL-INTPWD 密碼 -STARTMODE MANUAL -PFILE C:\app\Administrator\admin\orcl\pfile
注意:ORADMIN是Oracle提供的一個對執行個體進行管理的工具,可以建立、修改、刪除、啟動和關閉一個執行個體,執行C:\ORADMIN HELP命令可以查看該命令的使用方式
5,串連並啟動執行個體
1.C:\sqlplus /nolog
2.SQL>connect sys/mynewdb as sysdba;
3.SQL>startup mount;
4.SQL>alter database open;
6,下面就可以建資料庫了。
Oracle手工建立資料庫