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

DBID, an important parameter of Oracle recovery management

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

Share

Shulou(Shulou.com)06/01 Report--

* * DBID**, an important parameter of Oracle recovery management

DBID, which is the database identifier. Each database has a number called the database identifier (DBID). This number is automatically generated when the database is created, and Oracle does not guarantee that the DBID of two databases with the same name must be unique. So Oracle provides the $oracle_home/bin/nid command, which automatically generates a new DBID while changing the database name. After the database is created, the DBID generally does not change unless modified with the command nid.

Here is how to query DBID:

1. Query v$DATABASE.DBID field

When the database is working properly, querying the v$database.DBID field is the easiest way to get DBID, which must first start the instance to at least the MOUNT state.

SQL > select dbid from v$database

two。 View the file name that controls the automatic backup of files

By controlling the file name of the automatic backup of files, the prerequisite is that the automatic backup is not placed in the fast recovery area.

Confirm whether to use the quick recovery area, query statement (that is, the db_recovery_file_dest parameter is empty):

SQL > show parameter db_recovery_file_dest

Turn on the automatic backup function of control files:

RMAN > configure controlfile autobackup on

According to the default setting, the path to control automatic backup of files is the ¥oracle_home/dbs directory. The format of the backup file is cMurmuri, and the last one represents the number of (hexadecimal) backups of the day. Initiate a backup, then observe the file name that controls the automatic backup of files, and pay attention to "Starting Control File and SPFILE Autobackup at"

4.3. Execute the corresponding dump command to view the headers of various files in the database

Use the "alter system dump logfile" command to dump an archive log to a trace file for the current session:

Get the path to the current session tracking file:

SQL > select value from v$diag_info where name='Default Trace File'

SQL > alter system dump logfile'/ home/oracle/1_218_748028104.dbf'

According to the trace file found, filter out the'db id' 'through the grep command

Grep-I'db id' / u01/app/oracle/diag/rdbms/br/br/trace/br_ora_5301.trc

4. The restore catalog is enabled to restore the table named DB in the catalog by querying

The use of cataloging methods, not introduced for the time being, in the future a separate article.

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

Database

Wechat

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

12
Report