Posts

Showing posts from October, 2017

AWR Retention and Snapshot Interval change and configuring AWR Baselines

The dba_hist_wr_control table shows the AWR snapshot settings, namely the snapshot interval, the retention period view: dba_hist_wr_control SQL> desc dba_hist_wr_control  Name                                      Null?    Type  ----------------------------------------- -------- ----------------------------  DBID                                      NOT NULL NUMBER  SNAP_INTERVAL                             NOT NULL INTERVAL DAY(5) TO SECOND(1)  RETENTION                                 NOT NULL INTERVAL DAY(5) TO SECOND(1)  TOPNSQL                                            VARCHAR2(10)  CON_ID                                             NUMBER ### The below script gives present snapshot interval and rentional interval of AWR##### SQL> @awr_settings.sql select    extract( day from snap_interval) *24*60+    extract( hour from snap_interval) *60+    extract( minute from snap_interval ) "Snapshot Interval",    extract( day from retention) *24*6

Configuring oracle enterprise manager express 12c

1.TO configure EM express and connect to the database using EM database Express the Listener should be up an running. [oracle@pavanorcl101 ~]$ lsnrctl status LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 17-OCT-2017 15:17:47 Copyright (c) 1991, 2014, Oracle.  All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=pavanorcl101.mydomain.com)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias                     LISTENER Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production Start Date                17-OCT-2017 15:17:22 Uptime                    0 days 0 hr. 0 min. 25 sec Trace Level               off Security                  ON: Local OS Authentication SNMP                      OFF Listener Parameter File   /u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/listener.ora Listener Log File         /u01/app/oracle/diag/tnslsnr/pavanorcl101/listener/alert/log.xml Listening Endpoints Summary...

creating catalog database and registering databases to catalog

Create catalog database and configure the network in between the catalog and database you wish to register in the database 1. Here i have already created the database     Name:CATALOG ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 ORACLE_BASE:/u04/app/oracle/oradata/ FRA: /u04/app/oracle/fast_recovery_area/ SQL> select name from v$database; NAME --------- CATALOG 2. Create a tablespace for the RMAN user: SQL> create tablespace cattb datafile '/u04/app/oracle/oradata/CATALOG/datafile/cattb01.dbf' size 1G; Tablespace created. 3. Create an USER with default tablespace CATTB with unlimited quota on that tablespace: SQL> create user rman identified by oracle temporary tablespace temp default tablespace cattb quota unlimited on cattb; User created. 4. Grant the RECOVERY_CATALOG_OWNER role to the schema owner. This role provides the user with all privileges required to maintain and query the recovery catalog. SQL> grant recovery_

Bi-directional Golden Gate

###For Installation & configuring Bi directional Golden Gate follow the steps in below link. make sure you do the same steps on both servers as that document has steps for configuring uni-diectional GoldenGate### https://oracleinsightspk.blogspot.com/2017/10/configuring-goldengate-golden-gate-home.html NAMING CONVENTION should be followed in any environment where we are Implementing GoldenGate# E starts with Extract P starts with Pump R starts with Replicat Here we are taking Server 1                                                            Server 2 extract: EWORK extract: ETARGET pump: PWORK pump: PTARGET replicat:RTARGET                                            replicat:RWORK ###we are replicating schema pavan bi-directionally (including all tables)### goldengate home on both servers:'/u02/app/goldengate' Server 1: test GGSCI (localhost.localdo

Active dataguard configuration

1. Configure physical standby https://oracleinsightspk.blogspot.com/2017/10/dataguard-configuration.html 2.Stop MRP on the standby SQL>alter database recover managed standby database cancel; 3. open the databasse in read only mode SQL> alter database open read only; 4. Start MRP SQL>alter database recover managed standby database using current logfile disconnect from session; ### Now the database is open in read only mode, we can query select to see real time changes###

Dataguard: Starting and Stoping MRP

check mrp status : SQL>select PROCESS,CLIENT_PROCESS,THREAD#,SEQUENCE#,BLOCK# from v$managed_standby where process = 'MRP0' or client_process='LGWR'; ---------------------------------------------------------- stop mrp : SQL>alter database recover managed standby database cancel; --------------------------------------------------------- start mrp: SQL> alter database recover managed standby database using current logfile disconnect from session; ####dataguard configuration#### https://oracleinsightspk.blogspot.com/2017/10/dataguard-configuration.html

