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.
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
$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 :-)
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.
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.
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
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.
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.
Bookmarks