Escolar Documentos
Profissional Documentos
Cultura Documentos
Jawaji Mahesh
Wissen GE Internal
Team Business Solutions
Table of Contents
•Intoduction
•Overview
•Process
•Verification
Wissen GE Internal
Introduction
Wissen GE Internal
Overview
Database refresh is performed from Source Database to Target Database .
• Hot Refresh.
Hot database refresh is done from Production databases to staging or
development databases.( Source database will be in archive log mode and
database will be up and running during the refresh).
• Cold Refresh.
Cold Database refresh is done from staging to Development or Vice-versa
(Source will be down during the refresh since archive log is not enabled and we
cannot put the database in hot backup mode).
Wissen GE Internal
Database Refresh Process
1.1 Source
Server name, Database name, and database version
1.2 Target
Server name, Database name and database version
If target base Version is higher than source database, then refresh target database
to version of Source database and then upgrade to the version (prior to refresh)
using catpath.sql or DBUA. This file is present in $ORACLE_HOME/dbs
Wissen GE Internal
1.3.2 Check the mount point occupancy of source and target databases.
df -k |grep <dbname> |sort
If mount points in target are less than those in source then confirm first from
User/Onsite team if datafiles can be stored in mount points other than the
targets mount point.
1.3.3 Take the backup of following from the target database in the location
/<servername>/ORACLE_ADMIN/<databasename>/scripts/refresh/
Wissen GE Internal
2. Source Database
• If status is NOT ACTIVE then keep table spaces in begin backup mode.
select UNIQUE 'ALTER TABLESPACE '||a.tablespace_name||' BEGIN BACKUP;'
FROM sys.dba_data_files A, sys.dba_tablespaces B
WHERE A.tablespace_name = B.tablespace_name
AND A.status = 'AVAILABLE'
AND B.status = 'ONLINE';
3.1 Shut down the target database and remove the datafiles from the target
mount points.
3.2 Copy the files from source mount to target mount points, check
the no. of files copied with mtpt occupancy and it should be equal
We should maintain three mount points copy at a time and monitor the
CPU usage on Source Server and Target Server.
Wissen GE Internal
3.3 After all the mount points file copy completed check the size of the datafiles copied
is same or not by issuing following command in both source and target.
Wissen GE Internal
4. Source Database.
4.1 Place the source database in end backup mode (If Hot Refresh)
4.2 Take the backup of control file and switch the archive logs.
alter database backup control file to trace ;----( available at udump location)
alter system switch logfile ;
Wissen GE Internal
scp the control file and archives logs that were generated when database was in begin
backup to the target’s create folder location. $ORACLE_ADMIN/<target_db>/create
Target Database
Step 7: Recover target database issuing following command (if Hot Refresh)
RECOVER DATABASE USING BACKUP CONTROL FILE UNTIL CANCEL;
Apply all the archives which were copied from source and give cancel.
If it shows : “Media Recovery Cancelled” – then only open the database
If Cold Refresh no need to Perform recovery. Just bring up the database by creating
the control file first using above mentioned process and give :
alter database open resetlogs;
Wissen GE Internal
Post Steps
• Create the temp file using the saved syntax from control file and after changing the
mount point location from source to target.
• Revert backup the passwords and privileges taken in Step 1.3
• Update the Global name to Target database.
select * from global_name ;
update global_name set global_name ='<targetdb>';
Wissen GE Internal
Verification - To be done at both Source and target
Wissen GE Internal
Wissen GE Internal