1、静默创建orcl实例
orcl1:/home/oracle@db1> dbca -silent -ignorePrereqFailure -createDatabase -templateName General_Purpose.dbc -gdbname orcl -sid orcl -sysPassword orcl#2017 -systemPassword orcl#2017 -redoLogFileSize 1024 -responseFile /home/oracle/orcl-db.rsp -nodeinfo db1,db2
Prepare for db operation
8% complete
Copying database files
33% complete
Creating and starting Oracle instance
34% complete
35% complete
39% complete
42% complete
45% complete
50% complete
Creating cluster database views
52% complete
67% complete
Completing Database Creation
71% complete
73% complete
75% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/u01/app/oracle/cfgtoollogs/dbca/orcl.
Database Information:
Global Database Name:orcl
System Identifier(SID) Prefix:orcl
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.
使用的响应文件
[root@db1 ~]# more /home/oracle/orcl-db.rsp
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v12.2.0
gdbName=orcl
sid=orcl
databaseConfigType=RAC
RACOneNodeServiceName=
policyManaged=false
createServerPool=false
serverPoolName=
cardinality=
force=false
pqPoolName=
pqCardinality=
createAsContainerDatabase=false
numberOfPDBs=0
pdbName=
useLocalUndoForPDBs=true
pdbAdminPassword=
nodelist=db1,db2
templateName=/u01/app/oracle/product/19.0.0/db_1/assistants/dbca/templates/New_Database.dbt
sysPassword=
systemPassword=
serviceUserPassword=
emConfiguration=
emExpressPort=5500
runCVUChecks=FALSE
dbsnmpPassword=
omsHost=
omsPort=0
emUser=
emPassword=
dvConfiguration=false
dvUserName=
dvUserPassword=
dvAccountManagerName=
dvAccountManagerPassword=
olsConfiguration=false
datafileJarLocation={ORACLE_HOME}/assistants/dbca/templates/
datafileDestination=+DATA/{DB_UNIQUE_NAME}/
recoveryAreaDestination=
storageType=ASM
diskGroupName=+DATA/{DB_UNIQUE_NAME}/
asmsnmpPassword=
recoveryGroupName=
characterSet=AL32UTF8
nationalCharacterSet=AL16UTF16
registerWithDirService=false
dirServiceUserName=
dirServicePassword=
walletPassword=
listeners=
skipListenerRegistration=true
variablesFile=
variables=ORACLE_BASE_HOME=/u01/app/oracle/product/19.0.0/db_1,DB_UNIQUE_NAME=orcl,ORACLE_BASE=/u01/app/oracle,PDB_NAME=,DB_NAME=orcl,ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1,SID=orcl
initParams=orcl1.undo_tablespace=UNDOTBS1,orcl2.undo_tablespace=UNDOTBS2,sga_target=49227MB,db_block_size=8192BYTES,cluster_database=true,family:dw_helper.instance_mode=read-only,log_archive_dest_1='LOCATION=+FRA',nls_language=AMERICAN,dispatchers=(PROTOCOL=TCP) (SERVICE=orclXDB),diagnostic_dest={ORACLE_BASE},remote_login_passwordfile=exclusive,db_create_file_dest=+DATA/{DB_UNIQUE_NAME}/,db_create_online_log_dest_2=+FRA,db_create_online_log_dest_1=+DATA,audit_file_dest={ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump,processes=6400,pga_aggregate_target=16410MB,orcl1.thread=1,orcl2.thread=2,nls_territory=AMERICA,local_listener=-oraagent-dummy-,open_cursors=300,log_archive_format=%t_%s_%r.dbf,compatible=19.0.0,db_name=orcl,orcl1.instance_number=1,orcl2.instance_number=2,audit_trail=db
sampleSchema=false
memoryPercentage=40
databaseType=MULTIPURPOSE
automaticMemoryManagement=false
totalMemory=0
2、删除orcl实例
orcl1:/home/oracle@db1> dbca -silent -deleteDatabase -sourceDB orcl -nodeinfo db1,db2
Enter SYS user password:
[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed.Prepare for db operation
32% complete
Connecting to database
39% complete
42% complete
45% complete
48% complete
52% complete
55% complete
58% complete
65% complete
Updating network configuration files
68% complete
Deleting instances and datafiles
77% complete
87% complete
97% complete
100% complete
Database deletion completed.
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl0.log" for further details.
orcl1:/home/oracle@db1>