Skip to main content

Posts

Showing posts from 2018

CHECKING ASM DATA FILES

ORACLE_SID = [TICO] ? +ASM irut.back.tic.com@/home/oracle: asmcmd NOTE: GET THE DATAFILES LOCATION FROM DBA_DATA_FILES VIEW ASMCMD> cd +DATA/ticotest/datafile/ ASMCMD> ls -ltr Type Redund Striped Time Sys Name DATAFILE UNPROT COARSE JUL 03 08:00:00 Y SYSAUX.771.755506741 DATAFILE UNPROT COARSE JUL 03 08:00:00 Y SYSTEM.772.755506741 DATAFILE UNPROT COARSE JUL 03 08:00:00 Y UNDOTBS1.778.755506739 DATAFILE UNPROT COARSE JUL 03 08:00:00 Y USERS.779.755506737 ASMCMD> thats it

GOLDEN GATE STATUS MONITORING SCRIPT

cat run_monitoring_Gg.sh ./monitoring_gg.sh TEST /u01/gg_home/12.2.0.1 ./monitoring_gg.sh TESTP  /u01/gg_home/12.2.0.1 cat DBNAME _monitoring_gg.log cat DBNAME _monitoring_gg.log rm DBNAME _monitoring_gg.log rm DBNAME _monitoring_gg.log -      Monitoring.sh - cat monitoring_gg.sh #!/bin/ksh # Script      : monitoring_gg.sh # Version     : 1.0 # Purpose     : To monitor Goldengate processes and latency # Usage       : monitoring_gg.sh ORACLE_SID GOLDENGATE_HOME # Example     : monitoring_gg.sh DBNAME /u01/app/goldengate/11.2.1.0.17 # # Parameters: #   1. ORACLE_SID: Database Instance name. This parameter is used to set the appropriate DB environment variables. (NOTE: This is the Instance name not Database name.) #   2. GOLDENGATE_HOME: Home directory of Goldengate installation # # ****************** # Functions # ****************** # Usage function. function show_usage {     echo " "     echo "Usage: $P

LOST DATAFILE RECOVERY IN ORACLE DATABASE

Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation.  All rights reserved. C:\Users\computer>sqlplus Enter user-name: sys as sysdba Enter password: Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select name from v$database; NAME --------- ORACLE ------------------------------------------------------------------------------ NOTE - DATABASE SHOULD BE IN ARCHIVE LOG MODE ------------------------------------------------------------------------------ SQL> archive log list; Database log mode              Archive Mode Automatic archival             Enabled Archive destination            USE_DB_RECOVERY_FILE_DEST Oldest online log sequence     8 Next log sequence to archive   10 Current log sequence           10 SQL> SQL> select name from v$datafile; NAME --------------------------------------------

Convert standby database to standby Snapshot database

PROD - Primary database COB  - Physical standby database 2. Convert COB to standby Snapshot database and confirm it is in read/Write  (i)SQL> alter database recover standby database cancel; or DGMGRL > EDIT DATABASE 'COB_DATABASE' SET STATE = 'APPLY-OFF'; (ii)DGMGRL > convert database 'COB_DATABASE' to snapshot standby; (iii)shutdown the database on the node and start the database like below SRVCTL status database - d COB_DATABASE SRVCTLstop database - d COB_DATABASE SRVCTL start database - d COB_DATABASE SRVCTL status database - d COB_DATABASE (iv) SQL > SELECT database_role role, name, db_unique_name, platform_id, open_mode, log_mode, flashback_on, protection_mode, protection_level FROM v$ database;