Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • oracle tips… from http://www.bijoos.com/oracle/douknow.htm Oracle
  • How to Modify the statistics collection by MMON for AWR repository Oracle
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle
  • Explain Plan Output 2 Oracle
  • Metalink Note: Note:250655.1 : ADDM Basics USING THE AUTOMATIC DATABASE DIAGNOSTIC MONITOR Oracle
  • catall.sh Linux/Unix
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • Shuffle an array PHP/MYSQL/Wordpress
  • Search and replace pattern Linux/Unix
  • To seee semaphores and shared memory segments in Solaris Linux/Unix
  • online_bkup.sql Oracle
  • How to set Processes Parameter Oracle
  • Zip and unzip with tar Linux/Unix
  • Good link for LIO in Oracle ( Logical IOs) Oracle

OPENING A STANDBY DATABASE IN READ-ONLY MODE

Posted on 30-Sep-2005 By Admin No Comments on OPENING A STANDBY DATABASE IN READ-ONLY MODE

OPENING A STANDBY DATABASE IN READ-ONLY MODE

———————————————

In order to perform queries on a read-only standby database, the database

needs to be able to perform on-disk sorting operations. Locally managed

temporary tablespaces do not record transactions in the data dictionary.

Steps to create a locally managed temporary tablespace

1. Create a temporary tablespace on the primary database.

SQL> CREATE TEMPORARY TABLESPACE tbs_1 TEMPFILE ‘file_1.f’

SIZE 10M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 16M;

2. Create a user in the primary database with necessary privileges to perform

queries.

SQL> CREATE USER IDENTIFIED BY
DEFAULT TABLESPACE
TEMPORARY TABLESPACE ;

3. Grant the necessary prvileges to the user to perform the queries.

4. Archive the current redo logs that recorded these commands and apply

them to the standby database. So Tablespace definition and USER information will be applied to standby database.

5. Start up the standby database in read-only mode.

SQL> RECOVER MANAGED STANDBY DATABASE CANCEL;

SQL> SELECT * FROM V$DATAFILE;

SQL> SELECT * FROM V$RECOVER_FILE;

SQL> ALTER DATABASE OPEN READ ONLY;

6. Add the tempfile to the LOCALLY MANAGED temporary tablspace.

SQL> ALTER TABLESPACE ADD TEMPFILE SIZE [M/K];

for example,

ALTER TABLESPACE TEMP ADD TEMPFILE ‘/uocdb1/oradata/CIF/cif_temp.dbf’ SIZE 100M;

7. Logon as the user to perform read-only queries.

8. After performing all your read-only operations, you need to shutdown and restart your database in MOUNT STANDBY mode.

Oracle, rman-dataguard

Post navigation

Previous Post: Oracle Standby Database Library Index from Metalink
Next Post: SAN

Related Posts

  • Vivek Tuning for Row Locks. Oracle
  • Convert multiple rows to single column Oracle
  • ORA-1841 Error Connecting to Upgraded Database After Set PASSWORD_LIFE_TIME Oracle
  • temp_use.sql diplays usage of temp ts Oracle
  • Roles and Stored Object behaviour Oracle
  • Facts about SCN and Rollback Segment Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • Formatter Explain plan Output 1 Oracle
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle
  • PLSQL Table Syntax 1 Oracle
  • findx.sql /* Find Indexes on specified USER.TABLE_NAME */ Oracle
  • Test Case for Inserting Multiple (2.3 Million rows in 26 Seconds) Oracle
  • .profile Linux/Unix
  • Rollback force for distributed transactions Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme