Oracle手工建立資料庫

來源:互聯網
上載者:User

標籤:

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手工建立資料庫

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.