1 Reply Latest reply on Jun 6, 2018 7:05 PM by BPeaslandDBA

    What is the use of standby control file during DR database setup

    Abhilash Choudhury

      Hello All,


      Could any one explain why we need to create  standby control file during DR setup

        • 1. Re: What is the use of standby control file during DR database setup

          Sure. Let's take a step back and understand what is in the contents of the control file.


          The primary reason for the control file is to point to the database files on disk. When you STARTUP MOUNT an Oracle database, Oracle starts the instance (this happens in NOMOUNT mode), then accesses the control file. At this point, in MOUNT mode, Oracle has not accessed any datafiles, not even for the SYSTEM tablespace. When the database moves to OPEN mode, Oracle uses the control file to know where the files are. The files are opened and the database is ready for business.


          The next reason for the control file is to keep track of the transaction history. It actually keeps the SCN of the last checkpoint. Oracle uses the SCN in the control file and the SCN in each datafile header to know if the file is too old and needs recovery. If the SCN in the datafile header is much older than the SCN in the control file, Oracle won't open the database until you take appropriate steps like restore the file from backup and roll it forward.


          It should be obvious that both of those critical pieces of information are needed in all Oracle databases and they are just as important in a standby database. The standby database needs its control file just like the primary.


          There are other things in the control file as well. RMAN will write entries there, as an example. RMAN's entries in the control file are not germane to this discussion. But there is another important piece of information in that control file, which is relevant here. That other piece of information is the database's role. The control file is where Oracle keeps track of whether the database is the primary or the standby. If you simply copied the primary's control file over to the standby server and used it there, Oracle would think both are the primary database and that wouldn't be good.


          So you must create a standby control file. The standby control file is almost identical to the primary's. For purposes of this discussion, it is the role stored in the control file that is the big difference.