question

Tim avatar image
Tim asked

Oracle Backups or lack there of

The shop I am at is 98% MSSQL and I have spent 100% of my time on MSSQL. A previous employee knew some Oracle and provided that limited support for two Oracle instances in our shop. Once running on Windows the other UNIX. One of my coworkers was asked to step in and help support the Oracle instance on UNIX and discovered a horrific scene. I personally have not looked at it but will reiterate what I have been told and see if anyone has any advice. "We have an Oracle DB which has never been backed up,, along with an archive log directory with over 300 GB of space used. We need to know if we can take an RMAN backup without the archive logs included and end up with a valid recovery point. We also need to delete the archive logs in order to have enough space to hold a backup" Sounds like a nice situation to be in right! Thanks to anyone who can lend a hand.
oraclebackup
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ChandlerDBA avatar image
ChandlerDBA answered
Backups are a complex subject and an important one to get right, and the most important aspect isn't the backup but the restore, but that aside: You need to run an RMAN backup to ensure you have a good consistent backup. As you are seeing archive logs being produced, you don't need to shutdown the database to get a full consistent backup. You can prove that the database is in archivelog mode by logging in to SQL*Plus or SQL Developer as a dba (on the host "sqlplus / as sysdba") and running: select * from v$database; and look at the log_mode column, which should say ARCHIVELOG. IF it does not, you will have to shutdown the database to perform a cold backup. To make a backup, you need to login to rman on the host. I assume you are not using an rman catalog, but that's OK. The backup information will get written into the controlfiles. You need to investigate the use of a catalog later. on the database host run: rman target / nocatalog The "/" represents a userid and password. "/" may work, or you may need to use a DBA account, like SYSTEM. You can then check backup parameters, such as what the backup will be named; RMAN> show all; You can perform a backup using the parameters as displayed; RMAN> backup database; You can clean up old archivelogs. They are not needed unless you want to do a point-in-time recovery after the last backup. As you don't have a backup... RMAN> run { crosscheck archivelog all; delete expired archivelog all; } Sorting out backups is an extensive and complex subject. One thing that will certainly get a DBA fired is being unable to recover an important database. After you performed a backup, you need to perform a restore to a test system to ensure the backup works (otherwise it's just a big file.) Can I recommend that you read the Oracle documentation backup backups to ensure you are performing them correctly and have setup everything that you need to ensure a good reliable restore. I have assumed you are using Oracle 11G, although this also applies equally to Oracle 10G or 9i. Check here: http://www.oracle.com/pls/db112/portal.portal_db?selected=14 regards Neil Chandler @ChandlerDBA http://chandlerdba.wordpress.com/
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Shawn_Melton avatar image
Shawn_Melton answered
Do you have the option of shutting the database down? I believe shutting it down allows the data still in the redo logs to get put in the data files, then your backup would be complete and no archive log is required. [Reference 4.3.1][1] [1]: http://docs.oracle.com/cd/B19306_01/backup.102/b14192/bkup003.htm
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Tim avatar image Tim commented ·
Should be an option. Thanks for the link, I will pass it along.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.