Creating Staging Database
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Creating Staging Database

  1. #1
    Join Date
    Sep 2005
    Posts
    278

    Creating Staging Database

    I have an assignment to create a Staging server, I copied all the datafiles & archive logs from the production to staging server.. I have init & control file of production server. The database name is different in staging server and also the locations of the datafiles.

    Then what should I do? please help me..

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    re-create the control file and start it up

  3. #3
    Join Date
    Feb 2007
    Location
    UNDER MOON
    Posts
    44
    DAV can u plz tell me how to create staging database ????
    Its like that or not... ???

    Create a database on staging server
    Stop the database on the staging server.
    Backup the staging database in case it is required later.
    Create an offline backup of the production database.
    Restore the production database backup on the staging server, overwriting the staging database.
    Start the database on the staging server.

  4. #4
    Join Date
    Nov 2006
    Location
    Sofia
    Posts
    630
    I would recommend using DBCA.
    1)At the source database, start dbca
    2)enter "Manage Templates"
    3)Create template from the source database INCLUDING Structure as well as data
    4)go to the $ORACLE_HOME/assistants/dbca/templates
    identify all the files, containng in their name the template name you gave during the template creation and copy them to the destination machine
    $ORACLE_HOME/assistants/dbca/templates
    5) At the destination machine start DBCA
    6) Select create database. In the list of templates, bellow OLTP, DWH, general purpose, you will see your template name. Select it
    7) Follow the wizard, complete the database creation
    8) Check if all the data users etc are ok and be happy :-)

    NOTE: That works only if the source and destination OS is same
    P.S.
    Some more details about DBCA templates here
    http://download-uk.oracle.com/docs/c...te.htm#1000144
    Last edited by Bore; 07-25-2007 at 05:54 AM.

  5. #5
    Join Date
    Sep 2005
    Posts
    278
    I mounted the destination database with source control file, and then run the commands to rename datafiles as "alter database rename file from .. to ..."

    and the recover the database applying archive logs.

  6. #6
    Join Date
    Jan 2007
    Posts
    231
    There is no need to rename the datafile in staging.

  7. #7
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    Quote Originally Posted by ams-jamali
    There is no need to rename the datafile in staging.
    eh? have you actually read the thread?

  8. #8
    Join Date
    Mar 2004
    Location
    DC,USA
    Posts
    650
    Staging database is a copy of production database, with all the schema. Its a test environment where one test the code before deplying into the production.

    There are many different explanations in the net.

    Easy in exporting all the schema from production into staging or do a full import.

  9. #9
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Quote Originally Posted by dbasan
    Easy in exporting all the schema from production into staging or do a full import.
    I'm in agreement this exp/imp strategy is fine to refresh your staging environment -depending on the size of this environment- but, you missed a small detail, as per original poster "I have an assignment to create a Staging server" therefore, database has to be created; exp/imp strategy wouldn't do it

    OP is doing well.
    Last edited by PAVB; 07-25-2007 at 10:35 AM.
    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.

  10. #10
    Join Date
    Mar 2004
    Location
    DC,USA
    Posts
    650
    Quote Originally Posted by PAVB
    database has to be created; exp/imp strategy wouldn't do it
    .
    Also did you notice, OP says staging server db name is different from production db and he is finding it difficult to make it from the production datafiles and arc logs.

    Instead create a database in staging server, create all the tablespaces as in production, then import the production dump in staging and its all done. Simple isn't.

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