I'm creating a script that would generate an actual backup script.
I have to give this script to our clients and I don't know in advance
where init.ora will be located on client site.
So to find path and copy init.ora file during database hot backup
I use this query:
select 'host copy '||value||' &&BACKUP_TS_PATH'
from v$parameter where name='ifile'
Most of the time it works, but I notice that on some of the servers this query:
select value from v$parameter where name='ifile'
I was wondering if anybody has some workaround to find init.ora path
dynamically to copy init.ora together with data files backup.
As backup/recovery is perhaps the most vital operation where databases are concerned, I would suggest that a generic backup is a bad idea. Not one system will be the same or use the same naming conventions
Backups should only be implemented by qualified Dbas.
This ensures the resilience of the systems involved and also keeps us all in (well paid) jobs!!!!
I agree with what you wrote with whole my heart.
I just MUST to provide the client with backup-recovery procedure.
Since the client knows nothing absolutely about Oracle,
I'm trying to make my guide for them as detailed as possible.
I provide the script to automate as much as I can.
Including copying controlfiles,
datafiles, archived logs, and deleting week-old archived logs.
Also I require them to create on another machine the database
with the same name and same path for all the files as on production
database before running restore, just to avoid any manual re-naming.
I feel the pain. Still, I cannot automate the RECOVERY procedure.
Some manual work is just required.
Why Oracle has such a complicated backup-recovery procedure??
Look at Sybase, it's just 1-2-3.