Delete Backup Jobs

newbie216
newbie216 used Ask the Experts™
on
Oracle 10gR2
RHEL 4.6

I deleted everything within the  Job Activity section of OEM and did a select on sysman.mgmt_job and only get the job_name: 'refresh_from_metalink_job' and the a job_description of: 'Out Of The Box Job. Do Not Delete This Job!'. As far as what I have found online this should delete any backup jobs I have, but when I look at the flash_recovery_area there are still backups.

I want to delete all backups and ensure that there are no current backups running. Does anyone know of anything else I can try?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Richard OlutolaConsultant

Commented:
Examine the following views:

V$RMAN_STATUS
V$RMAN_BACKUP_JOB_DETAILS

Why do you want to Delete all backups? Are you running out of space?

HAve you configured backup retention policy in the RMAN configuration?

The flash recovery area contains backups that have been taken. If you want to clear all your backups, try either manually delete the files from the flash recovery area and then from rman, run the CROSSCHECK backup command to clear the controlfile of all backup details.

Alternatively, run rman and delete obsolete command. This will delete all backups that are older than the number set in the retention policy configuration.

This should give you a start anyway.

R.
Devinder Singh VirdiLead Oracle DBA Team

Commented:
>>  want to delete all backups and ensure that there are no current backups running
Change database from archive mode to non-archieve mode.
Use RMAN to freeup flash recovery area
and then reconfigure flashback to not use any space.

Author

Commented:
I plan on recreating new backups. It was odd that I was till getting backups when I thought I deleted all backup configurations. I want to create new backups knowing that they are the new config and not an old config still hanging around.
Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
I will have to try this on Monday when I get back into work.
Richard OlutolaConsultant

Commented:
Ensure that backups have not been scheduled with Database Contol or Shell script (with crontab).

You stop either of these before reconfiguring your backups.

R.

Author

Commented:
rolutola,

I checked the V$ tables you suggested and the latest start and stop dates are for Jan 30 (V$RMAN_STATUS) and Jan 29 (V$RMANGBACKUP_JOB_DETAILS).

I deleted all Job Activities within Database Control and commented out all crontab scripts at the end of last week (Jan 29).

I looked at the flash_recovery_area and I am still getting backups as of Feb 2. Anywhere else I can check? I use 'crosscheck archivelog all' in RMAN and it does find all current backups (archivelog directory) and contains no expired or obsolete files. Is there another area to check for archivelog backups. I don't want to just put Oracle in noarchivelog mode unless doing this will delete config of current backups.

Any other suggestions?

Author

Commented:
New problem. In OEM when I go to Maintenance -> Backup/Recovery -> Manage Current Backups and do a 'Crosscheck All', I get a jave null pointer exception.

I had to recreate the em config when the hostname was changed on the server by doing a 'emca -config dbcontrol db -repos recreate' .
Consultant
Commented:
Are you sure you have disabled all crontab schedules? You may have to look under other profiles such as oracle, root, and perhaps the backup job has been scheduled under another profile.

Are you sure you are looking at backups in the flash_recovery_area?

Why are you doing crosscheck all in EM?

Did you see any scheduled backups in EM? If so, try and delete the job.

If you keep getting java null pointer problem, then do the following:

1. Make sure you log out of EM in your browser
2. Close the browser
3. Open the browser
4. Delete cookies
5. Stop database console
6. Restart database console
7. Access EM in a new browser

R.

Author

Commented:
rolutola,

I checked crontab files for both users on this server, (root and oracle) and all crontabs have been deleted.

It seems that restarting EM and deleting all browsing history not only fixed the null pointer exception, but also showed jobs that had run. I could not see these before. I deleted them under Job Activity, and searched for scheduled jobs and only found RefreshFromMetalink.

Will this clean everything up? Is there anything else I should look for? Unfortunatly I will be on vacation starting tomorrow, so I will not be able to confirm whether this worked or not until Feb 15. I will update the status at that time.

Author

