Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Rename Tablespace Oracle
  • V$INSTANCE of Oracle in MYSQL MYSQL
  • To seee semaphores and shared memory segments in Solaris Linux/Unix
  • Debugging Shell FIles Linux/Unix
  • How to analyze statspack or AWR report. Oracle
  • Check Oracle installed products using one command Oracle
  • For Search and replace unix command. Linux/Unix
  • Recovering lost SYS password Oracle
  • grep multuple patterns Linux/Unix
  • SAN Linux/Unix
  • New OFA for 11g Oracle
  • Oracle 10g Wait Model Oracle
  • Find Stale DR Physical Standby Oracle
  • oracle tips… from http://www.bijoos.com/oracle/douknow.htm Oracle
  • load SPM baseline from cursor cache 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

  • logminer and my_lbu Oracle
  • run this before doing any dbchange pvm_pre_change.sql Oracle
  • SYSOPER Mystery Oracle
  • Oracle 11g Training on 29JAN1010 Oracle
  • Oracle 10g for solaris 10 Oracle
  • Find_planinfo.sql Oracle

Leave a Reply Cancel reply

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

Categories

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

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • pvm_metric.sql for gathering report from vmstat tables Oracle
  • Insert cause enqueue locks Oracle
  • db_status.sql Oracle
  • Check_recovery.sh program to run sqlplus and return its values remotely. Linux/Unix
  • findx.sql /* Find Indexes on specified USER.TABLE_NAME */ Oracle
  • crontab syntax Linux/Unix
  • Gathering statistics with DBMS_STATS Oracle
  • ORA-3136 Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme