Home Database Mysql Tutorial Oracle数据库备份恢复,巡检需要关注的对象设置以及相关恢复概述

Oracle数据库备份恢复,巡检需要关注的对象设置以及相关恢复概述

Jun 07, 2016 pm 03:51 PM
oracle focus on backup object Inspection recover database need

数据库备份恢复,巡检需要关注的对象设置: 1.数据库名称,以及DBID; --dbid在v$database中 SYS@ORCLselect dbid,name from v$database; DBID NAME ---------- --------- 1385095721 ORCL 2.控制文件的位置; show parameter control_files; select name fr

数据库备份恢复,巡检需要关注的对象设置:

1.数据库名称,以及DBID;  --dbid在v$database中
    SYS@ORCL>select dbid,name from v$database;

          DBID NAME
    ---------- ---------
    1385095721 ORCL

2.控制文件的位置;
    show parameter control_files;
    select name from v$controlfile;

3.日志文件的位置以及数据库的归档设置;
    select log_mode from v$database;
    archive log list;

    select * from v$log;
    select * from v$logfile;
     --关注日志组数,大小,状态,位置;
    select * from v$archived_log;

4.数据文件位置,大小,状态;
    select * from dba_tablespaces;
    select * from v$tablespace;
    select * from dab_data_files;
    select * from v$datafile;
     --在11g数据库中,临时表空间只需关注其大小即可;

5.参数文件;
    show parameter spfile;
   
6.告警日志;
    select * from v$diag_info;
    adrci

7.数据库现有的备份策略,备份集情况;

 

要打开数据库,必须满足以下条件:
 

1.所有控制文件都必须存在且已同步

2.所有联机数据文件都必须存在且已同步
3.每个重做日志组必须至少有一个成员存在

 

打开数据库后,如果丢失以下项时数据库就会失败:

1.任何控制文件
2.属于系统或还原表空间的数据文件
3.整个重做日志组(只要组中至少有一个成员可用,实例就会保持在打开状态)

 

如果控制文件丢失或损坏,则实例通常会中止。然后,您必须执行以下步骤:

1.关闭实例(如果它仍处于打开状态)。

2.通过复制现有控制文件还原缺失的控制文件。
3.启动实例。

如果丢失了重做日志文件组中的某个成员,并且组中至少还有一个成员,请注意其后果是:

不会影响实例的正常操作。

预警日志中会收到一条消息,通知您无法找到某个成员。

通过从同一组中复制一个剩余文件可还原缺失的日志文件。

 

NOARCHIVELOG 模式下丢失了数据文件
 
如果数据库处于 NOARCHIVELOG 模式下,并且丢失了任何数据文件,则需要完全还原数据库,包括控制文件和所

有数据文件。
数据库处于 NOARCHIVELOG 模式时,只能恢复到上一次备份时的状态。因此,用户必须重新输入自

上一次备份以来所做的更改。

请执行以下任务:

1.如果实例尚未关闭,请关闭实例。
2.从备份还原整个数据库,包括所有数据文件和控制文件。

3.打开数据库。

4.让用户重新输入自上次备份以来所做的所有更改。

如果处于 NOARCHIVELOG 模式的数据库具有增量备份策略。则 RMAN 会先还原最近的 0 级,然后 RMAN 恢复进

程再应用增量备份。


ARCHIVELOG 模式下丢失了系统关键数据文件

如果丢失或损坏了某个数据文件,且该文件属于 SYSTEM 或 UNDO 表空间,
请执行以下任务:

1.实例可能会也可能不会自动关闭。如果未自动关闭,请使用 SHUTDOWN ABORT 关闭实例。

2.装载数据库。
3.还原并恢复缺失的数据文件。

4.打开数据库。

 

 

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

How to use MySQL backup and restore in PHP? How to use MySQL backup and restore in PHP? Jun 03, 2024 pm 12:19 PM

Backing up and restoring a MySQL database in PHP can be achieved by following these steps: Back up the database: Use the mysqldump command to dump the database into a SQL file. Restore database: Use the mysql command to restore the database from SQL files.

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

Oracle scheduled tasks execute the creation step once a day Oracle scheduled tasks execute the creation step once a day May 10, 2024 am 03:03 AM

To create a scheduled task in Oracle that executes once a day, you need to perform the following three steps: Create a job. Add a subjob to the job and set its schedule expression to "INTERVAL 1 DAY". Enable the job.

How much memory is needed to use oracle database How much memory is needed to use oracle database May 10, 2024 am 03:42 AM

The amount of memory required for an Oracle database depends on the database size, workload type, and number of concurrent users. General recommendations: Small databases: 16-32 GB, Medium databases: 32-64 GB, Large databases: 64 GB or more. Other factors to consider include database version, memory optimization options, virtualization, and best practices (monitor memory usage, adjust allocations).

How to start the listening program in oracle How to start the listening program in oracle May 10, 2024 am 03:12 AM

Oracle listeners are used to manage client connection requests. Startup steps include: Log in to the Oracle instance. Find the listener configuration. Use the lsnrctl start command to start the listener. Use the lsnrctl status command to verify startup.

Detailed tutorial on establishing a database connection using MySQLi in PHP Detailed tutorial on establishing a database connection using MySQLi in PHP Jun 04, 2024 pm 01:42 PM

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

See all articles