I'm trying to automate my Oracle backups. I'm using Oracle 8.1.7 and Windows 2000.
I can issue both hot and cold backups fine. When I issue the command:
alter database backup controlfile to trace
it is created a textural copy of the database's control file in the USER_DUMP_DEST location. I want to then take the trace file I've just generated and move it to a directory that is being backed up to tape (I cannot use a directory under ORACLE_BASE as backing this up in windows causes my databases to crash and hence the need to move the backed up control file.) I'm automating my backups through windows command batch programs and wondered if there was a way I could get the latest trace file from the command line within a batch and then copy it to another location? This is tricky because I do not know the name of the file generated so would have to do it based on a timestamp.
Can anyone help me here?