Databases Reference
In-Depth Information
Keep in mind that all of the passwords from the newly restored copy are as they were in the source database.
you may want to change passwords in a replicated database, especially if it was copied from production.
Note
Step 15: Add Tempfile
When you start your database, Oracle will automatically try to add any missing tempfiles to the database. Oracle won't
be able to do this if the directory structure on the destination server is different from that of the source server. In this
scenario you will have to manually add any missing tempfiles. To do this, first take offline the temporary tablespace
tempfile. The file definition from the originating database is taken offline like so:
SQL> alter database tempfile '/u01/dbfile/o12c/temp01.dbf' offline;
SQL> alter database tempfile '/u01/dbfile/o12c/temp01.dbf' drop;
Next, add a temporary tablespace file to the TEMP tablespace that matches the directory structure of the
destination database server:
SQL> alter tablespace temp add tempfile '/ora01/dbfile/DEVDB/temp01.dbf'
size 100m;
You can run the report schema command here to verify all files are in the correct locations.
Step 16: Rename the Database
This step is optional. If you need to rename the database to reflect the name for a development or test database, create
a trace file that contains the create controlfile statement and use it to rename your database. The basic steps
involved are:
1.
Generate a trace file that contains the SQL command to re-create the control files:
SQL> alter database backup controlfile to trace as '/tmp/cf.sql' resetlogs;
2.
Shut down the database:
SQL> shutdown immediate;
3.
Modify the /tmp/cf.sql trace file; be sure to specify SET DATABASE "<NEW DATABASE
NAME>" in the top line of the output:
CREATE CONTROLFILE REUSE SET DATABASE "DEVDB" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 4
MAXDATAFILES 1024
MAXINSTANCES 1
MAXLOGHISTORY 876
LOGFILE
GROUP 1 (
'/ora01/oraredo/DEVDB/redo01a.rdo',
'/ora01/oraredo/DEVDB/redo01b.rdo'
) SIZE 50M BLOCKSIZE 512,
 
 
Search WWH ::




Custom Search