Hi *SM-ers!
I'm using the following SQL statement to retrieve obsolete Oracle backup
files:

select node_name, filespace_name, ll_name, date(backup_date) from backups
where ((days(current_date) - days(backup_date) >= 100)) and hl_name='//'

This returns all Oracle backup files, created more than 100 days ago. These
should not exist anymore.
Since this statement scans ALL (millions!!) backup objects for a hit, it
runs for more than a day!
I'm looking for a way to reduce this, but I don't know how to do this.
If I would be able to limit the scan to only the objects belonging to Oracle
nodes (in our shop, the nodename ends with -ORC) it would finish much
quicker, but I don't know how.
Can anybody tell me if this is possible at all?
Thank you very much for any reply in advance!!!
Kindest regards,
Eric van Loon
KLM Royal Dutch Airlines


**********************************************************************
For information, services and offers, please visit our web site: http://www.klm.com. 
This e-mail and any attachment may contain confidential and privileged material 
intended for the addressee only. If you are not the addressee, you are notified that 
no part of the e-mail or any attachment may be disclosed, copied or distributed, and 
that any other action related to this e-mail or attachment is strictly prohibited, and 
may be unlawful. If you have received this e-mail by error, please notify the sender 
immediately by return e-mail, and delete this message. Koninklijke Luchtvaart 
Maatschappij NV (KLM), its subsidiaries and/or its employees shall not be liable for 
the incorrect or incomplete transmission of this e-mail or any attachments, nor 
responsible for any delay in receipt.
**********************************************************************

Reply via email to