I've been working with some IBM reps/consultants lately, and I find it kind of funny how they talk about TSM. We were discussing the issue with some queries to the TSM DB being so hard to process that many times they don't return any data, when the IBM rep said "With DB2 that wont happen." I laughed and said, "DB2 didn't help that much." For example try something like this and see how long it takes to get a response.
select cast(sum(b.file_size/1073741824) as decimal(18,2)) AS GB_SIZE from backups a, contents b where a.node_name in ('DEV01_ORA','DEV02_ORA','DEV03_ORA','PRD01_ORA','PROD02_ORA') and a.backup_date < '2011-11-01 00:00:00' and a.object_id=b.object_id
I'm running this query to determine the amount of space I would free up if I deleted old oracle backup objects that they DBA's never reconciled through RMAN. I ran it over 30 minutes ago.....still waiting! The problem is the schema has not changed enough in the TSM table structure to make some select statements run any better than in pre-DB2 days. Anyone else seen this?
(Yes! I know if I used a specific NODE_NAME then TSM would probably return some data, but handles queries 1000x times more complex than these in the non-TSM world)
Showing posts with label Delete Object. Show all posts
Showing posts with label Delete Object. Show all posts
Monday, December 19, 2011
Monday, June 18, 2007
Oracle RMAN Catalogue Cleanup
This is an update to a story posted back in August 2005
Why do people love Oracle? When I hear mention of Oracle I think of Luke Skywalker when he saw the Millennium Falcon, "What a piece of junk!" Like the Falcon it looks clunky, breaks down easily, and has the most temperamental behavior. When it's running, however, it screams. The problem is that DBA's and/or the RMAN catalogue sometimes don't do appropriate cleanup. If the DBA's are doing their job they should be using the tdposync syncdb command to do cleanup with TSM. If you cannot get them to do this or it doesn't seem to be working correctly you can use a manual process on the TSM side. If you want to make sure that a particular node is performing cleanup within TSM run the following select command -
select object_id from backups where node_name=[TDP NODENAME] and
backup_date < '2007-06-01 00:00:00'
This can be redirected to a file then used later to delete with an undocumented delete command. If there is data going further back than your retention requirements state then you have a problem with the DB cleanup.
I am posting the undocumented TSM individual backup object delete command here, but remember any deletion from the TSM DB is done AT YOUR OWN RISK!
delete object 0 [Object ID Number]
It's unsupported because Tivoli doesn't trust you to not screw stuff up, and although I don't think you will, I understand their concern. Put this into a shell script and you can process thousands of objects and do a large amount of cleanup in a short ammount of time.
Why do people love Oracle? When I hear mention of Oracle I think of Luke Skywalker when he saw the Millennium Falcon, "What a piece of junk!" Like the Falcon it looks clunky, breaks down easily, and has the most temperamental behavior. When it's running, however, it screams. The problem is that DBA's and/or the RMAN catalogue sometimes don't do appropriate cleanup. If the DBA's are doing their job they should be using the tdposync syncdb command to do cleanup with TSM. If you cannot get them to do this or it doesn't seem to be working correctly you can use a manual process on the TSM side. If you want to make sure that a particular node is performing cleanup within TSM run the following select command -
select object_id from backups where node_name=[TDP NODENAME] and
backup_date < '2007-06-01 00:00:00'
This can be redirected to a file then used later to delete with an undocumented delete command. If there is data going further back than your retention requirements state then you have a problem with the DB cleanup.
I am posting the undocumented TSM individual backup object delete command here, but remember any deletion from the TSM DB is done AT YOUR OWN RISK!
delete object 0 [Object ID Number]
It's unsupported because Tivoli doesn't trust you to not screw stuff up, and although I don't think you will, I understand their concern. Put this into a shell script and you can process thousands of objects and do a large amount of cleanup in a short ammount of time.
Subscribe to:
Posts (Atom)