Create database manually
1. first create directories for oradata and core_dump_dest etc, set
ORACLE_HOME, ORACLE_SID in .profle and create init.ora file in
$ORACLE_HOME/dbs
db_name='mydatabase'
memory_target=1G
processes = 150
control_files='/ora/app/oracle/product/11.2.0/dbs/CONTROL01.CTL','/ora/data/mydatabase/CONTROL02.CTL'
audit_file_dest=/ora/app/oracle/admin/mydatabase/adump
audit_trail ='db'
core_dump_dest=/ora/app/oracle/admin/mydatabase/cdump
[@more@]
#don't specify below 2 parameters, otherwise oracle says ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
#user_dump_dest=/ora/app/oracle/admin/mydatabase/udump
#background_dump_dest=/ora/app/oracle/admin/mydatabase/bdump
db_block_size=8192
db_domain=''
#db_recovery_file_dest='/flash_recovery_area'
#db_recovery_file_dest_size=2G
#diagnostic_dest=''
dispatchers='(PROTOCOL=TCP) (SERVICE=mydatabaseXDB)'
open_cursors=900
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
compatible ='11.2.0'
2. startup nomount, ready to create database manually.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2228344 bytes
Variable Size 616566664 bytes
Database Buffers 444596224 bytes
Redo Buffers 5545984 bytes
#Notes: UNDO TABLESPACE in below create database has to be the same name as undo_tablespace in init file.
CREATE DATABASE mydatabase
USER SYS IDENTIFIED BY mydb123
USER SYSTEM IDENTIFIED BY mydb123
LOGFILE GROUP 1 ('/ora/data/mydatabase/redo01.log') size 200M,
GROUP 2 ('/ora/data/mydatabase/redo02.log') size 200M,
GROUP 3 ('/ora/data/mydatabase/redo03.log') size 200M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/ora/data/mydatabase/system01.dbf' SIZE 1024M REUSE
SYSAUX DATAFILE '/ora/data/mydatabase/sysaux01.dbf' SIZE 1024M REUSE
DEFAULT TABLESPACE users
DATAFILE '/ora/data/mydatabase/users01.dbf'
SIZE 512M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/ora/data/mydatabase/temp01.dbf'
SIZE 512M REUSE
UNDO TABLESPACE UNDOTBS1
DATAFILE '/ora/data/mydatabase/undotbs01.dbf'
SIZE 512M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
建立資料字典檢視,分別執行下述指令碼來完成:
1 SQL> @?/rdbms/admin/catalog.sql
2 ......
3 ......
4 SQL> @?/rdbms/admin/catproc.sql
5 ......
6 ......
7 SQL> @?/sqlplus/admin/pupbld.sql --Note: use account system to execute this script, otherwise there's issue. Connect as SYSTEM before running this script
3. for other tablespace, use below statement to create.
SQL>create tablespace index
datafile '/ora/data/mydatabase/index01.dbf' size 100M
reuse autoextend on next 1280K maxsize unlimited
extend management local;
4. after the db is created, create spfile from pfile. reboot the database.
db_name='mydatabase'
memory_target=1G
processes = 150
control_files='/ora/app/oracle/product/11.2.0/dbs/CONTROL01.CTL','/ora/data/mydatabase/CONTROL02.CTL'
audit_file_dest=/ora/app/oracle/admin/mydatabase/adump
audit_trail ='db'
core_dump_dest=/ora/app/oracle/admin/mydatabase/cdump
[@more@]
#don't specify below 2 parameters, otherwise oracle says ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
#user_dump_dest=/ora/app/oracle/admin/mydatabase/udump
#background_dump_dest=/ora/app/oracle/admin/mydatabase/bdump
db_block_size=8192
db_domain=''
#db_recovery_file_dest='
#db_recovery_file_dest_size=2G
#diagnostic_dest='
dispatchers='(PROTOCOL=TCP) (SERVICE=mydatabaseXDB)'
open_cursors=900
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
compatible ='11.2.0'
2. startup nomount, ready to create database manually.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2228344 bytes
Variable Size 616566664 bytes
Database Buffers 444596224 bytes
Redo Buffers 5545984 bytes
#Notes: UNDO TABLESPACE in below create database has to be the same name as undo_tablespace in init file.
CREATE DATABASE mydatabase
USER SYS IDENTIFIED BY mydb123
USER SYSTEM IDENTIFIED BY mydb123
LOGFILE GROUP 1 ('/ora/data/mydatabase/redo01.log') size 200M,
GROUP 2 ('/ora/data/mydatabase/redo02.log') size 200M,
GROUP 3 ('/ora/data/mydatabase/redo03.log') size 200M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
EXTENT MANAGEMENT LOCAL
DATAFILE '/ora/data/mydatabase/system01.dbf' SIZE 1024M REUSE
SYSAUX DATAFILE '/ora/data/mydatabase/sysaux01.dbf' SIZE 1024M REUSE
DEFAULT TABLESPACE users
DATAFILE '/ora/data/mydatabase/users01.dbf'
SIZE 512M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/ora/data/mydatabase/temp01.dbf'
SIZE 512M REUSE
UNDO TABLESPACE UNDOTBS1
DATAFILE '/ora/data/mydatabase/undotbs01.dbf'
SIZE 512M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
建立資料字典檢視,分別執行下述指令碼來完成:
1 SQL> @?/rdbms/admin/catalog.sql
2 ......
3 ......
4 SQL> @?/rdbms/admin/catproc.sql
5 ......
6 ......
7 SQL> @?/sqlplus/admin/pupbld.sql --Note: use account system to execute this script, otherwise there's issue. Connect as SYSTEM before running this script
3. for other tablespace, use below statement to create.
SQL>create tablespace index
datafile '/ora/data/mydatabase/index01.dbf' size 100M
reuse autoextend on next 1280K maxsize unlimited
extend management local;
4. after the db is created, create spfile from pfile. reboot the database.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14377/viewspace-1060347/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- How to drop Oracle RAC database manually?OracleDatabase
- Create DatabaseDatabase
- PG create databaseDatabase
- RHEL 6.5環境Oracle 11g R2手工建庫指令碼(create database manually)Oracle指令碼Database
- Manually Backup - Restore or Clone a Database to Another Node [ID 562556.1]RESTDatabase
- alter database create datafileDatabase
- CREATE DATABASE LINKDatabase
- alter database create datafile '' as ''Database
- create table of mysql databaseMySqlDatabase
- The method of create a replicate of the database .Database
- Create RAC Standby Database for RAC Primary DatabaseDatabase
- 【OH】Creating a Database with the CREATE DATABASE StatementDatabase
- create a database stepsDatabase
- Tasks of a Database Administrator : Create and Open the Database (10)Database
- 12CR2 using create database command for create non-CDB rac databaseDatabase
- db2 create database 命令DB2Database
- Understanding the CREATE DATABASE Statement (69)Database
- create database 字符集設定Database
- Step 7: Issue the CREATE DATABASE Statement (65)Database
- 4.3.3 使用CREATE DATABASE語句建立CDBDatabase
- 【翻譯】Specifying CREATE DATABASE Statement ClausesDatabase
- alter database ... create datafile的原理及用途Database
- 手動create database 的可用命令Database
- 恢復一則 alter database create datafile '' as ''Database
- 2.4.1 使用 CREATE DATABASE 子句建立資料庫Database資料庫
- create database link中的identified by valuesDatabaseIDE
- 2.4 使用 CREATE DATABASE 語句建立資料庫Database資料庫
- 【PDB】Oracle 建立pdb說明(create pluggable database)OracleDatabase
- 4、MySQL建立資料庫(CREATE DATABASE語句)MySql資料庫Database
- How to Create Oracle Database QoS Management Administrator AccountsOracleDatabase
- How to create and relocate an 11gr2 RAC DATABASE SERVICEDatabase
- Unable To Create Database Using ASM ORA-15055DatabaseASM
- 4.3.4 使用CREATE DATABASE語句建立一個CDB:示例Database
- ORA-01031 CREATE TRIGGER ON DATABASEDatabase
- oracle create a new database using backup controlfile to traceOracleDatabase
- How to Create or Remove Restore Point on Standby database (文件 ID 1672977.1)REMRESTDatabase
- How To Drop, Create And Recreate DB Control In A 10g DatabaseDatabase
- GET ORA-32700 WHEN TRYING TO CREATE DATABASE USING 9.2Database