Urgent, Attach/Import Oracle database into a new machine (with a Oracle 11g enviroment installed)

  • Today I got a hard disc with on it an oracle database of one of our clients, and all is got are the files 3 ctl's, 3 redo files and 6 dbf files.

    I have to get this database up and running how do I do this.

  • Hopefully the files are compatible. Restore with files only is called "Cold Backup/restore"

    Create a dummy Oracle instance with the same patchlevel as the original.

    Shutdown the dummy instance.

    Copy the files from backup to their destination

    Adjust the pfile (initdbname.ora) to point to the new controlfiles

    Startup.

    More info:

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/backrec.htm#i1005802

  • Well I got the feeling compatibility might be a problem, I got word that the client still uses 9i

  • Resender (5/12/2011)


    Well I got the feeling compatibility might be a problem, I got word that the client still uses 9i

    If this is the case install fresh Ora9i codeset in a new ORACLE_HOME, be sure you patch your codeset to the same level the client has in his own environment.

    Once you have your Ora9i ORACLE_HOME, create a dummy instance pointing to the files you got.

    Once the database is up you can proceed either by...

    1- Export from Ora9i and Import into Ora11g after pre-creating database or,

    2- Upgrade Ora9i to Ora11g.

    If you have a small database which appears to be the case, I would go with option #1.

    Last but not least, if you have a good relationship with the client ask client to send you a full export of the offending database then pre-create instance on Ora11g, import and go for drinks. 🙂

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • Its far from small the folder that contains the files tells me its 57.5 GB.

    Problem is that I got no idea what the exact version of 9i there using.

    I got the following error at my latest attempt

    ORA-01103: database name 'NEWSID' in control file is not 'OLDSID'

    Client is in Singapore and I'm in Belgium

    How do i create the dummy instance

  • Resender (5/12/2011)


    Its far from small the folder that contains the files tells me its 57.5 GB.

    That's a small database - I would ask customer to send a full export.

    Resender (5/12/2011)


    Problem is that I got no idea what the exact version of 9i there using.

    That's bad news. If you do not the version you would not be able to open the database on version 9i - ask the customer.

    Resender (5/12/2011)


    I got the following error at my latest attempt

    ORA-01103: database name 'NEWSID' in control file is not 'OLDSID'

    That means actual database name doesn't match name in control file.

    Resender (5/12/2011)


    How do i create the dummy instance

    http://download.oracle.com/docs/cd/B10501_01/server.920/a96521/create.htm

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • Yeah, got problems installing 9i

  • OK I got a virtual Windows XP machine installed

    Installed 9i

    Created the dummy instance

    Shutdown the dummy instance

    After that I'm stuck

  • Resender (5/17/2011)


    OK I got a virtual Windows XP machine installed

    Installed 9i

    Created the dummy instance

    Shutdown the dummy instance

    After that I'm stuck

    Is the idea to import a dump file?

    Startup instance, Create tablespaces matching source databases structure/sizes then Import.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • Funny enough, the client now passed along that the database might be an 11 or 10g after all 🙁

    Also found out that the name they gave me is not the name they use

    So I followed the instructions I was given on the OTN forums

    So I followed the instructions on [http://download.oracle.com/docs/cd/B10501_01/server.920/a96521/create.htm#1000691] , I did find some mistakes in the page

    I got the following create database statement

    CREATE DATABASE dbname

    USER SYS IDENTIFIED BY pz6r58

    USER SYSTEM IDENTIFIED BY y1tz5p

    LOGFILE GROUP 1 ('D:\dbname\redo01.log') SIZE 100M,

    GROUP 2 ('D:\dbname\redo02.log') SIZE 100M,

    GROUP 3 ('D:\dbname\redo03.log') SIZE 100M

    MAXLOGFILES 5

    MAXLOGMEMBERS 5

    MAXLOGHISTORY 1

    MAXDATAFILES 100

    MAXINSTANCES 1

    CHARACTER SET US7ASCII

    DATAFILE 'D:\dbname\system01.dbf' SIZE 700M REUSE

    EXTENT MANAGEMENT LOCAL

    DEFAULT TEMPORARY TABLESPACE tempts1

    TEMPFILE D:\dbname\temp01.dbf' *(The documentation said datafile instead of tempfile)*

    SIZE 270M REUSE

    SYSAUX DATAFILE 'D:\dbname\sysaux01.dbf' size 700M reuse

    UNDO TABLESPACE undotbs

    DATAFILE 'D:\dbname\undotbs01.dbf'

    SIZE 3984M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED;

    after executing

    ORA-01501: CREATE DATABASE failed

    ORA-00200: controlfile could not be created

    ORA-00202: controlfile: 'D:\dbname\control01.ctl'

    ORA-27038: file exists

    OSD-04010: <create> option specified, file already exist

    So what did I do wrong, although I'm guessing I copied the original files to early

  • Resender (5/18/2011)


    Funny enough, the client now passed along that the database might be an 11 or 10g after all

    Well... what can I say? this is kind of a little unprofessional on the client.

    First thing is to figure out the actual version of the database - client shouldn't expect you to try to bring the database up on every single version of Oracle, isn't it?

    Please ask client to log into the database and run the two queries below...

    select

    instance_name,

    host_name,

    version,

    sysdate

    from

    v$instance;

    select

    substr(action_time,1,30) action_time,

    substr(id,1,10) id,

    substr(action,1,10) action,

    substr(version,1,8) version,

    substr(BUNDLE_SERIES,1,6) bundle,

    substr(comments,1,20) comments

    from

    registry$history;

    ...that way you will know actual version and patching level.

    Resender (5/18/2011)


    ORA-01501: CREATE DATABASE failed

    ORA-00200: controlfile could not be created

    ORA-00202: controlfile: 'D:\dbname\control01.ctl'

    ORA-27038: file exists

    OSD-04010: <create> option specified, file already exist

    Control file already exist and REUSE option was not specified.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • DATAFILE 'D:\dbname\system01.dbf' SIZE 700M REUSE

    I thought I did use reuse

    I shutdown the database and removed the files to and replaced them with the files from the client,

    Mounted the database succesfully and tried to query the metadata

    Mixing the information found on

    Creating an Oracle Database,

    Oracle Recovery Procedure

    Got ORA-01219, which is logical since the databse isn't open yet.

    I open the database using alter database open

    ORA-01157: cannot identify data file 1 - file not found

    ORA-01110: data file 1: '/home/oracle/product/10.1.0/oradata/orcl/system01.dbf'

    So any ideas want went wrong this time

  • Resender (5/19/2011)


    DATAFILE 'D:\dbname\system01.dbf' SIZE 700M REUSE

    I thought I did use reuse

    I meant, create database reuse controlfile 🙂

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • Been resolved

  • Resender (5/25/2011)


    Been resolved

    Congrats on the good job.

    Would you mind in sharing final strategy with the forum? Others may benefit in the future 🙂

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Viewing 15 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic. Login to reply