Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • move_arch_files.ksh Linux/Unix
  • switchlogfile.sh Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • age_alert.ksh aging out alert.log Linux/Unix
  • ORACLE_SID in sqlplus Oracle
  • block_ident.sql Oracle
  • Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry Oracle
  • oracle 10g on linux Linux/Unix
  • How does one SELECT a value from a table into a Unix variable? From SQL to Shell Linux/Unix
  • chk_space_SID.ksh Linux/Unix
  • find_string_in_database.sql Oracle
  • How to find the real execution plan and binds used in that explain plan in Oracle 10g?? Oracle
  • OEM-Commnds Oracle
  • backspace in SQL Plus not working then..? Linux/Unix
  • Pending Distributed Transations 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

  • Important Script Method for tuning Oracle
  • Load testing on Oracle 19C RAC with HammerDB Oracle
  • Committing distributed transaction using commit force Oracle
  • Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository Oracle
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • moving lob object to other tablespace lob_mvmt.sql 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
  • Logic to chech # of parameters command line parameters Linux/Unix
  • Renaming Global Name GLOBAL_NAME Oracle
  • oracle 11g RAC on vmware Oracle
  • Jai Shree Ram Oracle
  • SQL_PROFILE – I explaination Oracle
  • lck.sql Oracle
  • V$transaction notes for finding XID composition. Oracle
  • Sequence Resetting Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme