I want to make a clean copy on a second machine of an ever running database.
Therefore, i enter
alter tablespace XXX begin backup;
for all tablespaces, copy the datafiles to the second machine, and after
alter tabaespace XXX end backup;
for all tablespaces, too.
Then i enter
alter database backup controlfile to 'newctl.sql';
Now i edit this file: removing the head, strike out "reuse", change "noresetlogs" to "resetlogs", and delete the last three statements. Finally, i copy this to the second machine.
The archive-redologs are also copied to this machine (including initXXXX.ora).
Now, on the second machine, with the oracle-software-installation, datafiles, archivelogs, backup-controlfile, initfile, it should be possible to recover the database.
Now the following:
alter database open resetlogs;
now the Message "ora-01195" occurs:
online backup of file 1 needs more recovery to be consistent.
I try to find out the last SCN of all datafiles:
select to_char(max(checkpoint_change#, '000000000000000') from v$datafile;
... gives me an number YYY.
recover database until change YYY using backup controlfile;
But this will result in the same.
If i use more archivelogs to recover ("recover until cancel..."), the most time it will work (perhaps 80%).
If i rename the latest online-redolog to an archivelog, there were never problems, and the database was up-to-date.
Are the problem the active rollback segments?
Or unfinished transactions (means this the same?)
Or "uncommited" data inserted during the backup phase?
Sure, i can make some log switches (=checkpoint) and copy the last archivelogs. But if i try to keep this instances in sync?
The last chance i can see, is to copy the controlfiles and online-redologs ONLINE two times, compare these, and if they're identical, it shoud be '(a bit) consistent'.
Or i freeze the oracle processes (which means the same as if the system hangs) and copy the online-redologs and controlfiles then.
PS: I don't have not more than 75 Question Points. If iv'e got 500, i would give so much.