Results 1 to 2 of 2

Thread: dbcreation

  1. #1
    Join Date
    Nov 2003
    Location
    kualalumpur
    Posts
    89

    Question Unanswered: dbcreation

    hello oracle DBAs,
    Iam using oracle 9i rel 2 on solaris 8.
    Iam trying to create a test database when an existing database is open.
    All I did is this..
    first I copied the init<SID>.ora and made the nessesary changes..like
    background destin..core_dump destinati..user dump desti..undo mana..controlfiles..instance name,dbname ..etc.
    then given...
    $sqlplus "/ as sysdba"
    SQL>@create_db.sql
    .
    but after few min. it says
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced.
    and I given the permissions as per existing database(working) directory permissions..
    and my creation scripts goes like this..

    create database test
    maxlogfiles 32
    maxlogmembers 5
    maxdatafiles 255
    maxloghistory 500
    character set WE8ISO8859P15
    datafile '/data3/oradata1/sys_test01.dbf' size 300M REUSE
    extent management local
    default temporary tablespace temp
    tempfile '/oracle/data/demo/ts02/temp01.dbf' size 50M
    autoextend on next 50M maxsize 8000M
    extent management local uniform size 1M
    undo tablespace undotbs
    datafile '/data3/oradata1/undotbs011.dbf' size 200M
    logfile
    group 1 '/data3/oradata1/redo01a.rdo' size 10m
    , group 2 '/data3/oradata1/redo02a.rdo' size 10m
    , group 3 '/data3/oradata1/redo03ardo' size 10m
    archivelog
    ;

    Could you please help me to create test database.
    thanks in advance..
    sincerely
    sridhar

  2. #2
    Join Date
    Jan 2004
    Location
    Hyderabad, India
    Posts
    37
    Hi,

    You need to follow the below steps.

    1. Take a cold backup of the existing database. You cant create a test database which uses the same datafiles as the prod database.

    2. Copy all the datafiles,redo files to a different server / different location in the same server.

    3. Change the init.ora with the changes you mentioned.

    4. Prepare a create control file script with all the datafiles. Mention the new name of the database in 'create controlfile' script.

    5. issue 'STARTUP NOMOUNT' for the test server.

    6. Create the control file using script created in step 4.

    7. Once the control file is created, do ' alter database open resetlogs'

    8. If it says recovery is needed for any of the datafiles, try to do the online recovery using the online redo logs.

    Good luck.
    Suneel

    5.
    Regards
    Suneel

Posting Permissions

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