Create a new Database Instance (in SILENT mode)

来源:互联网 发布:手机广告声音制作软件 编辑:程序博客网 时间:2024/05/18 04:57

Create a new Database Instance (in SILENT mode)

1) Use PUTTY to login to Database server as root.

2) Create an ‘oradata’ folder for storing oracle datafiles (if not created):

cd /u02
mkdir oradata
chown oracle:oinstall oradata

3) Login as oracle user and prepare the oracle environment path for database instance creation:

su - oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH

4) Run the command to create a new database instance in SILENT mode:

cd /u01/app/oracle/product/10.2.0/db_1/bin

dbca -silent                           /
       -createDatabase                   /
       -templateName General_Purpose.dbc     /
       -gdbName <INSTANCE_NAME>                     /
       -sid <INSTANCE_NAME>                         /
       -SysPassword or6cl3    /
       -SystemPassword or6cl3           /
       -emConfiguration NONE             /
       -datafileDestination /u02/oradata /
       -storageType FS                   /
       -characterSet AL32UTF8       /
       -memoryPercentage 40

 

5) If an ‘ORA-27102: out of memory’ message occurs during the database instance creation, increase max-shm-memory to 8GB temporarily:

su – root
<Enter root password>
prctl -n project.max-shm-memory -v 8gb -r -i project oracle

Then repeat steps 3 and 4 again.

6)
CREATE USER <USER ID> IDENTIFIED BY <PASSWORD> PROFILE DEFAULT DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;
GRANT CREATE SESSION TO  <USER ID>;

原创粉丝点击