1 2 3 Previous Next 37 Replies Latest reply: Jun 13, 2014 6:13 AM by petra-K RSS

    DG Physical Standby DB

      Hi All,

       

      11.2.0.3

      I created by my standby db using >> duplicate target database for standby from active database spfile

      The physical standby was then successfully created.

       

      But when I compare the dbfs, there are missing files like temp01.dbf, redo01,02,03.

      Do I need to manually create these files?

       

      At Primary:

      ========

      ls -l

      total 24019616

      -rw-r-----    1 oracle   dba         8110080 Jun 11 18:12 control01.ctl

      -rw-------    1 oracle   dba         8110080 Jun 11 18:12 control03.ctl

      -rw-r-----    1 oracle   dba        52429312 Jun 11 17:13 redo01.log

      -rw-r-----    1 oracle   dba        52429312 Jun 11 17:45 redo02.log

      -rw-r-----    1 oracle   dba        52429312 Jun 11 18:12 redo03.log

      -rw-r-----    1 oracle   dba       922755072 Jun 11 18:11 sysaux01.dbf

      -rw-r-----    1 oracle   dba       796925952 Jun 11 18:11 system01.dbf

      -rw-r-----    1 oracle   dba       550510592 Jun 11 14:40 temp01.dbf

      -rw-------    1 oracle   dba      2122326016 Jun 11 18:12 ts_enc.dbf

      -rw-r-----    1 oracle   dba      2128617472 Jun 11 18:12 undotbs01.dbf

      -rw-r-----    1 oracle   dba      5603336192 Jun 11 18:12 users01.dbf

       

       

      At Standby:

      =========

      ls -l

      total 22616592

      -rw-------    1 oracle   dba         8110080 Jun 11 17:32 control01.ctl

      -rw-------    1 oracle   dba         8110080 Jun 11 17:32 control03.ctl

      -rw-------    1 oracle   dba       912269312 Jun 11 17:07 sysaux01.dbf

      -rw-------    1 oracle   dba       796925952 Jun 11 17:11 system01.dbf

      -rw-------    1 oracle   dba      2122326016 Jun 11 17:03 ts_enc.dbf

      -rw-------    1 oracle   dba      2128617472 Jun 11 16:54 undotbs01.dbf

      -rw-------    1 oracle   dba      5603336192 Jun 11 16:45 users01.dbf

       

       

      The docs did not say anything of recreating the tempfiles?

       

       

      Thanks,

      pK

       

        • 2. Re: DG Physical Standby DB
          mseberg

          Think about why you would need a TEMP file on a Standby.

           

          Also check dictionary views for redo files.

           

          Best Regards

           

          mseberg

          • 3. Re: DG Physical Standby DB

            Thanks Mse,

             

            The docs I followed did not mentioned of post datagaurd setup , like creating tempfiles and redos?

            What If disaster happened and we switch urgently to the DR sites. So our app will encouter errors due to this missing files? We will be caught un-aware and barefooted?

             

             

            Thanks

            • 4. Re: DG Physical Standby DB
              CKPT

              When you do perform duplicate database have you mentioned LOG_FILE_NAME_CONVERT?

              When you say the temp file , try to open database and see whether its created tempfile , they can miss if in case only there is no tempfile location resolution.

              - However still you can drop tempfile and recreate it.

               

              HTH.

              • 5. Re: DG Physical Standby DB

                Thanks ckpt,

                 

                Can you give me steps how to do it? Or how can I test if my standby will work as expected? Or its completeness to be ready for disaster? Or how can I check if there are missing files?

                 

                Best,

                • 6. Re: DG Physical Standby DB
                  CKPT

                  petra-K wrote:

                   

                  Thanks ckpt,

                   

                  Can you give me steps how to do it? Or how can I test if my standby will work as expected? Or its completeness to be ready for disaster? Or how can I check if there are missing files?

                   

                  Best,

                   

                  No i mean to say, when you do duplicate what is the value you have set to LOG_FILE_NAME_CONVERT and DB_FILE_NAME_CONVERT if the tempfiles are located in different folder than data files?

                   

                  If you have given correct arguments then it will create tempfiles too.. (or) worth try once to open database in read only mode and see tempfile is created. Do not forget to go back to mount status if you don't have ADG license.

                   

                  Here is sample to recreate tempfile if in case failed to create in the process of duplicate

                   

                  SQL> select name from v$tempfile;
                  NAME
                  -----------------------------------------------------------------------------------
                  /u01/app/oracle/oradata/orcl/tempfile/temp.1469.823443857

                  SQL> !ls -l /u01/app/oracle/oradata/orcl/tempfile/temp.1469.823443857
                  ls: cannot access /u01/app/oracle/oradata/orcl/tempfile/temp.1469.823443857: No such file or directory

                  SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

                  Database altered.

                  SQL> alter database tempfile '/u01/app/oracle/oradata/orcl/tempfile/temp.1469.823443857' drop;

                  Database altered.

                  SQL> ALTER DATABASE OPEN READ ONLY;

                  Database altered.

                  SQL> alter tablespace TEMP add tempfile;

                  Tablespace altered.

                  SQL> select name from v$tempfile;

                  NAME
                  -----------------------------------------------------------------------------------
                  /u01/app/oracle/oradata/orcl/datafile/o1_mf_temp_9q83df71_.tmp


                  HTH

                  • 7. Re: DG Physical Standby DB

                    Thanks chkpt,

                     

                    I just follow the default? I guess it will recreate all dbf if you duplicate all?

                    How about redo logs? why are they not replicated too?

                    Can you give also the process to recreate?

                     

                    Thanks

                    • 8. Re: DG Physical Standby DB
                      CKPT

                      petra-K wrote:

                       

                      Thanks chkpt,

                       

                      I just follow the default? I guess it will recreate all dbf if you duplicate all?

                      How about redo logs? why are they not replicated too?

                      Can you give also the process to recreate?

                       

                      Thanks

                       

                      As said its all depends on the parameter you have set LOG_FILE_NAME_CONVERT, can you share me the log file locations of primary and the value of LOG_FILE_NAME_CONVERT?

                       

                      If in case failed to create online redo log groups, then you may have to drop and create(recreate) online redo logs and also standby redo logs if required for real time apply.

                      • 9. Re: DG Physical Standby DB

                        I did not put logfile convert as the docs did not mention it

                        • 10. Re: DG Physical Standby DB
                          CKPT

                          petra-K wrote:

                           

                          I did not put logfile convert as the docs did not mention it

                           

                          You can refer these documents for check list before duplicating.

                          Duplicating a Database: Advanced Topics

                          DUPLICATE

                          HTH

                          • 11. Re: DG Physical Standby DB

                            I can not revert back my standby as It is in place already.

                             

                            Can I just add the missing pieces please? how do I check which pieces are missing? aside from tempfile and redologs?

                            • 12. Re: DG Physical Standby DB
                              CKPT

                              petra-K wrote:

                               

                              I can not revert back my standby as It is in place already.

                               

                              Can I just add the missing pieces please? how do I check which pieces are missing? aside from tempfile and redologs?

                               

                              I haven't asked you to revert the standby.

                              You may have to check only Data files, temp files, online redo logs and if applicable standby redo log files.

                               

                              From Primary check:

                              select name from v$datafile

                              union

                              select name from v$tempfile;

                               

                               

                              - Now check and compare on standby also i will recommend you to check on standby data files physicall from OS level as

                              $ls -ltr <file name full path>

                               

                              Once you are done with crosscheck of data files and tempfiles then you have only pending task is redo logs.

                               

                              Go to primary again check the redo log groups, members, size using query

                              SQL> select a.group#,a.members,a.bytes/1024/1024,b.member from v$Log a , v$logfile b where a.group#=b.group#;

                               

                              Check same on standby, then verify at OS level as well.

                              If the files are not created then go ahead to drop and recreate online redo log groups, check URL for reference Emre Baransel - Oracle Blog: CHANGING LOG FILE SIZE ON DATAGUARD CONFIGURATION

                              • 13. Re: DG Physical Standby DB

                                Thanks

                                 

                                I will check it tomorrow. Its holiday here today

                                 

                                Thanks

                                • 14. Re: DG Physical Standby DB
                                  tvCa-Oracle

                                  If you want to validate your database only ... a good test would be to just stop and start your database, if that works ... I mean, there's lots of causes why that would not work, so. Also check alert.log while doing bounce.

                                   

                                  Then, you can do a manual redo switch, see if that works.

                                  Check the size of your TEMP files. If they are missing, that would report 0 bytes being allocated, no ?

                                   

                                  You can also do this from RMAN:

                                   

                                  RMAN> VALIDATE DATABASE;

                                  1 2 3 Previous Next