DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Possible hacks to change the 8i DBIDs?

  1. #1
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Originally posted by marist89
    We're talking across platforms here. Rman (up to 9.2 anyway) won't work cross platforms.
    Thats true, assumptions can be made when the version information was not provided.

    I would prefer RMAN over copy, because at this present place, I'm in a situation I cannot use some of the RMAN 9i features blindly, as most of the databases had been created using the copy menthod. As a result they all have the darn same DB ID. Which would cause a caos, when you do a recovery, unless and other wise you take extra care to customize the RMAN backup environment. One such case is that of using AUTO BACKUP of control file with 9i RMAN. if you don't customize the format, you are in the ocean troble, when you have mutliple DBS with the same DBID, that gets backedup under different catalog, but to the same tape directory. On this option, there are no tags that RMAN would allow, that will allow you to include the DB name with that The one and the only tag that I know was allowed with this option was %F, which completely depends on the DBID. Unless you customize it with the manual addition of DBNAME.

    So, simple truth is watch out!

    Sorry to have drifted away from the topic.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Originally posted by sambavan
    I would prefer RMAN over copy, because at this present place, I'm in a situation I cannot use some of the RMAN 9i features blindly, as most of the databases had been created using the copy menthod. As a result they all have the darn same DB ID. Which would cause a caos, when you do a recovery, unless and other wise you take extra care to customize the RMAN backup environment. One such case is that of using AUTO BACKUP of control file with 9i RMAN. if you don't customize the format, you are in the ocean troble, when you have mutliple DBS with the same DBID, that gets backedup under different catalog, but to the same tape directory. On this option, there are no tags that RMAN would allow, that will allow you to include the DB name with that The one and the only tag that I know was allowed with this option was %F, which completely depends on the DBID. Unless you customize it with the manual addition of DBNAME.

    So, simple truth is watch out!

    Sorry to have drifted away from the topic.

    Sam
    You can change this by:
    1. Backup the target database. ***Important***
    2. Log onto the target server as the oracle userid.
    3. Perform the following SQL*Plus commands as internal:
    shutdown immediate
    startup mount
    select dbid, name from v$database; #<-- Note current dbid value
    alter database backup controlfile to trace;
    (Modify the resulting trace file by removing all lines up to and including the STARTUP command, insert the key word "SET" immediately following "REUSE", change "NORESETLOGS" to read "RESETLOGS", and delete all lines following the CREATE CONTROLFILE statement's semicolon.)
    execute dbms_backup_restore.zeroDbid(0)
    shutdown immediate
    startup nomount
    @modified_trace_file
    alter database open resetlogs;
    select dbid, name from v$database; #<-- Value of dbid should have changed
    4. Check that the oracle password file is still valid. If necessary, rebuild the password file, bounce the instance, and/or re-grant sysdba to rman.
    5. Perform a complete backup of database as all previous backups are now invalid.
    Jeff Hunter

  3. #3
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    That was one neat solution. But I heard that you can use the newdbid utility of 9i to do the changes on DBID upto 8.0. Have any one tried it?

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  4. #4
    Join Date
    Feb 2001
    Posts
    295
    That was one neat solution. But I heard that you can use the newdbid utility of 9i to do the changes on DBID upto 8.0. Have any one tried it?
    I tried it on 9i databases, it worked fine. I'm not sure if it is supported on earlier versions. Anyway, it's really better to use DUPLICATE over RMAN than copy method followed by NID
    An ounce of action is worth a ton of theory.
    —Friedrich Engels

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width