Dataguard configuration

DATAGUARD : At every primary server each archived redo-log files are uniquely identified by its log sequence number and thread number and which is transferred by LGWR or ARCH background processes from primary to standby server. On standby site RFS (Remote File Server process) who receives the archived log and match sequence number with the sequence number of the previously received archived redo log file. If the sequence number of the current received archived redo log file is greater than the sequence number of the last received archived redo log file plus one (means missing sequence in archived log), a request is sent to the arc-hiver process of the primary database that is providing a list of missing archived redo log files and oracle generates ORA-16146 (standby destination control file enqueue unavailable). MRP (Managed Recovery Process) is waiting for a log that has already been shipped but does not appear in v$archived_logs and there are ORA-16146 errors reported

sample extract,pump and replicate(goldengate)

NAMING CONVENTION should be followed in any environment we are Implementing GoldenGate# E starts with Extract  P starts with Pump R starts with Replicat  Here we are taking extract: EWORK pump: PWORK replicat:RWORK ###we are replicating schema pavan(including all tables)### goldengate home:'/u02/app/goldengate' source side:  test GGSCI (localhost.localdomain) 2> start mgr Manager started. GGSCI (localhost.localdomain) 1> dblogin userid ogg_user@test password oracle; Successfully logged into database. GGSCI (localhost.localdomain as ogg_user@test) 2> add schematrandata pavan allcols 2017-10-09 14:22:20  INFO    OGG-01788  SCHEMATRANDATA has been added on schema pavan. 2017-10-09 14:22:20  INFO    OGG-01976  SCHEMATRANDATA for scheduling columns has been added on schema pavan. 2017-10-09 14:22:21  INFO    OGG-01977  SCHEMATRANDATA for all columns has been added on schema pavan. Configuring Extract: GGSCI (local

11g to 12c database upgrade steps

                                    Upgradation steps Create directory to place the 12c software     >Mkdir -p /u02/stage Copy the 12c files into the stage Unzip the files in the stage Run >sh runInstaller Go to sql and run preupgrade scripts > @preupgrd.sql ACTIONS REQUIRED: 1. Review results of the pre-upgrade checks:  /u01/app/oracle/cfgtoollogs/test/preupgrade/preupgrade.log 2. Execute in the SOURCE environment BEFORE upgrade:  /u01/app/oracle/cfgtoollogs/test/preupgrade/preupgrade_fixups.sql 3. Execute in the NEW environment AFTER upgrade:  /u01/app/oracle/cfgtoollogs/test/preupgrade/postupgrade_fixups.sql RUN PRE UPGRADE FIXUP SCRIPT SQL> @/u01/app/oracle/cfgtoollogs/test/preupgrade/preupgrade_fixups.sql Pre-Upgrade Fixup Script Generated on 2017-08-09 12:21:41  Version: 12.1.0.2 Build: 006 Beginning Pre-Upgrade Fixups... Executing in container TEST *********************************************

configuring goldengate

configuring goldengate Pre req:  Install Goldengate software on both the servers golden gate home: /u02/app/goldengate Update bash_profile on both Source and Target side [oracle@localhost ~]$ vi .bash_profile if [ -f ~/.bashrc ]; then         . ~/.bashrc fi # User specific environment and startup programs export ORACLE_SID=test export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 export GRID_HOME=/u01/app/oracle/product/12.1.0/grid export LD_LIBRARY_PATH=$ORACLE_HOME/lib export PATH=$ORACLE_HOME/bin:$PATH: export PATH=$GRID_HOME/bin:$PATH: export PATH=$ORACLE_HOME/OPatch:$PATH: PATH=$PATH:$HOME/bin export PATH export GGS_HOME=/u02/app/goldengate alias ggn='cd ${GGS_HOME}' alias ggsci='cd ${GGS_HOME}/ggsci' export LD_LIBRARY_PATH=$GGS_HOME:$ORACLE_HOME/lib:/lib:/usr/lib ".bash_profile" 25L, 684C                                     24,1          75% Source db_name: TEST target db_name: CLONE 1. check for