1 ███████ ██ ████████ ██ ██ ██ ██ ██ ██ ██
2 ██░░░░░██ ░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██
3 ██ ░░██ ██████ ██████ █████ ░██ █████ ░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██
4░██ ░██░░██░░█ ░░░░░░██ ██░░░██ ░██ ██░░░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██
5░██ ░██ ░██ ░ ███████ ░██ ░░ ░██░███████░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██
6░░██ ██ ░██ ██░░░░██ ░██ ██ ░██░██░░░░ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██
7 ░░███████ ░███ ░░████████░░█████ ███░░██████ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███
8 ░░░░░░░ ░░░ ░░░░░░░░ ░░░░░ ░░░ ░░░░░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░
9
10
11请选择安装模式 [单机(si)/单机ASM(sa)/集群(rac)] : si
12
13数据库安装模式: single
14
15请选择数据库版本 [11/12/19/21] : 19
16
17数据库版本: 19
18
19#==============================================================#
20配置本地 YUM 源
21#==============================================================#
22
23[BaseOS]
24name=BaseOS
25baseurl=file:///mnt/BaseOS
26enabled=1
27gpgcheck=0
28[AppStream]
29name=AppStream
30baseurl=file:///mnt/AppStream
31enabled=1
32gpgcheck=0
33
34#==============================================================#
35禁用防火墙
36#==============================================================#
37
38○ firewalld.service - firewalld - dynamic firewall daemon
39 Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; preset: enabled)
40 Active: inactive (dead)
41 Docs: man:firewalld(1)
42
43Nov 09 11:27:14 rhel9 systemd[1]: Starting firewalld - dynamic firewall daemon...
44Nov 09 11:27:16 rhel9 systemd[1]: Started firewalld - dynamic firewall daemon.
45Nov 09 13:17:22 rhel9 systemd[1]: Stopping firewalld - dynamic firewall daemon...
46Nov 09 13:17:23 rhel9 systemd[1]: firewalld.service: Deactivated successfully.
47Nov 09 13:17:23 rhel9 systemd[1]: Stopped firewalld - dynamic firewall daemon.
48
49#==============================================================#
50禁用 SELinux
51#==============================================================#
52
53SELinux status: enabled
54SELinuxfs mount: /sys/fs/selinux
55SELinux root directory: /etc/selinux
56Loaded policy name: targeted
57Current mode: permissive
58Mode from config file: disabled
59Policy MLS status: enabled
60Policy deny_unknown status: allowed
61Memory protection checking: actual (secure)
62Max kernel policy version: 33
63
64#==============================================================#
65YUM 静默安装依赖包
66#==============================================================#
67
68bc-1.07.1-14.el9.x86_64
69binutils-2.35.2-42.el9.x86_64
70package compat-libcap1 is not installed
71gcc-11.4.1-2.1.el9.x86_64
72gcc-c++-11.4.1-2.1.el9.x86_64
73elfutils-libelf-0.189-3.el9.x86_64
74elfutils-libelf-devel-0.189-3.el9.x86_64
75glibc-2.34-83.el9_3.7.x86_64
76glibc-devel-2.34-83.el9_3.7.x86_64
77libaio-0.3.111-13.el9.x86_64
78libaio-devel-0.3.111-13.el9.x86_64
79libgcc-11.4.1-2.1.el9.x86_64
80libstdc++-11.4.1-2.1.el9.x86_64
81libstdc++-devel-11.4.1-2.1.el9.x86_64
82libxcb-1.13.1-9.el9.x86_64
83libX11-1.7.0-8.el9.x86_64
84libXau-1.0.9-8.el9.x86_64
85libXi-1.7.10-8.el9.x86_64
86libXrender-0.9.10-16.el9.x86_64
87make-4.3-7.el9.x86_64
88net-tools-2.0-0.62.20160912git.el9.x86_64
89smartmontools-7.2-7.el9.x86_64
90sysstat-12.5.4-7.el9.x86_64
91e2fsprogs-1.46.5-3.el9.x86_64
92e2fsprogs-libs-1.46.5-3.el9.x86_64
93unzip-6.0-56.el9.x86_64
94openssh-clients-8.7p1-34.el9.x86_64
95readline-8.1-4.el9.x86_64
96readline-devel-8.1-4.el9.x86_64
97psmisc-23.4-3.el9.x86_64
98ksh-1.0.0~beta.1-3.el9.x86_64
99nfs-utils-2.5.4-20.el9.x86_64
100tar-1.34-6.el9_1.x86_64
101device-mapper-multipath-0.8.7-22.el9.x86_64
102avahi-0.8-15.el9.x86_64
103package ntp is not installed
104chrony-4.3-1.el9.x86_64
105libXtst-1.2.3-16.el9.x86_64
106libXrender-devel-0.9.10-16.el9.x86_64
107fontconfig-devel-2.14.0-2.el9_1.x86_64
108policycoreutils-3.5-2.el9.x86_64
109package policycoreutils-python is not installed
110librdmacm-46.0-1.el9.x86_64
111package libnsl* is not installed
112libibverbs-46.0-1.el9.x86_64
113package compat-openssl10 is not installed
114policycoreutils-python-utils-3.5-2.el9.noarch
115
116#==============================================================#
117配置主机名
118#==============================================================#
119
120rhel9
121
122#==============================================================#
123配置 /etc/hosts 文件
124#==============================================================#
125
126127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
127::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
128
129## OracleBegin
130## Public IP
131192.168.6.155 rhel9
132
133#==============================================================#
134创建用户和组
135#==============================================================#
136
137oracle 用户:
138
139uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
140
141
142#==============================================================#
143配置 Avahi-daemon 服务
144#==============================================================#
145
146○ avahi-daemon.service - Avahi mDNS/DNS-SD Stack
147 Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; disabled; preset: enabled)
148 Active: inactive (dead)
149TriggeredBy: ○ avahi-daemon.socket
150
151Nov 09 11:27:17 rhel9 avahi-daemon[958]: Registering new address record for fe80::20c:29ff:fe54:f6b8 on ens192.*.
152Nov 09 13:18:36 rhel9 systemd[1]: Stopping Avahi mDNS/DNS-SD Stack...
153Nov 09 13:18:36 rhel9 avahi-daemon[958]: Got SIGTERM, quitting.
154Nov 09 13:18:36 rhel9 avahi-daemon[958]: Leaving mDNS multicast group on interface ens192.IPv6 with address fe80::20c:29ff:fe54:f6b8.
155Nov 09 13:18:36 rhel9 avahi-daemon[958]: Leaving mDNS multicast group on interface ens192.IPv4 with address 192.168.6.155.
156Nov 09 13:18:36 rhel9 avahi-daemon[958]: Leaving mDNS multicast group on interface lo.IPv6 with address ::1.
157Nov 09 13:18:36 rhel9 avahi-daemon[958]: Leaving mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
158Nov 09 13:18:36 rhel9 avahi-daemon[958]: avahi-daemon 0.8 exiting.
159Nov 09 13:18:36 rhel9 systemd[1]: avahi-daemon.service: Deactivated successfully.
160Nov 09 13:18:36 rhel9 systemd[1]: Stopped Avahi mDNS/DNS-SD Stack.
161
162#==============================================================#
163配置透明大页 && NUMA && 磁盘 IO 调度器
164#==============================================================#
165
166args="ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never elevator=deadline"
167-resume=/dev/mapper/rhel-swap
168-args="ro
169args="ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet numa=off transparent_hugepage=never elevator=deadline"
170-elevator=deadline"
171-transparent_hugepage=never
172
173#==============================================================#
174配置 sysctl.conf
175#==============================================================#
176
177fs.aio-max-nr = 1048576
178fs.file-max = 6815744
179kernel.shmall = 4090819
180kernel.shmmax = 16755998719
181kernel.shmmni = 4096
182kernel.sem = 250 32000 100 128
183net.ipv4.ip_local_port_range = 9000 65500
184net.core.rmem_default = 262144
185net.core.rmem_max = 4194304
186net.core.wmem_default = 262144
187net.core.wmem_max = 1048576
188vm.min_free_kbytes = 65453
189net.ipv4.conf.ens192.rp_filter = 1
190vm.swappiness = 10
191kernel.panic_on_oops = 1
192kernel.randomize_va_space = 2
193kernel.numa_balancing = 0
194
195#==============================================================#
196配置 RemoveIPC
197#==============================================================#
198
199[Login]
200RemoveIPC=no
201
202#==============================================================#
203配置 /etc/security/limits.conf 和 /etc/pam.d/login
204#==============================================================#
205
206查看 /etc/security/limits.conf:
207
208oracle soft nofile 1024
209oracle hard nofile 65536
210oracle soft stack 10240
211oracle hard stack 32768
212oracle soft nproc 2047
213oracle hard nproc 16384
214oracle hard memlock unlimited
215oracle soft memlock unlimited
216
217查看 /etc/pam.d/login 文件:
218
219auth substack system-auth
220auth include postlogin
221account required pam_nologin.so
222account include system-auth
223password include system-auth
224session required pam_selinux.so close
225session required pam_loginuid.so
226session required pam_selinux.so open
227session required pam_namespace.so
228session optional pam_keyinit.so force revoke
229session include system-auth
230session include postlogin
231-session optional pam_ck_connector.so
232session required pam_limits.so
233session required /lib64/security/pam_limits.so
234
235#==============================================================#
236配置 /dev/shm
237#==============================================================#
238
239/dev/mapper/rhel-root / xfs defaults 0 0
240UUID=1e070be2-6168-4b31-b206-56fd68e17cf9 /boot xfs defaults 0 0
241UUID=E354-7851 /boot/efi vfat umask=0077,shortname=winnt 0 2
242/dev/mapper/rhel-swap none swap defaults 0 0
243tmpfs /dev/shm tmpfs size=16363280k 0 0
244
245#==============================================================#
246Root 用户环境变量
247#==============================================================#
248
249if [ -f ~/.bashrc ]; then
250 . ~/.bashrc
251fi
252alias so='su - oracle'
253export PS1="[`whoami`@`hostname`:"'$PWD]$ '
254
255#==============================================================#
256Oracle 用户环境变量
257#==============================================================#
258
259if [ -f ~/.bashrc ]; then
260 . ~/.bashrc
261fi
262umask 022
263export TMP=/tmp
264export TMPDIR=$TMP
265export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
266export ORACLE_BASE=/u01/app/oracle
267export ORACLE_HOME=/u01/app/oracle/product/19.3.0/db
268export ORACLE_TERM=xterm
269export TNS_ADMIN=$ORACLE_HOME/network/admin
270export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
271export ORACLE_SID=oradb
272export PATH=/usr/sbin:$PATH
273export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/perl/bin:$PATH
274export PERL5LIB=$ORACLE_HOME/perl/lib
275alias sas='sqlplus / as sysdba'
276alias awr='sqlplus / as sysdba @?/rdbms/admin/awrrpt'
277alias ash='sqlplus / as sysdba @?/rdbms/admin/ashrpt'
278alias alert='vi $ORACLE_BASE/diag/rdbms/*/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
279export PS1="[`whoami`@`hostname`:"'$PWD]$ '
280export CV_ASSUME_DISTID=OL7
281stty erase ^H
282
283#==============================================================#
284静默解压 Oracle 软件包
285#==============================================================#
286
287正在静默解压缩 Oracle 软件包,请稍等:
288
289.---- -. -. . . . .
290( .',----- - - ' ' ' __
291 \_/ ;--:- __--------------------___ ____=========_||___
292__U__n_^_''__[. ooo___ | |_!_||_!_||_!_||_!_| | |..|_i_|..|_i_|..|
293c(_ ..(_ ..(_ ..( /,,,,,,] | |___||___||___||___| | | |
294,_\___________'_|,L______],|______________________|_i,!________________!_i
295/;_(@)(@)==(@)(@) (o)(o) (o)^(o)--(o)^(o) (o)(o)-(o)(o)
296""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"""~"'""
297
298
299静默解压 Oracle 软件安装包: /soft/LINUX.X64_193000_db_home.zip
300
301静默解压 OPatch 软件补丁包: /soft/p6880880_*.zip
302
303静默解压 OJVM 软件补丁包: /soft/p35648110*.zip
304
305#==============================================================#
306Oracle 安装静默文件
307#==============================================================#
308
309oracle.install.option=INSTALL_DB_SWONLY
310UNIX_GROUP_NAME=oinstall
311INVENTORY_LOCATION=/u01/app/oraInventory
312ORACLE_BASE=/u01/app/oracle
313oracle.install.db.InstallEdition=EE
314oracle.install.db.DBA_GROUP=dba
315oracle.install.db.OPER_GROUP=oper
316oracle.install.db.OSBACKUPDBA_GROUP=backupdba
317oracle.install.db.OSDGDBA_GROUP=dgdba
318oracle.install.db.OSKMDBA_GROUP=kmdba
319oracle.install.db.OSRACDBA_GROUP=racdba
320oracle.install.db.rootconfig.executeRootScript=false
321oracle.install.db.rootconfig.configMethod=
322oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0
323
324#==============================================================#
325静默安装数据库软件
326#==============================================================#
327
328Preparing the home to patch...
329Applying the patch /soft/35643107...
330Successfully applied the patch.
331The log can be found at: /tmp/InstallActions2023-11-09_01-19-57PM/installerPatchActions_2023-11-09_01-19-57PM.log
332Launching Oracle Database Setup Wizard...
333
334[WARNING] [INS-13014] Target environment does not meet some optional requirements.
335 CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2023-11-09_01-19-57PM.log
336 ACTION: Identify the list of failed prerequisite checks from the log: installActions2023-11-09_01-19-57PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
337The response file for this session can be found at:
338 /u01/app/oracle/product/19.3.0/db/install/response/db_2023-11-09_01-19-57PM.rsp
339
340You can find the log of this install session at:
341 /tmp/InstallActions2023-11-09_01-19-57PM/installActions2023-11-09_01-19-57PM.log
342
343As a root user, execute the following script(s):
344 1. /u01/app/oraInventory/orainstRoot.sh
345 2. /u01/app/oracle/product/19.3.0/db/root.sh
346
347Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
348[rhel9]
349Execute /u01/app/oracle/product/19.3.0/db/root.sh on the following nodes:
350[rhel9]
351
352
353Successfully Setup Software with warning(s).
354Moved the install session logs to:
355 /u01/app/oraInventory/logs/InstallActions2023-11-09_01-19-57PM
356
357#==============================================================#
358执行 root 脚本
359#==============================================================#
360
361Changing permissions of /u01/app/oraInventory.
362Adding read,write permissions for group.
363Removing read,write,execute permissions for world.
364
365Changing groupname of /u01/app/oraInventory to oinstall.
366The execution of the script is complete.
367Check /u01/app/oracle/product/19.3.0/db/install/root_rhel9_2023-11-09_13-38-03-210893122.log for the output of root script
368
369#==============================================================#
370OJVM 补丁安装
371#==============================================================#
372
373stty: 'standard input': Inappropriate ioctl for device
374Oracle Interim Patch Installer version 12.2.0.1.40
375Copyright (c) 2023, Oracle Corporation. All rights reserved.
376
377PREREQ session
378
379Oracle Home : /u01/app/oracle/product/19.3.0/db
380Central Inventory : /u01/app/oraInventory
381 from : /u01/app/oracle/product/19.3.0/db/oraInst.loc
382OPatch version : 12.2.0.1.40
383OUI version : 12.2.0.7.0
384Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-11-09_13-38-06PM_1.log
385
386Invoking prereq "checkconflictagainstohwithdetail"
387
388Prereq "checkConflictAgainstOHWithDetail" passed.
389
390OPatch succeeded.
391Oracle Interim Patch Installer version 12.2.0.1.40
392Copyright (c) 2023, Oracle Corporation. All rights reserved.
393
394
395Oracle Home : /u01/app/oracle/product/19.3.0/db
396Central Inventory : /u01/app/oraInventory
397 from : /u01/app/oracle/product/19.3.0/db/oraInst.loc
398OPatch version : 12.2.0.1.40
399OUI version : 12.2.0.7.0
400Log file location : /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-11-09_13-38-22PM_1.log
401
402Verifying environment and performing prerequisite checks...
403OPatch continues with these patches: 35648110
404
405Do you want to proceed? [y|n]
406Y (auto-answered by -silent)
407User Responded with: Y
408All checks passed.
409
410Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
411(Oracle Home = '/u01/app/oracle/product/19.3.0/db')
412
413
414Is the local system ready for patching? [y|n]
415Y (auto-answered by -silent)
416User Responded with: Y
417Backing up files...
418Applying interim patch '35648110' to OH '/u01/app/oracle/product/19.3.0/db'
419
420Patching component oracle.javavm.server, 19.0.0.0.0...
421
422Patching component oracle.javavm.server.core, 19.0.0.0.0...
423
424Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...
425
426Patching component oracle.rdbms, 19.0.0.0.0...
427
428Patching component oracle.javavm.client, 19.0.0.0.0...
429Patch 35648110 successfully applied.
430Log file location: /u01/app/oracle/product/19.3.0/db/cfgtoollogs/opatch/opatch2023-11-09_13-38-22PM_1.log
431
432OPatch succeeded.
433
434#==============================================================#
435Oracle 软件版本
436#==============================================================#
437
438
439SQL*Plus: Release 19.0.0.0.0 - Production
440Version 19.21.0.0.0
441
442
443#==============================================================#
444Oracle 补丁信息
445#==============================================================#
446
44735648110;OJVM RELEASE UPDATE: 19.21.0.0.231017 (35648110)
44835643107;Database Release Update : 19.21.0.0.231017 (35643107)
44929585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
450
451OPatch succeeded.
452
453
454#==============================================================#
455配置监听
456#==============================================================#
457
458
459Parsing command line arguments:
460 Parameter "silent" = true
461 Parameter "responsefile" = /u01/app/oracle/product/19.3.0/db/assistants/netca/netca.rsp
462Done parsing command line arguments.
463Oracle Net Services Configuration:
464Profile configuration complete.
465Oracle Net Listener Startup:
466 Running Listener Control:
467 /u01/app/oracle/product/19.3.0/db/bin/lsnrctl start LISTENER
468 Listener Control complete.
469 Listener started successfully.
470Listener configuration complete.
471Oracle Net Services configuration successful. The exit code is 0
472
473检查监听状态:
474
475
476LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 09-NOV-2023 13:40:31
477
478Copyright (c) 1991, 2023, Oracle. All rights reserved.
479
480Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rhel9)(PORT=1521)))
481STATUS of the LISTENER
482------------------------
483Alias LISTENER
484Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
485Start Date 09-NOV-2023 13:40:30
486Uptime 0 days 0 hr. 0 min. 0 sec
487Trace Level off
488Security ON: Local OS Authentication
489SNMP OFF
490Listener Parameter File /u01/app/oracle/product/19.3.0/db/network/admin/listener.ora
491Listener Log File /u01/app/oracle/diag/tnslsnr/rhel9/listener/alert/log.xml
492Listening Endpoints Summary...
493 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rhel9)(PORT=1521)))
494 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
495The listener supports no services
496The command completed successfully
497
498#==============================================================#
499静默建库命令
500#==============================================================#
501
502dbca -silent -createDatabase \
503-ignorePrereqFailure \
504-templateName General_Purpose.dbc \
505-responseFile NO_VALUE \
506-gdbName oradb \
507-sid oradb \
508-sysPassword oracle \
509-systemPassword oracle \
510-redoLogFileSize 200 \
511-datafileDestination /oradata \
512-storageType FS \
513-enableArchive true \
514-archiveLogDest /oradata \
515-databaseConfigType SINGLE \
516-characterset AL32UTF8 \
517-nationalCharacterSet AL16UTF16 \
518-emConfiguration NONE \
519-automaticMemoryManagement false \
520-totalMemory 7989 \
521-databaseType OLTP \
522-createAsContainerDatabase true
523
524#==============================================================#
525创建数据库
526#==============================================================#
527
528[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
529 CAUSE:
530a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
531b.The password entered is a keyword that Oracle does not recommend to be used as password
532 ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
533[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
534 CAUSE:
535a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
536b.The password entered is a keyword that Oracle does not recommend to be used as password
537 ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
538Prepare for db operation
53910% complete
540Copying database files
54140% complete
542Creating and starting Oracle instance
54342% complete
54446% complete
54552% complete
54656% complete
54760% complete
548Completing Database Creation
54966% complete
55069% complete
55170% complete
552Executing Post Configuration Actions
553100% complete
554Database creation complete. For details check the logfiles at:
555 /u01/app/oracle/cfgtoollogs/dbca/oradb.
556Database Information:
557Global Database Name:oradb
558System Identifier(SID):oradb
559Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/oradb/oradb.log" for further details.
560stty: 'standard input': Inappropriate ioctl for device
561
562#==============================================================#
563创建 PDB 数据库
564#==============================================================#
565
566正在创建 PDB:lucifer
567
568stty: 'standard input': Inappropriate ioctl for device
569stty: 'standard input': Inappropriate ioctl for device
570
571 CON_ID CON_NAME OPEN MODE RESTRICTED
572---------- ------------------------------ ---------- ----------
573 2 PDB$SEED READ ONLY NO
574 3 LUCIFER READ WRITE NO
575
576#==============================================================#
577配置在线重做日志
578#==============================================================#
579
580stty: 'standard input': Inappropriate ioctl for device
581数据库在线重做日志文件:
582
583stty: 'standard input': Inappropriate ioctl for device
584
585 THREAD# GROUP# MEMBER size(M)
586---------- ---------- ------------------------------------------------------------------------------------------------------------------------ ----------
587 1 1 /oradata/ORADB/redo01.log 200
588 1 2 /oradata/ORADB/redo02.log 200
589 1 3 /oradata/ORADB/redo03.log 200
590 1 11 /oradata/ORADB/onlinelog/o1_mf_11_lnryoff2_.log 200
591 1 12 /oradata/ORADB/onlinelog/o1_mf_12_lnryofjv_.log 200
592 1 13 /oradata/ORADB/onlinelog/o1_mf_13_lnryofpv_.log 200
593 1 14 /oradata/ORADB/onlinelog/o1_mf_14_lnryofw2_.log 200
594 1 15 /oradata/ORADB/onlinelog/o1_mf_15_lnryohcg_.log 200
595
596#==============================================================#
597配置 RMAN 备份任务
598#==============================================================#
599
600## OracleBegin
60100 02 * * * /home/oracle/scripts/del_arch.sh
602#00 00 * * 0 /home/oracle/scripts/dbbackup_lv0.sh
603#00 00 * * 1,2,3,4,5,6 /home/oracle/scripts/dbbackup_lv1.sh
604
605#==============================================================#
606配置 glogin.sql
607#==============================================================#
608
609define _editor=vi
610set serveroutput on size 1000000
611set pagesize 9999
612set long 99999
613set trimspool on
614col name format a80
615set termout off
616define gname=idle
617column global_name new_value gname
618select lower(user) || '@' || substr( global_name, 1, decode( dot, 0, length(global_name), dot-1) ) global_name from (select global_name, instr(global_name,'.') dot from global_name );
619ALTER SESSION SET nls_date_format = 'YYYY-MM-DD HH24:MI:SS';
620set sqlprompt '&gname _DATE> '
621set termout on
622
623#==============================================================#
624优化数据库参数
625#==============================================================#
626
627stty: 'standard input': Inappropriate ioctl for device
628数据库参数:
629
630stty: 'standard input': Inappropriate ioctl for device
631
632NAME SID SPVALUE VALUE
633-------------------------------------------------- ---------- -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
634_b_tree_bitmap_plans * FALSE FALSE
635_datafile_write_errors_crash_instance * FALSE FALSE
636audit_file_dest * /u01/app/oracle/admin/oradb/adump /u01/app/oracle/admin/oradb/adump
637audit_trail * NONE DB
638compatible * 19.0.0 19.0.0
639control_file_record_keep_time * 31 31
640db_block_size * 8192 8192
641db_create_file_dest * /oradata /oradata
642db_file_multiblock_read_count * 128
643db_files * 5000 200
644db_name * oradb oradb
645db_writer_processes * 1
646deferred_segment_creation * FALSE FALSE
647diagnostic_dest * /u01/app/oracle /u01/app/oracle
648dispatchers * (PROTOCOL=TCP) (SERVICE=oradbXDB) (PROTOCOL=TCP) (SERVICE=oradbXDB)
649enable_pluggable_database * true TRUE
650event * 10949 trace name context forever,level 1
651event * 28401 trace name context forever,level 1
652fast_start_parallel_rollback * LOW
653log_archive_dest_1 * location=/oradata/archivelog location=/oradata/archivelog
654log_archive_format * %t_%s_%r.dbf %t_%s_%r.dbf
655max_dump_file_size * unlimited
656max_string_size * STANDARD
657nls_language * AMERICAN AMERICAN
658nls_territory * AMERICA AMERICA
659open_cursors * 1000 300
660optimizer_adaptive_plans * TRUE
661optimizer_adaptive_statistics * FALSE
662optimizer_index_caching * 0
663optimizer_mode * ALL_ROWS
664parallel_force_local * FALSE
665parallel_max_servers * 64 64
666pga_aggregate_target * 2680160256 1675624448
667processes * 2000 640
668remote_login_passwordfile * EXCLUSIVE EXCLUSIVE
669session_cached_cursors * 300 50
670sessions * 984
671sga_max_size * 10723786752 6710886400
672sga_target * 10723786752 6710886400
673spfile * /u01/app/oracle/product/19.3.0/db/dbs/spfileoradb.ora
674statistics_level * TYPICAL
675undo_retention * 10800 900
676
677恭喜!Oracle 单机安装成功,现在是否重启主机:[Y/N] Y
678
679正在重启 ......