Oracle 11g r2基於OMF方式手工建立資料庫
1)、使用OMF特性可以幫助我們最快的完成手工建立資料庫
2)、藉助聯機文件路徑:Database Administration -> Administrator's Guide -> 2 Creating and Configuring an Oracle Database
Step 1: Specify an Instance Identifier (SID)
[oralce@localhost]$ export $ORACLE_SID=ORCL
Step 2: Ensure That the Required Environment Variables Are Set
[oralce@localhost]$ vim .bash_profile
export $ORACLE_SID=ORCL
export $ORACLE_BASE=/u01/app/oracle
export $ORACLE_HOME=$ORACLE_BASE/produce/11.2.0/dbhome_1
export PATH=.:$PATH:/usr/sbin:$ORACLE_HOME/bin:$HOME/bin
[oralce@localhost]$ source ./bash_profile
Step 3: Choose a Database Administrator Authentication Method
[oralce@localhost]$ cd $ORACLE_HOME/bin
[oralce@localhost]$ orapwd file=?/dbs/orapwORCL password=oracle entries=30 force=y
[oralce@localhost]$ mkdir -p /u01/app/oracle/oradata/ORCL/
Step 4: Create the Initialization Parameter File
[oralce@localhost]$ cd $ORACLE_HOME/dbs
[oralce@localhost]$ vim initORCL.ora
DB_NAME=ORCL
instance_name=ORCL
control_files='/u01/app/oracle/oradata/ORCL/control01.ctl','/u01/app/oracle/oradata/ORCL/control02.ctl'
sga_target=600M
Step 5: (Windows Only) Create an Instance //Windows系統必須建立,Linux系統不需建立
Step 6: Connect to the Instance
[oralce@localhost]$ cd $ORACLE_HOE/bin
[oralce@localhost]$ ./sqlplus / as sysdba;
SQL>
Step 7: Create a Server Parameter File
[oralce@localhost]$ ./sqlplus sys/oracle as sysdba;
SQL> startup;
SQL> create spfile from pfile;
Step 8: Start the Instance
SQL> startup force;
SQL> show parameters db_unique_name;
SQL> show parameters instance_name;
9、Issue the CREATE DATABASE Statement
建立資料庫0分點:
1)、Instance_name大小寫敏感
2)、建立時預設Oracle_Home位於GC下面
3)、忘記建立control file
4)、忘記新增UNDO與TEMP表空間或者沒有開啟檔案大小自動擴充套件功能
5)、採用了MEMORY_TARGET引數而沒有足夠的記憶體
6)、所給的init檔案可能並非是在要求安裝的機器上
7)、忘記create spfile from pfile
8)、從聯機文件樣本檔案複製的文字、命令可能含有跳脫字元
9)、忘記建立臨時表空間
建立資料庫採用OMF方式是最快的方式
db_create_file_dest
db_create_online_log_dest_1
db_recovery_file_dest
建立資料庫使用哪一個最方便?
SQL> show parameter db_c
SQL> alter system set db_create_file_dest='/u01/app/oracle/oradata/ORCL';
SQL> CREATE DATABASE CHARACTER SET ZHS16GBK EXTENT MANAGEMENT LOCAL;
CREATE DATABASE會自動建立system、sysaux、undo、temp表空間
SQL> select * from dba_data_files; //查詢報錯證明資料字典沒有建立
Step 10: Create Additional Tablespaces
SQL> CREATE TABLESPACE users LOGGING DATAFILE '/u01/app/oracle/oradata/ORCL/users01.dbf' SIZE 500M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;
-- create a tablespace for indexes, separate from user tablespace (optional)
SQL> CREATE TABLESPACE indx_users LOGGING DATAFILE '/u01/app/oracle/oradata/ORCL/indx01.dbf' SIZE 100M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;
Step 11: Run Scripts to Build Data Dictionary Views
SQL> @?/rdbms/admin/catalog.sql
SQL> select * from dba_tables;
SQL> @?/rdbms/admin/catproc.sql
In SQL*Plus, connect to your Oracle Database instance as SYSTEM user:
SQL> alter user system identified by oralce;
SQL> conn system/oracle;
SQL> @?/sqlplus/admin/pupbld.sql
Step 12: (Optional) Run Scripts to Install Additional Options
Step 13: Back Up the Database.
Step 14: (Optional) Enable Automatic Instance Startup
2)、藉助聯機文件路徑:Database Administration -> Administrator's Guide -> 2 Creating and Configuring an Oracle Database
Step 1: Specify an Instance Identifier (SID)
[oralce@localhost]$ export $ORACLE_SID=ORCL
Step 2: Ensure That the Required Environment Variables Are Set
[oralce@localhost]$ vim .bash_profile
export $ORACLE_SID=ORCL
export $ORACLE_BASE=/u01/app/oracle
export $ORACLE_HOME=$ORACLE_BASE/produce/11.2.0/dbhome_1
export PATH=.:$PATH:/usr/sbin:$ORACLE_HOME/bin:$HOME/bin
[oralce@localhost]$ source ./bash_profile
Step 3: Choose a Database Administrator Authentication Method
[oralce@localhost]$ cd $ORACLE_HOME/bin
[oralce@localhost]$ orapwd file=?/dbs/orapwORCL password=oracle entries=30 force=y
[oralce@localhost]$ mkdir -p /u01/app/oracle/oradata/ORCL/
Step 4: Create the Initialization Parameter File
[oralce@localhost]$ cd $ORACLE_HOME/dbs
[oralce@localhost]$ vim initORCL.ora
DB_NAME=ORCL
instance_name=ORCL
control_files='/u01/app/oracle/oradata/ORCL/control01.ctl','/u01/app/oracle/oradata/ORCL/control02.ctl'
sga_target=600M
Step 5: (Windows Only) Create an Instance //Windows系統必須建立,Linux系統不需建立
Step 6: Connect to the Instance
[oralce@localhost]$ cd $ORACLE_HOE/bin
[oralce@localhost]$ ./sqlplus / as sysdba;
SQL>
Step 7: Create a Server Parameter File
[oralce@localhost]$ ./sqlplus sys/oracle as sysdba;
SQL> startup;
SQL> create spfile from pfile;
Step 8: Start the Instance
SQL> startup force;
SQL> show parameters db_unique_name;
SQL> show parameters instance_name;
9、Issue the CREATE DATABASE Statement
建立資料庫0分點:
1)、Instance_name大小寫敏感
2)、建立時預設Oracle_Home位於GC下面
3)、忘記建立control file
4)、忘記新增UNDO與TEMP表空間或者沒有開啟檔案大小自動擴充套件功能
5)、採用了MEMORY_TARGET引數而沒有足夠的記憶體
6)、所給的init檔案可能並非是在要求安裝的機器上
7)、忘記create spfile from pfile
8)、從聯機文件樣本檔案複製的文字、命令可能含有跳脫字元
9)、忘記建立臨時表空間
建立資料庫採用OMF方式是最快的方式
db_create_file_dest
db_create_online_log_dest_1
db_recovery_file_dest
建立資料庫使用哪一個最方便?
SQL> show parameter db_c
SQL> alter system set db_create_file_dest='/u01/app/oracle/oradata/ORCL';
SQL> CREATE DATABASE CHARACTER SET ZHS16GBK EXTENT MANAGEMENT LOCAL;
CREATE DATABASE會自動建立system、sysaux、undo、temp表空間
SQL> select * from dba_data_files; //查詢報錯證明資料字典沒有建立
Step 10: Create Additional Tablespaces
SQL> CREATE TABLESPACE users LOGGING DATAFILE '/u01/app/oracle/oradata/ORCL/users01.dbf' SIZE 500M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;
-- create a tablespace for indexes, separate from user tablespace (optional)
SQL> CREATE TABLESPACE indx_users LOGGING DATAFILE '/u01/app/oracle/oradata/ORCL/indx01.dbf' SIZE 100M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;
Step 11: Run Scripts to Build Data Dictionary Views
SQL> @?/rdbms/admin/catalog.sql
SQL> select * from dba_tables;
SQL> @?/rdbms/admin/catproc.sql
In SQL*Plus, connect to your Oracle Database instance as SYSTEM user:
SQL> alter user system identified by oralce;
SQL> conn system/oracle;
SQL> @?/sqlplus/admin/pupbld.sql
Step 12: (Optional) Run Scripts to Install Additional Options
Step 13: Back Up the Database.
Step 14: (Optional) Enable Automatic Instance Startup
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9034054/viewspace-1983712/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 2.5.8 指定OMF方式建立資料庫資料庫
- 確保Oracle 11g R2資料庫高可用性WQOracle資料庫
- 2.4.10 Step 9:手工建立資料庫資料庫
- oracle 11g建立基線詳細資訊Oracle
- 【AWR】Oracle資料庫建立awr基線Oracle資料庫
- 靜默方式安裝、升級oracle(二): 建立資料庫Oracle資料庫
- 【OMF】使用Oracle的OMF 特性Oracle
- 11G oracle資料庫重新啟動crsOracle資料庫
- 靜默安裝Oracle資料庫11gOracle資料庫
- Oracle 11g用impdp還原資料庫Oracle資料庫
- 細數基於ORACLE 資料庫環境的常見資料災難解決方式Oracle資料庫
- Oracle資料庫基礎:程式中呼叫sqlplus的方式Oracle資料庫SQL
- Oracle 11g RAC安裝--基於openfiler儲存+多路徑+udev方式Oracledev
- Oracle 11g R2 備份與恢復Oracle
- Oracle 11G資料庫單例項安裝Oracle資料庫單例
- oracle資料庫建立資料庫例項-九五小龐Oracle資料庫
- 用OMF來簡化資料庫管理(轉)資料庫
- oracle OMF的使用Oracle
- oracle 11g 單例項資料庫的安裝Oracle單例資料庫
- 採用手工方式建立IPSec隧道示例
- 4.3.4.1 在不使用Oracle OMF的情況下建立CDBOracle
- 2.1 關於建立資料庫資料庫
- oracle 19c建立非OMF檔案命名格式的PDBOracle
- oracle資料庫建立、刪除索引等操作Oracle資料庫索引
- oracle資料庫使用者建立步驟Oracle資料庫
- 揭祕Oracle雲(一):建立雲資料庫Oracle資料庫
- Oracle各種版本下“示例資料庫的建立”的建立Oracle資料庫
- 基於Docker部署Oracle、MySQL等資料庫的資料檔案持久化DockerOracleMySql資料庫持久化
- Linux下基於裸裝置建立10g資料庫Linux資料庫
- 揭祕Oracle雲(二):建立自治雲資料庫Oracle資料庫
- 基於C#語言Oracle.ManagedDataAccess操作Oracle資料庫連線語句C#Oracle資料庫
- 2.5.1 關於建立資料庫的子句資料庫
- Oracle Data Pump 11G 資料泵元件Oracle元件
- 基於Sql server資料庫的四種分頁方式總結SQLServer資料庫
- ORACLE資料庫基於時間點的不完全恢復Oracle資料庫
- Oracle 11g 重新建立控制檔案Oracle
- Oracle 11g刪除庫重建Oracle
- 【BUILD_ORACLE】Oracle 19c RAC搭建(六)建立RAC資料庫UIOracle資料庫
- 4.3.4.2 使用OMF 件建立CDB:示例