Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the precautions for patching in the database?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "what matters needing attention in patching in the database". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor to take you to learn "what are the points for attention in patching in the database"?

The following problems were encountered when patching

1. Encountered the problem that the central directory does not exist or is damaged when patching

If you encounter an error in the central directory, you can go to the upper level of the corresponding $ORACLE_BASE and check whether the file inventory.xml exists under oraInventory. If it does not exist or is damaged, restore it according to the situation of the host.

If it is a RAC environment, check whether the file of other nodes is intact, yes, you can SCP to the damaged node.

If the inventory files of all nodes in a single instance stand-alone environment or RAC environment are corrupted, you can run $ORACLE_HOME/oui/bin/attachHome.sh

Running this script automatically generates this file but only supports versions later than 10.2.0.2

The log of the generation process can be found in AttachHome2019-03-14009-39-21PM.log.rac02 under / u01/app/oraInventory/logs.

The directories of each host may be inconsistent, but they are all under oraInventory.

2. How to patch when there is insufficient space

LINUX system passes du-h | sort-n

Du works with sort to find the size of all files in the current directory and sort them from smallest to largest

The following three places

① audit log to see if audit is turned on

Show parameter audit

SQL > show parameter audit

NAME TYPE VALUE

-

Audit_file_dest string / u01/app/oracle/admin/racdb/ad

Ump

Audit_sys_operations boolean FALSE

Audit_syslog_level string

Audit_trail string DB

The value of audit_trail is NONE, which means that it is not enabled.

The value of audit_trail is FALSE, which means that it is not enabled.

The value of audit_trail is DB, which means it is enabled.

The value of audit_trail is TURE, which means it is enabled.

The value value of audit_trail is OS, indicating that the audit record is written to an operating system file (not particularly understood)

② trace

The trace file of + asm is the trace file generated by the ASM instance in the grid directory.

/ u01/app/grid/diag/asm/+asm/+ASM1/trace

The trace of ORACLE_SID is the trace file generated by the instance in the oracle directory.

[oracle@rac01 logs] $cd / u01/app/oracle/diag/rdbms/racdb/racdb1/trace/

③ snooping log file

[grid@rac01 trace] $lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 16-MAR-2019 22:48:23

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

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=LISTENER)

STATUS of the LISTENER

-

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.4.0-Production

Start Date 16-MAR-2019 22:35:54

Uptime 0 days 0 hr. 12 min. 29 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File / u01/app/11.2.0/grid/network/admin/listener.ora

Listener Log File / u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=LISTENER)

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.8.21) (PORT=1521))

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.8.12) (PORT=1521))

Services Summary...

Service "+ ASM" has 1 instance (s).

Instance "+ ASM1", status READY, has 1 handler (s) for this service...

Service "racdb" has 1 instance (s).

Instance "racdb1", status READY, has 1 handler (s) for this service...

The command completed successfully

[oracle@rac01 ~] $lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0-Production on 16-MAR-2019 22:48:45

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

Connecting to (ADDRESS= (PROTOCOL=tcp) (HOST=) (PORT=1521))

STATUS of the LISTENER

-

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.4.0-Production

Start Date 16-MAR-2019 22:35:54

Uptime 0 days 0 hr. 12 min. 51 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File / u01/app/11.2.0/grid/network/admin/listener.ora

Listener Log File / u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=LISTENER)

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.8.21) (PORT=1521))

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=192.168.8.12) (PORT=1521))

Services Summary...

Service "+ ASM" has 1 instance (s).

Instance "+ ASM1", status READY, has 1 handler (s) for this service...

Service "racdb" has 1 instance (s).

Instance "racdb1", status READY, has 1 handler (s) for this service...

The command completed successfully

No matter under oracle or grid users

/ u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml

/ u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml

Check whether the log file is too large through du

[oracle@rac01] $du-h / u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml

224K / u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml

3. Monitoring status

Pay attention to whether it is registered when the monitoring is started.

If the database starts listening first and then starts, it will wait one minute for the PMON process to register for dynamic monitoring.

If you think it's too long, you can register manually through alter system register.

Other considerations

If you want to stop the library and listen in the build library, you need to check whether there is an external connection first.

Close the library to confirm LOCAL_NO

Confirm before you change the permission

It is best to switch logs and perform checkpoints manually before shutting down the library

Alter system checkpoint

Alter system switch logfile

At this point, I believe you have a deeper understanding of "what matters needing attention in patching in the database". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report