Oracle if updating field

It's basically just a step-by-step copy-and-paste operation, which helps me to not forget any of the steps.

This page shows you step-by-step how to bulletproof your database as much as possible against data loss, gives you the what's and how's of database backups and restores, and takes you through disaster recovery scenarios if you encounter those heart-stopping Oracle errors on database startup, such as datafile corruption or loss, disk drive loss, and other nasties.

How about restoring your database quickly if it becomes corrupted or if data is accidentally deleted? if you don't want to bother with the intricacies of RMAN, I even have scripts to back up one or all of your databases on a server, either fully or incrementally, and to clone your database from an RMAN backup.

oracle if updating field-73oracle if updating field-25

I modified PROD8's RMAN backup script to force it to put the backups in the directory specified by the db_recovery_file_dest parameter (RMAN was ignoring that and putting them into the default $ORACLE_HOME/dbs directory for some reason, which was filling up /u01) (script is /u03/backups/backup_scripts/RMAN_hot_backup_PROD8.shl): # Put a divider and the date and time into the RMAN log file NLS_DATE_FORMAT="DD-MON-YY HH24: MI: SS"; export NLS_DATE_FORMAT echo "================================================================================" /u03/backups/backup_logs/RMAN_hot_backup_PROD8# Hot database backup export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 export PATH=$ORACLE_HOME/bin:$PATH export ORACLE_SID=PROD8 # # RMAN isn't putting the backup files into the db_recovery_file_dest directory for some reason, so, # we will have to force the backup files to go there # sqlplus -s / as sysdba In case something goes really wrong, you can issue a Flashback Database (if implemented; see below) to take your entire database back to a particular point in time or to a particular SCN (system change number).

With our current setup, you can look at the control file backup name to find the DBID (database ID), such as, for rman_PROD_c-748470787-20110413-00.ctl, the DBID is 748470787.

It is also in the rman log file, which shows for example: connected to target database: PROD (DBID=748470787).

Example 1: Flashback a Database using RMAN (to midnight here): RMAN FLASHBACK DATABASE TO TIME = TO_DATE('05/09/16 ','MM/DD/YY HH: MI: SS'); Example 2: Flashback a database using SQL command.

Oracle's new DNFS (Direct Network File System) cloning was introduced, but undocumented, in Oracle 11g R2, and is documented in Oracle 12c.

Using their NFS OFM (Oracle File Manager) library in place of their current OFM, NAS (Network Attached Servers) drives can be attached to your database servers through NFS servers to provide near unlimited disk space to y our database servers.

What is this thing called RMAN, and how do I use it?

How about backing up your database quickly, either a full backup or an incremental backup, without taking your database down?

The database must be in mount state to issue either of these commands (5/24 means 5 hours): SQL) Implement flashback database for PROD (all archivelogs and flashback logs go to flash recovery area): sudo su (as root) mkdir /u01/flash_recovery_area chown oracle.oinstall /u01/flash_recovery_area su - oracle sqlplus "/ as sysdba" alter system set db_recovery_file_dest_size=100G; -- about 15 days of archivelogs and flashback log files alter system set db_recovery_file_dest='/u01/flash_recovery_area'; alter system set db_flashback_retention_target=1440; -- 1440 minutes is 1 day for flashback database alter system set undo_retention=14400; -- 14400 seconds is 4 hours for the other flashback functions shutdown immediate exit sqlplus "/ as sysdba" startup mount exclusive alter database flashback on; alter database open; shutdown immediate startup exit as root: mkdir -p /storage/prodora1/oracle chmod 775 /storage/prodora1/oracle chown oracle:oinstall /storage/prodora1/oracle su - oracle mkdir /u01/app/oracle/oradata/PROD/archivelogs mkdir -p /storage/prodora1/oracle/oradata/PROD/archivelogs cd /opt/app/oracle/product/11.1.0/db_1/dbs ls -ltr *spfile* shows: -rw-r----- 1 oracle oinstall 3584 Mar 15 2015 spfile -rw-r----- 1 oracle oinstall 5632 Apr 30 spfile ls -ltr init PROD*.ora* shows: -rw-r--r-- 1 oracle oinstall 1629 Apr 30 2015 init save -rw-r--r-- 1 oracle oinstall 1965 May 10 init mv init init 20160510 sqlplus / as sysdba create pfile from spfile; exit cp -p init init save vi init change: *.db_flashback_retention_target=1440 *.db_recovery_file_dest='/u01/flash_recovery_area' *.db_recovery_file_dest_size=134217728000 to: *.db_flashback_retention_target=0 *.db_recovery_file_dest='' *.db_recovery_file_dest_size=0 *.log_archive_dest_1='LOCATION=/u01/app/oracle/oradata/PROD/archivelogs MANDATORY' *.log_archive_dest_2='LOCATION=/storage/prodora1/oracle/oradata/PROD/archivelogs OPTIONAL' *.log_archive_format='PROD_%d_%t_%s_%r.arc' :wq sqlplus / as sysdba create spfile from pfile; shutdown immediate startup exit If you don't have Flashback Database enabled, you can restore your database up to a current point in time from the latest RMAN backup.

Tags: , ,