In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article focuses on "how to change the Oracle database to archive mode and enable RMAN backup", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to change the Oracle database to archive mode and enable RMAN backup.
The following is the process of configuring and archiving the Oracle single-node database in the case of file system under the Linux environment. First check the database archive mode and disk usage to determine where to put the archive files:
[oracle@gisdbserver ~] $sqlplus / as sysdba SQL > archivelog list Database log mode No Archive Mode Automatic archival Disabled Archive destination / dbback/archivelog Oldest online log sequence 92 Current log sequence 97
According to the following disk usage, establish the relevant archive and backup directories under the appropriate directory:
[root@gisdbserver] # df-h Filesystem Size Used Avail Use% Mounted on / dev/mapper/vg_gisdbserver-lv_root 99G 3.8G 90G 4% / tmpfs 16G 76K 16G 1% / dev/shm / dev/sda2 485M 39M 421M 9% / boot / dev/sda1 200m 260K 200m 1% / boot/efi / dev/mapper/vg_gisdbserver-LogVol03 481G 198M 457G 1% / dbback / dev/mapper/vg_gisdbserver-LogVol04 407G 9.3G 377G 3% / home / dev/mapper/vg_gisdbserver-LogVol02 99G 4.5G 89G 5% / opt dev/sdb 441G 72G 347G 18% / oradata
Create a directory for storing relevant archive logs:
[root@gisdbserver ~] # cd / dbback/ [root@gisdbserver dbback] # mkdir archivelog [root@gisdbserver dbback] # chown-R oracle:oinstall archivelog/ [root@gisdbserver dbback] # mkdir rman [root@gisdbserver dbback] # chown oracle:oinstall rman/ [root@gisdbserver rman] # mkdir fullback [root@gisdbserver rman] # mkdir archiveback [root@gisdbserver rman] # chown oracle:oinstall archiveback/ [root@gisdbserver rman] # chown oracle:oinstall fullback/
Log in to the database to specify the archive directory:
[oracle@gisdbserver] $sqlplus / as sysdba SQL > alter system set log_archive_dest_1='location=/dbback/archivelog'; System altered. SQL > show parameter log_archive_dest_1 NAME TYPE VALUE-log_archive_dest_1 String location=/dbback/archivelog
To change the non-archive database mode to archive mode, you need to execute the alter database archivelog command in the mount state, as follows:
SQL > archivelog list Database log mode No Archive Mode Automatic archival Disabled Archive destination / dbback/archivelog Oldest online log sequence 92 Current log sequence 97 SQL > alter database archivelog; alter database archivelog * ERROR at line 1: ORA-01126: database must be mounted in this instance and not open in any instance
Therefore, you need to shut down the database at the appropriate time and restart to the mount state before you can change to archive mode.
SQL > shutdown immediate; SQL > startup mount; SQL > alter database archivelog
To enable rman backup, you need to configure some parameters related to rman, as follows:
Oracle@gisdbserver ~] $rman target / RMAN > backup DATABASE include CURRENT controlfile format'/ dbback/rman/fullback/data_%d_%T_%s_%p' plus archivelog format'+ / dbback/rman/archiveback/arch_%d_%T_%s'
The above statements can also be run automatically through linux's crontab and bash scripts.
Run {DELETE NOPROMPT expired archivelog ALL; allocate channel D1 TYPE disk maxpiecesize=30G; allocate channel D2 TYPE disk maxpiecesize=30G; backup DATABASE include CURRENT controlfile format'/ dbback/rman/fullback/data_%d_%T_%s_%p' plus archivelog format'+ / dbback/rman/archiveback/arch_%d_%T_%s'; release channel D1; release channel d2; crosscheck backup; DELETE noprompt obsolete REDUNDANCY 1 At this point, I believe you have a better understanding of "how to change the Oracle database to archive mode and enable RMAN backup". 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.