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.
You will not be seeing the ifile when the parameters are declared directly in the initsid.ora file, insead of through the ifile ( the level of nesting).
Finding the init.ora file path from the location of an ifile is dangerous for a couple of reasons:
1) The database may or may not use an include file (specified using the ifile parameter in init.ora as mentioned in the previous post).
2) The include file (ifile) does not have to be in the same location as the init.ora file.
The init.ora file should be found under the Oracle home directory, in the dbs subdirector. Obviuosly, the specification of this path is operating-system specific.
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.
Thanks for responce