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..
re-create the control file and start it up
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.
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
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
Some more details about DBCA templates here
Last edited by Bore; 07-25-2007 at 04:54 AM.
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.
There is no need to rename the datafile in staging.
eh? have you actually read the thread?
Originally Posted by ams-jamali
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.
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
Originally Posted by dbasan
OP is doing well.
Last edited by PAVB; 07-25-2007 at 09: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.
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.
Originally Posted by PAVB
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.
Click Here to Expand Forum to Full Width