How Oracle uses standby to upgrade a single-instance database to a RAC environment (i)

Source: Internet
Author: User

With Oracle's standby technology, a single-instance database can be upgraded to a RAC database. This approach can effectively reduce the downtime for single instance migration to the RAC environment.

This article describes the preparation for standby database establishment.

First you need to make sure that the RAC environment on the target server is established, and if you use ASM as the storage mechanism, the ASM instance is also configured to complete.

The following starts the process of standby database creation, changing the Force logging properties of the source database:

bash-3.00$ sqlplus "/As SYSDBA"

Sql*plus:release11.1.0.6.0-production on Wednesday July 1 00:18:29 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connect to:

Oracle database11genterprise Edition release11.1.0.6.0-64bit Production

With the partitioning, OLAP, Data Mining and real application testing options

sql> SET PAGES LINES 120

Sql> SELECT NAME, Log_mode, force_logging from V$database;

NAME Log_mode Force_

------------------ ------------------------ ------

test11g Archivelog NO

sql> ALTER DATABASE FORCE LOGGING;

The database has changed.

Because you want to upgrade the target database to a RAC environment, you need to add UNDOTBS2 and THREAD2 corresponding logs:

sql> CREATE UNDO tablespace UNDOTBS2

2 datafile '/data/oracle/oradata/test11g/undotbs2_01.dbf ' size1024m;

The table space has been created.

sql> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 4

2 '/data/oracle/oradata/test11g/redo04.log ' size50m;

The database has changed.

sql> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 5

2 '/data/oracle/oradata/test11g/redo05.log ' size50m;

The database has changed.

sql> ALTER DATABASE ADD LOGFILE THREAD 2 GROUP 6

2 '/data/oracle/oradata/test11g/redo06.log ' size50m;

The database has changed.

sql> ALTER DATABASE ENABLE THREAD 2;

The database has changed.

Because Rman's duplicate creates standby, there is no way to put data files in a remote ASM disk group, so by manually creating a backup, you first put all of the tablespaces in the backup state:

Sql> SELECT ' ALTER tablespace ' | | Tablespace_name | | ' BEGIN BACKUP; '

2 from Dba_tablespaces

3 WHERE CONTENTS!= ' temporary ';

' Altertablespace ' | | tablespace_name| | ' Beginbackup; '

---------------------------------------------------------------------------------

ALTER tablespace SYSTEM BEGIN BACKUP;

ALTER tablespace sysaux BEGIN BACKUP;

ALTER tablespace UNDOTBS1 BEGIN BACKUP;

ALTER tablespace UNDOTBS2 BEGIN BACKUP;

ALTER tablespace USERS BEGIN BACKUP;

ALTER tablespace yangtk BEGIN BACKUP;

ALTER tablespace TEST BEGIN BACKUP;

7 rows have been selected.

sql> ALTER tablespace SYSTEM BEGIN BACKUP;

The table space has changed.

sql> ALTER tablespace sysaux BEGIN BACKUP;

The table space has changed.

sql> ALTER tablespace UNDOTBS1 BEGIN BACKUP;

The table space has changed.

sql> ALTER tablespace UNDOTBS2 BEGIN BACKUP;

The table space has changed.

sql> ALTER tablespace USERS BEGIN BACKUP;

The table space has changed.

sql> ALTER tablespace yangtk BEGIN BACKUP;

The table space has changed.

sql> ALTER tablespace TEST BEGIN BACKUP;

The table space has changed.

There are many ways to send data files to an ASM disk group on a remote server, but most require additional database support, such as if there is a database on the remote ASM instance, you can use FTP, Dbms_file_transfer, and so on. If you do not rely on other database aids, you can use FTP to a remote disk and then copy the files to the ASM Disk group via the Asmcmd tool.

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.