switchover for primary database
ALTER DATABASE commit TO switchover TO physical PRIMARY WITH session shutdown nowait;
ALTER DATABASE commit TO switchover TO physical PRIMARY WITH session shutdown nowait;
In order to perform a switchover all sessions to the database need to be disconnected. In version 901 this was a manual process. In version 9.2.0 this process has been automated with the “with session shutdown” clause that has been added to the alter database commit to switchover command. If SWITCHOVER_STATUS returns SESSIONS ACTIVE then…
Read More “Physical Standby switchover with session active” »
SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK, ROUND(SOFAR/TOTALWORK*100,2) “% COMPLETE” FROM V$SESSION_LONGOPS WHERE OPNAME LIKE ‘RMAN%’ AND OPNAME NOT LIKE ‘%aggregate%’ AND TOTALWORK != 0 AND SOFAR TOTALWORK /
cat /etc/redhat-release
set lines 120 pages 500 col owner format a30 col segment_name format a30 col tab_sum format 999999999999999 col indx_sum format 999999999999999 col MB format 999999999 accept pvm_owner prompt ‘Enter Owner Name -> ‘ accept pvm_table prompt ‘Enter Table Name -> ‘ select tab.owner, tab.segment_name, tab.tablespace_name, (tab_sum+indx_sum)/(1024*1024) MB from (select p.owner, p.segment_name, p.tablespace_name, sum(p.bytes) tab_sum from…
Problem Description: ~~~~~~~~~~~~~~~~~~~~ Database link passwords are stored as plaintext. A database link is a mechanism used to provide a method of transparently accessing one server from another. When creating a database link, a user name and password of the account on the remote server can be specified. Creating the database link without credentials works…
set lines 120 pages 200 col line format 9999 col position format 999 col text format a80 select line, position, text from dba_errors where owner= upper(‘&owner_name’) and name = upper(‘&obj_name’) order by SEQUENCE;
One of the most interesting directories on any Linux system is /proc, a virtual filesystem that provides a plethora of information on the hardware of the running system, and of the various processes running. In fact, many programs such as ps and top obtain their information by mining /proc. Some well-known virtual files in /proc…
Read More “More info about /proc folder and its relation with processes.” »
Following command can be used to find files used by specific processid. $ pfiles process_id Following command can be used to find files used by specific processid. $ pmap process_id
==>cat SOX_BACKUP.ksh #!/usr/bin/ksh # +———————————————————————— # | Usage : ./SOX_BACKUP.ksh # | Description : Cold Backup of Database. Automatically starts/stop the DB. # +———————————————————————— . /export/home/oracle/FLRSTB.env sqlplus -s /nolog /mnt/ORACLEBACKUP/files.log connect / as sysdba set term off set feedback off; set head off; set pagesize 150 select name||’ /mnt/ORACLEBACKUP/FLRPRD’ from v$datafile; exit; EOF cat /mnt/ORACLEBACKUP/files.log|grep…