Monitor steps for Logical Standby Database

1.V$LOGSTDBY_PROCESS displays dynamic information about what is happening to the Data Guard log apply services. This view is helpful when diagnosing performance problems during the logical application of archived redo logs to the standby database, and it can be helpful for other problems. This view is for logical standby databases only.   INPUT QUERY:-   SELECT STATUS FROM V$LOGSTDBY_PROCESS WHERE […]

Logical Standby Database setup step by step from RAC to Single Instance in 11g

LOGICAL STANDBY DATABASE STEP BY STEP     Primary DB: CLRVMS (ip:10.3.248.5 and 10.3.248.8) Logical Standby DB: CLRVMS_B(ip:10.3.248.129)   Please check whether Primary database is in archivelog or not.It should be in archivelog.   select log_mode from v$database; LOG_MODE ———— ARCHIVELOG   Enable Force Logging, SQL> ALTER DATABASE FORCE LOGGING; Database altered.   Configure Standby Redo Log on PRIMARY   Check the […]

FLASHBACK DATABASE AND QUERIES

FLASHBACK FEATURES   Purging the Recycle Bin   purge table sales.woodscrews; purge index sales.woodscrews_pk_idx; purge tablespace sales; purge recyclebin;   Undropping Objects in the Recycle Bin   flashback table ws_app.woodscrews to before drop; select object_name, original_name, droptime, dropscn from user_recyclebin; flashback table bonus to before drop rename to bonus_deb;   ———–Accidentaly Delete——————————————   Accidentally dropped table MHC_PA_INT_PPA_SPN_RL_TBL from MHCPA schema […]

Network configuration listener and tnsnames in oracle

Oracle Network Configuration =========================== In its most basic form, Oracle uses three files (listener.ora, tnsnames.ora & sqlnet.ora) for network configuration. This article gives an example of each file as a starting point for simple network configuration. •Assumptions •Listener.ora •Tnsnames.ora •Sqlnet.ora •Testing Assumptions ========== The example files below are relevant for an Oracle installation and instance with the following values. Parameter […]

Memory and Process in Oracle generic note

MEMORY MANAGEMENT 11g ===================== //blog.tanelpoder.com/2007/08/21/oracle-11g-internals-part-1-automatic-memory-management/ PGA+SGA=MEMORY_TARGET what are the shared memory IDs for my instance $ sysresv corresponding SysV SHM segments: $ ipcs -m mapped memory for an Oracle instance process – as the SGA should be definitely mapped there! $ pmap `pgrep -f lgwr` $ ls -l /dev/shm Removing Shared Memory Sometimes after an instance crash you may have […]

PLSQL Reference for DBA

PLSQL Reference for DBA PL/SQL stands for Procedural Language/SQL.PL/SQL extends SQL by adding control Structures found in other procedural language.PL/SQL combines the flexibility of SQL with Powerful feature of 3rd generation Language. The procedural construct and database access Are present in PL/SQL.PL/SQL can be used in both in database in Oracle Server and in Client side application development tools. Advantages […]

control files in general

What Is a Control File? Every Oracle database has a control file. A control file is a small binary file that records the physical structure of the database and includes: n The database name n Names and locations of associated datafiles and online redo log files n The timestamp of the database creation n The current log sequence number n […]

Redo log in general

Managing the Online Redo Log   Creating Online Redo Log Groups and Members Creating Online Redo Log Groups The following statement adds a new group of redo logs to the database: SQL>ALTER DATABASE ADD LOGFILE (‘/oracle/dbs/log1c.rdo’, ‘/oracle/dbs/log2c.rdo’) SIZE 500M; You can also specify the number that identifies the group using the GROUP option: SQL>ALTER DATABASE ADD LOGFILE GROUP 3  ‘/ORACLE/ORADATA/FRAME/REDO03.LOG’ […]

Materialized View Example

    ORASOA side:   create table tab1(c1 char(10),c2 char(10),c3 char(10));   begin for i in 1..10000 loop insert into tab1 values(i,’A’,’B’); end loop; end;   alter table tab1 add constraint pk_tab1 primary key(c1);   create materialized view log on tab1;—– Default is Primary Key   SQL> select * from mlog$_tab1 where rownum<5;   C1         SNAPTIME$ D O ———- ——— […]

All about table and constraints in Oracle

CREATING ORACLE DATABASE OBJECTS CREATING TEMPORARY TABLES   SQL>CREATE GLOBAL TEMPORARY TABLE TEMP_EMP (EMPNO NUMBER,ENAME VARCHAR2(10))   CREATING ONE TABLE WITH DATA FROM ANOTHER   SQL> create table emp_copy(empno,sal) as select empno,sal from emp;   SQL> CREATE TABLE employee_new   2 AS SELECT * FROM employees   3 PARALLEL DEGREE 4   4*NOLOGGING; Table created.SQL>     TEXT DATATYPE EXPLAINED   SQL> select vsize(sal) […]