Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Processes Parameter decision Oracle
  • online_bkup.sql Oracle
  • Implementing Listener Security Oracle
  • Jai Shree Ram Oracle
  • sid_wise_sql.sql Oracle
  • replace alphabets using sed Linux/Unix
  • Useful Solaris Commands on 28-SEP-2005 Linux/Unix
  • Pending Transaction Neighbors Script Oracle
  • To check whether standby is recovering properly or not?? Oracle
  • Some useful Unix Commands Linux/Unix
  • cur_sql.sql Oracle
  • executing Function from SQLPLUS prompt Oracle
  • S3 Basic info AWS
  • Find total file sizes Linux/Unix
  • Temporary Tablespsace Temp tablespace behaviour 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

  • v$backup.status information Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • find_cons.sql Oracle
  • How to see which patches are applied. Oracle
  • proc.sql Oracle
  • column level grant syntax 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
  • TNSNAMES entries details Oracle
  • Goldengate document from Porus Oracle
  • Check Oracle installed products using one command Oracle
  • avail.sh ( find filesystem spae usage) Linux/Unix
  • My Test Case On 21-OCT-2005 Oracle
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • How does one SELECT a value from a table into a Unix variable? From SQL to Shell Linux/Unix
  • online_bkup.sql Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme