暂无图片
暂无图片
1
暂无图片
暂无图片
暂无图片

Oracle 19C dbca silent 静默建库

Michael Dinh 2020-12-03
3591

第一步先安装好数据库软件Oracle 19.8

----------------------------------------
--- DB patch level:
----------------------------------------
[oracle@ol7-19-lax1 ~]$ $ORACLE_HOME/OPatch/opatch lspatches
31305087;OCW RELEASE UPDATE 19.8.0.0.0 (31305087)
31281355;Database Release Update : 19.8.0.0.200714 (31281355)
OPatch succeeded.

dbca建库

----------------------------------------
--- Create database in archivelog mode:
----------------------------------------
[oracle@ol7-19-lax1 ~]$ dbca -silent   \
> -createDatabase                      \
> -responseFile NO_VALUE               \
> -templateName General_Purpose.dbc    \
> -sid testdb                          \
> -gdbname TESTDB                      \
> -characterSet AL32UTF8               \
> -sysPassword Oracle_4U               \
> -systemPassword Oracle_4U            \
> -createAsContainerDatabase FALSE     \
> -databaseType MULTIPURPOSE           \
> -automaticMemoryManagement FALSE     \
> -totalMemory 2048                    \
> -datafileDestination +DATA           \
> -recoveryAreaDestination +RECO       \
> -redoLogFileSize 50                  \
> -emConfiguration NONE                \
> -sampleSchema FALSE                  \
> -enableArchive TRUE                  \
> -ignorePreReqs
Prepare for db operation
10% complete
Registering database with Oracle Restart
14% complete
Copying database files
43% complete
Creating and starting Oracle instance
45% complete
49% complete
53% complete
56% complete
62% complete
Completing Database Creation
68% complete
70% complete
71% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /u01/app/oracle/cfgtoollogs/dbca/TESTDB.
Database Information:
Global Database Name:TESTDB
System Identifier(SID):testdb
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/TESTDB/TESTDB0.log" for further details.
----------------------------------------
--- Logs for dbca:
----------------------------------------
[oracle@ol7-19-lax1 ~]$ ls -l /u01/app/oracle/cfgtoollogs/dbca/TESTDB/
total 21508
-rw-r-----. 1 oracle oinstall    12131 Nov 20 13:20 cloneDBCreation.log
-rw-r-----. 1 oracle oinstall      784 Nov 20 13:07 CloneRmanRestore.log
-rw-r-----. 1 oracle oinstall     1820 Nov 20 13:21 lockAccount.log
-rw-r-----. 1 oracle oinstall     3578 Nov 20 13:24 postDBCreation.log
-rw-r-----. 1 oracle oinstall     1436 Nov 20 13:21 postScripts.log
-rw-r-----. 1 oracle oinstall        0 Nov 20 13:06 rmanUtil
-rw-r-----. 1 oracle oinstall 18726912 Nov 20 13:07 tempControl.ctl
-rw-r-----. 1 oracle oinstall      843 Nov 20 13:24 TESTDB0.log
-rw-r-----. 1 oracle oinstall      843 Nov  6 05:14 TESTDB.log
-rw-r-----. 1 oracle oinstall  1635418 Nov  6 05:14 trace.log_2020-11-06_04-58-10AM
-rw-r-----. 1 oracle oinstall  1619098 Nov 20 13:24 trace.log_2020-11-20_01-05-35PM
----------------------------------------
--- /etc/oratab is automatically updated:
----------------------------------------
[oracle@ol7-19-lax1 ~]$ tail /etc/oratab
#Backup file is  /u01/app/oracle/product/19.0.0/dbhome_1/srvm/admin/oratab.bak.ol7-19-lax1.oracle line added by Agent
+ASM1:/u01/app/19.0.0/grid:N
hawk1:/u01/app/oracle/product/19.0.0/dbhome_1:N
testdb:/u01/app/oracle/product/19.0.0/dbhome_1:N
----------------------------------------
--- Confirm Archive Mode:
----------------------------------------
[oracle@ol7-19-lax1 ~]$ . oraenv <<< testdb
ORACLE_SID = [hawk1] ? The Oracle base remains unchanged with value /u01/app/oracle
[oracle@ol7-19-lax1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Nov 20 13:25:09 2020
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle.  All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0
OL7-19-LAX1:(SYS@TESTDB:PRIMARY> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     31
Next log sequence to archive   33
Current log sequence           33
OL7-19-LAX1:(SYS@TESTDB:PRIMARY> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.8.0.0.0
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论