6 Replies Latest reply: Nov 28, 2012 11:55 AM by Richard Harrison . RSS

    DBID for full import

    973757
      Hi,

      I would be doing full database export/import using datapump from Linux 64 bit to linux 32 bit.
      I want the DBID to remain the same in target database.
      Would DBID remain same?

      Thanks
        • 1. Re: DBID for full import
          Shivananda Rao
          Hello,
          I want the DBID to remain the same in target database
          The DBID cannot be same on the target database. Oracle generates an unique DBID for every database unless it is a standby database where the dbname is same.
          • 2. Re: DBID for full import
            973757
            Thanks for the reply.

            So is it that only when we create a clone DBID remains the same and not when we do export/import.

            Thanks and Regards.
            • 3. Re: DBID for full import
              Shivananda Rao
              user11947527 wrote:
              Thanks for the reply.

              So is it that only when we create a clone DBID remains the same and not when we do export/import.

              Thanks and Regards.
              No. Even when you clone the database, the DBID does not remain same.
              To be very much clear, the DBIDs would never be same as that of the target database irrespective of export/import or cloning. Only a standby database would have the same dbid as that of the production as it is a mirrored copy of the primary database.

              In other words, we would never have control over the DBID and Oracle generates it automatically.

              If you feel that your question has been answered, then please mark the thread as answered by providing appropriate points.
              • 4. Re: DBID for full import
                Richard Harrison .
                Hi,
                Why do you want the dbid to be the same - is there some technical reason for that?

                Harry
                • 5. Re: DBID for full import
                  973757
                  Hi Hary,

                  Yes, there is some application level issue.
                  So we require DBID to remain same.

                  Thanks and regards.
                  • 6. Re: DBID for full import
                    Richard Harrison .
                    Hi,
                    As far as I'm aware you can't choose the dbid, you can force it to be changed but not what value to. Your only possible solution would be to restore the live database backup to the test box (without using rman clone i.e. either an rman restore as if the test box is the live box, or a straight copy of the files when live is in backup mode) - this would be a complete copy of live with the same dbid. I'm not 100% sure if the dbid will change if you just rename the database manually - so something like

                    create controlfile reuse set NEWDBNAME blah blah blah;

                    might work allowing you to rename the database from the restored copy of live but keep the dbid.

                    Generally though you don't want 2 database with the same dbid it's asking for trouble - i'd be looking to change any application logic that is checking it.

                    Cheers,
                    Harry