Commented:
I went ahead and checked if I am getting backups and I still am. <flash_recovery_area>/archivelog/ and I have a current backup which I want to put a stop to. I checked the Job Activity on EM and it shows the current job status as succeeded, but even if I delete this, I still get backups as I have tried deleting these before. Is there another way to look for this? In RMAN maybe? If I have the name of the backup can I look a table to see which job is running it and then delete that job?
Devinder Singh VirdiLead Oracle DBA Team

Commented:
Login as sysdba, and give the following command. If you are getting files in archive folder, do the following
archive log list.
or
select *from v$database;

Author

Commented:
SQL> archive log list;
Database log mode                 Archive Mode
Automatic archivel                  Enabled
Archive destination                 USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     166
Next log sequence to archive 168
Current log sequence              168
---------------------------------
SQL> select * from v$database
DBID   ###
NAME <SID>
CREATED 30-APR-09
RESELOGS_CHANGE# ###
RESETLOGS_TIME 21-NOV-09
PRIOR_RESETLOGS_CHANGE# 1
PRIOR_RESETLOGS_TI 30-APR-09
LOG_MODE ARCHIVELOG
CHECKPOINT_CHANGE# ###
ARCHIVE_CHANGE ###
CONTROL CURRENT
CONTROLFILE_CREATE 30-APR-09
CONTROLFILE_SEQUENCE# ###
CONTROLFILE_CHANGE# ###
CONTROLFILE_TIME 04-FEB-10
OPEN_RESETL NOT ALLOWED
VERSION_TIME 30-APR-09
OPEN_MODE READ WRITE
PROTECTION_MODE MAXIMUM PERFORMANCE
PROTECTION_LEVEL MAXIMUM PERFORMANCE
REMOTE_A ENABLED
ACTIVIATION# ###
SWITHOVER# ###
DATABASE_ROLE PRIMARY
ARCHIVELOG_CHANGE# ###
ARCHIVEL DISABLED
SWITCHOVER_STATUS SESSIONS ACTIVE
DATAGUAR DISABLED
GUARD_S NONE
SUPPLEME NO
SUP NO
SUP NO
FOR NO
PLATFORM_ID ##
PLATFORM_NAME linux IA(32-bit)
RECOVERY_TARGET_INCARNATION# #
LAST_OPEN_INCARNATION# #
CURRENT_SCN ###
FLASHBACK_ON NO
SUP NO
SUP NO
DB_UNIQUE_NAME <sid>
STANDBY_BECAME_PRIMARY_SCN #
FS_FAILOVER_CURRENT_TARGET
FS_FAILOVER_THRESHOLD #
FS_FAIL
FS_FAILOVER_OBSERVER_HOST
-------------------------------------------
This is what I have. If there are mistakes in spelling or you need more information let me know. I have to hand type all this in as the two computers I work on are on different networks. Anyway, I noticed that Automatic archivel                  Enabled
Is this why it keeps giving me backups. Is it automatically archiving and I cannot put a stop to this type of action? I am new to all of this.
Devinder Singh VirdiLead Oracle DBA Team
Commented:
Your database is in Archive log mode and archiving is enabled, therefore system is generating archive logs and hence space is consumed in Flashback area.

Use the following to disable archiving

SHUTDOWN;
STARTUP MOUNT EXCLUSIVE;
ALTER DATABASE NOARCHIVELOG;
ALTER DATABASE OPEN;

But Your database will not be protected then and you need to take full backup

Author

Commented:
I just logged in after a week and found oracle backing up quite a few things.

First was the crontab was activated again, so I deleted that and talked to the person who activated it. It should now stay off.

Second I am now getting things in '$ORACLE_BASE/flash_recovery_area/<SID>/backupset' which I have never had before.

Third I get backups in '$ORACLE_HOME/dbs'.

I am going to watch this for the next couple of days and see if I am still getting the same issues after getting rid of the crontab.

Author

Commented:
After deleting all jobs in EM and making sure that no crontabs were doing backups, it finally looks like I am only generating archive logs.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial