【linux】静默创建oracle实例

--命令行建数据库实例

dbca -silent -createDatabase -templateName /data/oracle/product/11.2.0/db_1/assistants/dbca/templates/General_Purpose.dbc -gdbName testekp -sid testekp -characterSet ZHS16GBK -sysPassword oracle -systemPassword oracle -responseFile NO_VALUE -datafileDestination /data/oracle/oradata/testekp

使用参数说明:
-silent指以静默方式执行dbca命令
-createDatabase指使用dbca
-templateName指定用来创建数据库的模板名称,这里指定为General_Purposedbc,即一般用途的数据库模板
-gdbname指定创建的全局数据库名称,这里指定名称为ocp11g
-sid 指定数据库系统标识符,这里指定为ocp11g,与数据库同名
-responseFile 指定安装响应文件,NO_VALUE表示没有指定响应文件
-characterSet 指定数据库使用的字符集,这里指定为AL32UTF8
-memoryPercentage 指定用于oracle的物理内存的百分比,这里指定为30%
-emConfiguration 指定Enterprise Management的管理选项。LOCAL表示数据库由Enterprise Manager本地管理

[oracle@zhdc-oa-dbtest oracle]$ dbca -silent -createDatabase -templateName /data/oracle/product/11.2.0/db_1/assistants/dbca/templates/General_Purpose.dbc -gdbName testekp -sid testekp -characterSet ZHS16GBK -sysPassword oracle -systemPassword oracle -responseFile NO_VALUE -datafileDestination /data/oracle/oradata/testekp
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/data/oracle/cfgtoollogs/dbca/testekp/testekp.log" for further details.
[oracle@zhdc-oa-dbtest oracle]$ cat /data/oracle/cfgtoollogs/dbca/testekp/testekp.log
Copying database files
DBCA_PROGRESS : 1%
DBCA_PROGRESS : 3%
DBCA_PROGRESS : 11%
DBCA_PROGRESS : 18%
DBCA_PROGRESS : 26%
DBCA_PROGRESS : 37%
Creating and starting Oracle instance
DBCA_PROGRESS : 40%
DBCA_PROGRESS : 45%
DBCA_PROGRESS : 50%
DBCA_PROGRESS : 55%
DBCA_PROGRESS : 56%
DBCA_PROGRESS : 60%
DBCA_PROGRESS : 62%
Completing Database Creation
DBCA_PROGRESS : 66%
DBCA_PROGRESS : 70%
DBCA_PROGRESS : 73%
DBCA_PROGRESS : 85%
DBCA_PROGRESS : 96%
DBCA_PROGRESS : 100%
Database creation complete. For details check the logfiles at:
 /data/oracle/cfgtoollogs/dbca/testekp.
Database Information:
Global Database Name:testekp
System Identifier(SID):testekp
[oracle@zhdc-oa-dbtest oracle]$ export ORACLE_SID=testekp
[oracle@zhdc-oa-dbtest oracle]$ ls
admin  cfgtoollogs  checkpoints  diag  fast_recovery_area  oradata  product
[oracle@zhdc-oa-dbtest oracle]$ echo $ORACLE_SID
testekp
[oracle@zhdc-oa-dbtest oracle]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Feb 28 15:59:59 2020

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> conn sys/sys as sysdba
Connected.
SQL> 
SQL> 

你可能感兴趣的:(【linux】静默创建oracle实例)