Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
280 views
in Technique[技术] by (71.8m points)

rman - 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.

question from:https://stackoverflow.com/questions/65925907/is-there-a-way-to-simulate-oracle-vss-writer-behavior-in-pre-post-snapshot-scrip

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...