6 Replies Latest reply on Jul 24, 2008 8:28 AM by alimark

    Standby and tempfiles

    alimark
      Anyone know how physical standbys handle tempfiles? Are they supposed to be created by the rman clone process or are they created afterwards?

      Thanks

      Ali
        • 1. Re: Standby and tempfiles
          164043
          Why would a physical standby handle tempfiles? Tempfile blocks are not logged in the redo
          which means that the standby will never need to apply any changes to them.
          • 2. Re: Standby and tempfiles
            alimark
            Yes that is correct.

            Perhaps I wasn't clear.

            I have physical standbys for the purpose of switchover to primarys and back again for rolling upgrades and failover in case of media failure.

            When the 'standy' is a primary it'll need a tempfile.

            So how are the tempfiles handled in this scenario?

            Of course if i just had a standby for the purpose of having a standby then i wouldn't have to worry about the tempfiles.

            Regards

            Ali
            • 3. Re: Standby and tempfiles
              alimark
              I tried it out - the tempfile was created when i promoted standby to primary.

              Ali
              • 4. Re: Standby and tempfiles
                208369
                Interesting.

                On performing a switchover I saw the following in my alert log:

                *********************************************************************
                WARNING: The following temporary tablespaces contain no files.
                This condition can occur when a backup controlfile has
                been restored. It may be necessary to add files to these
                tablespaces. That can be done using the SQL statement:

                ALTER TABLESPACE <tablespace_name> ADD TEMPFILE

                Alternatively, if these temporary tablespaces are no longer
                needed, then they can be dropped.
                Empty temporary tablespace: TEMP
                *********************************************************************

                jason.

                http://jarneil.wordpress.com
                • 5. Re: Standby and tempfiles
                  alimark
                  ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY
                  Wed Jul 23 12:49:04 2008
                  ALTER DATABASE SWITCHOVER TO PRIMARY (JDBCS)
                  Wed Jul 23 12:49:04 2008
                  If media recovery active, switchover will wait 900 seconds
                  SwitchOver after complete recovery through change 151406
                  Online log /opt/oracle/oradata/JDBCS/redo01.log: Thread 1 Group 1 was previously cleared
                  Online log /opt/oracle/oradata/JDBCS/redo02.log: Thread 1 Group 2 was previously cleared
                  Online log /opt/oracle/oradata/JDBCS/redo03.log: Thread 1 Group 3 was previously cleared
                  Standby became primary SCN: 151404
                  WARNING: STANDBY_FILE_MANAGEMENT initialization parameter is
                  not set to the value "AUTO".
                  This may cause recovery of the standby database to terminate
                  prior to applying all available redo data.
                  It may be necessary to use the ALTER DATABASE CREATE DATAFILE
                  command to add datafiles created on the primary database.
                  Converting standby mount to primary mount.
                  Wed Jul 23 12:49:04 2008
                  Switchover: Complete - Database mounted as primary (JDBCS)
                  Completed: ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY
                  ....
                  ....
                  ....
                  Successfully onlined Undo Tablespace 1.
                  Dictionary check beginning
                  Wed Jul 23 12:49:25 2008
                  Errors in file /opt/oracle/admin/JDBCS/bdump/jdbcs_dbw0_9977.trc:
                  ORA-01157: cannot identify/lock data file 201 - see DBWR trace file
                  ORA-01110: data file 201: '/opt/oracle/oradata/JDBCS/temp01.dbf'
                  ORA-27037: unable to obtain file status
                  Linux Error: 2: No such file or directory
                  Additional information: 3
                  Wed Jul 23 12:49:25 2008
                  Errors in file /opt/oracle/admin/JDBCS/bdump/jdbcs_dbw0_9977.trc:
                  ORA-01186: file 201 failed verification tests
                  ORA-01157: cannot identify/lock data file 201 - see DBWR trace file
                  ORA-01110: data file 201: '/opt/oracle/oradata/JDBCS/temp01.dbf'
                  Wed Jul 23 12:49:25 2008
                  File 201 not verified due to error ORA-01157
                  Wed Jul 23 12:49:25 2008
                  Dictionary check complete
                  Wed Jul 23 12:49:25 2008
                  SMON: enabling tx recovery
                  Wed Jul 23 12:49:25 2008
                  Re-creating tempfile /opt/oracle/oradata/JDBCS/temp01.dbf
                  • 6. Re: Standby and tempfiles
                    alimark
                    Extract from alert from switchover posted above.

                    I'm on 10.2.0.3


                    Ali