Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Multiple listeners Oracle
  • currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql Oracle
  • Parallel DML Oracle
  • ORA-4031 issue and solution on 09-MAY-2008 Oracle
  • Settting up get_vmstat.sh for colletinf CPU Usage. Oracle
  • catall.sh Linux/Unix
  • Oracle Material from OTN Oracle
  • How to find who is using which Rollback segment and how many rows or blocks in that rollback segments, Oracle
  • To seee semaphores and shared memory segments in Solaris Linux/Unix
  • Oracle 11g Training on 29JAN1010 Oracle
  • To check whether standby is recovering properly or not?? Oracle
  • DETERMINING WHICH INSTANCE OWNS WHICH SHARED MEMORY & SEMAPHORE SEGMENTS Oracle
  • kill all processes from specific user in solaris. Linux/Unix
  • RAC 11g with vmware Oracle
  • How to specify 2 arch location to avoid any kind of DB hanging. 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

  • DETERMINING WHICH INSTANCE OWNS WHICH SHARED MEMORY & SEMAPHORE SEGMENTS Oracle
  • How to analyze statspack or AWR report. Oracle
  • Explain Plan Output 2 Oracle
  • Test Case for Inserting Multiple (2.3 Million rows in 26 Seconds) Oracle
  • ext#.sql Oracle
  • Convert multiple rows to single column Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (150)
  • MYSQL (5)
  • Oracle (403)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (151)
  • SQL scripts (349)
  • SQL Server (6)
  • Uncategorized (5)
  • Videos (0)

Recent Posts

  • Key Management in Oracle: The Core Issue: Missing Master Key12-May-2026
  • SAT Mathematics 10 questions and answer at the end.30-Apr-2026
  • top 10 AI news today30-Apr-2026
  • runon_allpdbs_show_conname.sh23-Apr-2026
  • runon_allcdbs_find_pdbs.sh23-Apr-2026
  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Mutating Table Error while using database trigger Oracle
  • Insert cause enqueue locks Oracle
  • Search and replace pattern Linux/Unix
  • Library cahe Latches and internal explaination Oracle
  • Oracle 10g Wait Model Oracle
  • cur_sql.sql Oracle
  • track_autoupgrade_copy_progress.sql Oracle
  • load SPM baseline from cursor cache Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme