Query to check Archive space Utilization
set pagesize 0 feedback off verify off heading off echo off
SELECT decode( nvl( space_used, 0),0, 0, ceil ( ( space_used / space_limit) * 100) ) pct_used FROM v$recovery_file_dest;
Tips and recommendations on various Oracle products. Solving day to day challenges with easy operational tasks. Providing ideas on scripting, queries and oracle Patching. Find tricks for numerous ORA-error.
set pagesize 0 feedback off verify off heading off echo off
SELECT decode( nvl( space_used, 0),0, 0, ceil ( ( space_used / space_limit) * 100) ) pct_used FROM v$recovery_file_dest;
In many times, we need to know what are the script is being called while setting up the environment variables, this is very handy when we are getting errors like some env variables are not setup.
If zsh is the login shell:
zsh -xl
Execute the below command to get from which file the environment is setup:
PS4='+$BASH_SOURCE> ' BASH_XTRACEFD=7 bash -xl 7>&2
Best Wishes!!
col START_TIME for a15
col END_TIME for a15
col TIME_TAKEN_DISPLAY for a10
col INPUT_BYTES_DISPLAY for a10
col OUTPUT_BYTES_DISPLAY for a10
col OUTPUT_BYTES_PER_SEC_DISPLAY for a10
col output_device_type for a10
SELECT to_char (start_time,'DD-MON-YY HH24:MI') START_TIME,to_char(end_time,'DD-MON-YY HH24:MI') END_TIME, time_taken_display, status,input_type, output_device_type,input_bytes_display, output_bytes_display,output_bytes_per_sec_display,COMPRESSION_RATIO COMPRESS_RATIO FROM v$rman_backup_job_details WHERE status like 'RUNNING%';
set pagesize 300
set linesize 200
set wrap off
select thread#, sequence#, applied,to_char(first_time,'mm/dd/yy hh24:mi:ss') first,to_char(next_time, 'mm/dd/yy hh24:mi:ss') next,to_char(completion_time, 'mm/dd/yy hh24:mi:ss') completion from v$archived_log where thread# = 1 order by first_time;
control_management_pack_access
SQL> show parameter control_management_pack_access
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_management_pack_access string NONE
SQL> ALTER SYSTEM SET control_management_pack_access="DIAGNOSTIC+TUNING";
System altered.
SQL> show parameter control_management_pack_access
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_management_pack_access string DIAGNOSTIC+TUNING
Note: Before doing that, please make sure you have the corresponding licenses from Oracle.
Best Wishes!!!
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ ONLY
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
DGMGRL> edit database <STBY_DB> set state='APPLY-OFF';
Succeeded.
DGMGRL> edit database <PRIM_DB> set state='LOG-TRANSPORT-OFF';
Succeeded.
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT; -- Start MRP
DGMGRL> edit database <STBY_DB> set state='APPLY-ON';
Succeeded.
DGMGRL> edit database <PRIM_DB> set state='LOG-TRANSPORT-ON';
Succeeded.
Ref: Steps to restart log transport process in data guard (Doc ID 2819878.1)
Check progress on expdp and impdp: In few cases we need to monitor the progress of an export or import job in oracle. below are the steps c...