Forum Stats

  • 3,816,315 Users
  • 2,259,170 Discussions
  • 7,893,452 Comments

Discussions

Is there a way to simulate Oracle VSS writer behavior in pre/post snapshot scripts?

We use VSS to backup our Windows servers. When these server contain an Oracle database, we used to use the Oracle VSS writer to ensure a consistent database. Unfortunately with Oracle 12c and the introduction of pluggable databases, the Oracle VSS writer no longer functions correctly. It contains a bug that causes a failure when it attempts to put a pluggable database into backup mode; see https://community.oracle.com/tech/developers/discussion/comment/15467069

Since it's unclear when/if this issue is going to be fixed, I'm looking for ways to simulate what the Oracle VSS writer does in scripts that run "pre/post" when the VSS snapshot is taken. In the "pre" VSS snapshot script, I use RMAN to backup the control file, run "alter system archive log current" to get a new archive redo log, and then put the database in backup mode with "alter database begin backup". After the snapshot is taken, the "post" script runs "alter database end backup". The recover process uses "recover database using backup controlfile until cancel", but fails with an ORA-01194 file needs more recovery error. This error makes sense because the "alter system archive log current" really needs to be run after the database is taken out of backup mode, but if done there the archive redo log created would not be included in my VSS snapshot (and not available for recovery).

I'm not really sure there's a way around this... However, I'm curious if anyone knows what the Oracle VSS writer does internally since if it didn't have the bug above (as is the case in older versions of Oracle that don't support pluggable database), it would allow for proper recovery?

Note that I'm able to perform an "incremental forever" backup in the "pre" snapshot script and use those files to restore the database and do point-in-time recovery for the archived log files, but I'm trying to avoid having to consume storage/restore time required for a backup of the database files.

Any help is greatly appreciated.

Answers