Dataguard Common Administration commands

Source: Internet
Author: User
Tags manual

Management mode and read-only mode for standby servers

1.1 Repository Boot to admin recovery mode

Sql>shutdown immediate;

Sql>startup Nomount;

Sql>alter database mount standby database;

Sql>alter database recover managed standby database disconnect from session;

1.2 Reserve Library boot to read-only mode

Sql>shutdown immediate;

Sql>startup Nomount;

Sql>alter database mount standby database;

Sql>alter database open Read only;

1.3 From management recovery mode to read-only mode

Sql>recover managed standby database cancel;

Sql>alter database open Read only;

This time, you can add temporary data files to the database (this is not backed up during hot backup) such as

Alter tablespace temp add tempfile '/u02/oradata/boss/temp01.dbf ' size 100M;

Note, however, that there are two ways to manage the files in DG mode (show parameter standby can), automatic and manual management, and if it is automated management, it is impossible to add and rename operations.

For example, the article I sent yesterday

sql> ALTER DATABASE rename file '/bak/datafile/namin_data.dbf ' to '/usr/datafile/namin_data.dbf ';

Alter DATABASE rename file '/bak/datafile/namin_data.dbf ' to '/usr/datafile/namin_data.dbf '

*

ERROR at line 1:

Ora-01511:error in renaming log/data files

Ora-01275:operation RENAME is isn't allowed if standby file management is

Automatic.

Oracle check, in DG Mode, the file has two kinds of management (show parameter standby can check), automatic and manual management, if it is automatic management, can not be renamed, need to be changed to manual mode.

Sql> Show Parameter Standby

NAME TYPE VALUE

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

Standby_archive_dest string?/dbs/arch

Standby_file_management string AUTO

Sql> alter system set standby_file_management=manual;

System altered.

Sql> Show Parameter Standby

NAME TYPE VALUE

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

Standby_archive_dest string?/dbs/arch

Standby_file_management string MANUAL

sql> ALTER DATABASE rename file '/bak/datafile/namin_data.dbf ' to '/usr/datafile/namin_data.dbf ';

Database altered.

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.