3 Replies Latest reply: Mar 11, 2012 11:53 AM by x94qvi RSS

    KEEP IDENTITY questions

    x94qvi
      Hi there,

      I'm trying to figure out something about rolling upgrades with a transient logical standby that seems to escape me.

      So, one of the first steps is to convert the standby database to a logical standby (with KEEP IDENTITY clause), startup for upgrade, and then run the catupgrd script. During this time the standby is not applying redo from the primary.

      I understand that the KEEP IDENTITY clause causes the logical standby to retain the same DBID and name as the primary database.

      Questions:
      1. Why is KEEP IDENTITY required? For example, what would happen if the KEEP IDENTITY clause was not used during the upgrade, and the standby retained it's own identity?
      2. Is KEEP IDENTITY a specific requirement for the upgrade process, or can this clause be used for other uses?
      3. This question is not specifically related to "KEEP IDENTITY". So, how is it possible that you can run catupgrd to upgrade the standby database and THEN begin to receive redo from the primary? I know in a physical standby, the system would balk because of different system SCNs after the catupgrd prevent it from doing managed recovery. So does a logical standby ignore SCNs? (Sorry, I know physical standbys well, but not enough about logical standbys to answer this question myself)

      Any answers would be appreciated...

      Thanks.

      Rob
        • 1. Re: KEEP IDENTITY questions
          CKPT
          Questions:
          1. Why is KEEP IDENTITY required? For example, what would happen if the KEEP IDENTITY clause was not used during the upgrade, and the standby retained it's own identity?
          2. Is KEEP IDENTITY a specific requirement for the upgrade process, or can this clause be used for other uses?
          3. This question is not specifically related to "KEEP IDENTITY". So, how is it possible that you can run catupgrd to upgrade the standby database and THEN begin to receive redo from the primary? I know in a physical standby, the system would balk because of different system SCNs after the catupgrd prevent it from doing managed recovery. So does a logical standby ignore SCNs? (Sorry, I know physical standbys well, but not enough about logical standbys to answer this question myself)
          What is your version?

          For db_name, specify a database name to identify the new logical standby database. If you are using a server parameter file (spfile) at the time you issue this statement, then the database will update the file with appropriate information about the new logical standby database. If you are not using an spfile, then the database issues a message reminding you to set the name of the DB_NAME parameter after shutting down the database.
          a rolling upgrade from Oracle 11g Release 1 to Oracle 11g Release 2 using a Transient Logical Standby database. This approach will miminise the downtime required for an upgrade which can potentially run into several hours down to just the time required to perform a switchover which could be a few minutes in most cases.
          
          A rolling upgrade using a Transient Logical Standby database at a very high level will involve three main stages or steps:
          
          1) Temporarily convert a physical standby database to a logical standby database using the new KEEP IDENTITY clause
          2) Perform a database upgrade of the logical standby database
          3) Return the logical standby database back to its identity or original status as a physical standby database once the upgrade is complete
          Here some great links

          http://gavinsoorma.com/tag/keep-identity/
          http://docs.oracle.com/cd/B28359_01/server.111/b28294/create_ls.htm
          • 2. Re: KEEP IDENTITY questions
            mseberg
            Hello;

            The new KEEP IDENTITY clause is used to retain the same DB_NAME and DBID as that of the primary database.

            This facilitates the later step when you convert the transient logical standby database back to its original role as a physical standby.

            This follow the idea that a physical Primary and Standby are the same database in different roles.

            KEEP IDENTITY is new in Oracle 11G.

            KEEP IDENTITY is used for conversion to a Logical Standby I don't believe it it used elsewhere.

            This has a tiny amount of info

            11g Dataguard New Features. [ID 443540.1]



            This may answer question 3 :

            http://docs.oracle.com/cd/E11882_01/server.112/e23633/upgrade.htm

            Upgrading and Opening a Physical Standby when the Primary has failed during upgrade [ID 975614.1]

            10g Rolling Upgrades with Logical Standby [ID 300479.1]

            http://docs.oracle.com/cd/B28359_01/server.111/b28294/create_ls.htm

            Best Regards

            mseberg

            Edited by: mseberg on Mar 5, 2012 6:10 AM
            • 3. Re: KEEP IDENTITY questions
              x94qvi
              Thanks for answering my questions. I was wondering if KEEP IDENTITY could be used for other purposes, but I think I'll just stick to using it during rolling upgrades.