Recently, the company needs to switch the Oracle database to another server and use EXP and IMP to export the import tool. After a long period of time, an error is returned... All kinds of tangle... Therefore, a simple cold Backup recovery mechanism is adopted. However, because the original database version is 10.2.0.1, the server to be switched is 10.2.0.5, and the company has a uniform database version of 10.2.0.5. EXP and IMP are originally the best method, but there are various errors, which are very difficult to handle. So Mao, after asking the gods, said that it is okay to update the dictionary file after the database of the lower version switches to the database of the higher version. So I started to work.
Step 1:
Check and record existing database information
Disable CRM Database
View the locations of the files to be backed up by the wdfcrm database on the source host. Cold backup requires backup of control files, parameter files, password files, data files, and online redo log files.
Control File
SQL: select * from V $ CONTROLFILE
Parameter file
SQL: select * from V $ PARAMETER where name like '% spfile %'
------------------------------
PRODUCT \ 11.2.0 \ DBHOME_1 \ DATABASE \ SPFILEORCL. ORA
Password File
Product \ 11.2.0 \ dbhome_1 \ database \ PWDorcl. ora
Data Files
SQL: select name from V $ DATAFILE
Online redo log files
SQL: select * from V $ LOGFILE
Back up the above files
Step 3:
First shut down the database of the new server (using the shutdown immediate command)
Then, copy the backup files on the source host to the corresponding directory of the target host.
Then, start the database to check whether the cold backup is restored successfully.
Because of the differences in database versions, you need to update the data dictionary. The specific operation is the same as the update script executed when 10.2.0.5 is installed.
Update Data Dictionary
[Oracle @ www.bkjia.com Disk1] $ sqlplus/as sysdba
SQL> startup upgrade;
SQL> select tablespace_name, sum (bytes)/(1024*1024) "Free M" from dba_free_space where tablespace_name = 'system' group by tablespace_name;
TABLESPACE_NAME Free M
----------------------------------------
SYSTEM 10.375
SQL> SPOOL patch. log
SQL> @? /Rdbms/admin/catupgrd. SQL // it takes about 20 minutes to execute the script.
Total Upgrade Time: 00:24:46 // The Upgrade Time when JAVA_POOL_SIZE is set to MB
Total Upgrade Time: 01:06:39 // The Upgrade Time is not set when JAVA_POOL_SIZE is mb. Therefore, you must remember to set this parameter !!
SQL> SPOOL OFF
5.1.2. recompile invalid objects
SQL> shutdown immediate
SQL> startup
SQL> @? /Rdbms/admin/utlrp. SQL
SQL> @? /Rdbms/admin/catalog. SQL;
SQL> @? /Rdbms/admin/catproc. SQL;
5.1.3. Check the components, versions, and statuses installed in the database:
SQL> shutdown immediate;
SQL> startup
OK... get it done.
For more information about Oracle, see Oracle topics page http://www.bkjia.com/topicnews.aspx? Tid = 12