That's right. The SCN corresponds to the "The checkpoint, i.e., a record indicating the point in the redo log such that all database changes prior to this point have been saved in the datafiles."
The part of my post that you included in your message was cut and pasted from the Oracle documentation.
The TR produced by NetApp is intended as an example of how to use Snapshots to backup an Oracle database.
It is certainly important that any DBA/SA familiarize themselves with the Oracle Backup and Recovery Guide, and fully understand what needs to be backed up in order to be able to recover from various failures as they relate to an Oracle Instance. It is also important that recovery scenarios be practiced.
The Snapshot technology simply gives the DBA a virtual online copy of the datafiles that are stored on the Filer. There are many parts of the Oracle database, and many variations on which parts any individual might store on a Filer for any given Oracle Instance. It is important that no parts that are required for recovery are forgotten during a backup.
-tom
-----Original Message----- From: Gustavo Chaves [mailto:gustavo@cpqd.com.br] Sent: Wednesday, August 16, 2000 8:02 AM To: toasters@mathworks.com Subject: Re: Snapshots and Oracle
"Yarmas" == Yarmas, Tom Tom.Yarmas@netapp.com writes:
Yarmas> The control file contains: The database name. The timestamp Yarmas> of database creation. The names of the database's datafiles Yarmas> and online and archived redo log files. The checkpoint, Yarmas> i.e., a record indicating the point in the redo log such Yarmas> that all database changes prior to this point have been Yarmas> saved in the datafiles. Information on backups (when using Yarmas> the Recovery Manager utility).
I'm no expert but W. Curtis Preston tells on page 459 of his book 'UNIX Backup & Recovery' (from O'Reilly) that Oracle's control files keep something called an SCN (System Change Number) for each database object. In particular, whenever a datafile is modified its SCN is incremented in it and in the control files. From this I gather that control files are changed after every database change, which means we *must* back them up whenever we backup the database.
Gustavo.
On 16 Aug 2000, at 8:40, Yarmas, Tom wrote:
The Snapshot technology simply gives the DBA a virtual online copy of the datafiles that are stored on the Filer. There are many parts of the Oracle database, and many variations on which parts any individual might store on a Filer for any given Oracle Instance. It is important that no parts that are required for recovery are forgotten during a backup.
-tom
I can't agree more! Don't miss anything during a hot backup - get everything possible.
Over the years our backup system has developed around this problem. It's to the place I even backup some operating system stuff as part of the a hot bkup (/etc, crontabs, $oracle_home/dbs, $oracle_home/network/admin).
I haven't changed our hot backups to use snapshots yet, and probably won't for the near future. Our current hot backup script could be easily modified to handle snapshots, it's just that snapshots wouldn't gain us much in our current environment (db's on netapps aren't that big - yet).
Anyway, here's the highlevel outline of our hot backups. It creates a selfcontained hot backup that can be moved to another system and installed. We have other processes to handle archive logs. Our goal was to actually prove all hot backups by copying them to a special test sytem, install the hot backup and bring it up (all automatically) - . . . . never got that far . . . .
1) query db for all tablespaces 2) for each tablespace, determine db files 3) force a log switch 4) for each tablespace (handles multiple tablepsace concurrently) 4.1) put into hot backup mode 4.2) copy/compress files (we backup to local disk - tape backup system just backups the local disk area) 4.3) take out of backup mode 5) force log switch 6) copy logs created during hot backup (between log switches) to the hot backup area 7) copy the redo log files 8) "alter database backup controlfile to '/xyz/control.file.backup' ", save the file 9) copy all control file to the backup area 10)"alter database backup controlfile to trace", save the trace file 11) determine dump destinations and note them in the hot backup 12) backup "stuff" 12.1) /etc 12.2) crontabs 12.3) $ORACLE_HOME/dbs 12.4) $ORACLE_HOME/network/admin
(We also create a basic restore script during all of this.)
To use snapshots all I'd need to do is replace item 4 with the following:
w) put all tablespaces in backup mode x) issue snapshot y) end backup mode for all tablespaces z) copy/compress all db files from snapshot area to backup area.
As was stated in another email, snapshots don't really change how you do hot backups, just where/when you do certain things.
Rick