Sunday, May 7, 2023

GET DIRECTORY LOCATION ON ORACLE DATABASE

 echo "
col name_col_plus_show_param for a20;
col value_col_plus_show_param for a80;
show parameter db_recovery_file_dest;
" | sqlplus \/ as sysdba | grep -o "\w*/[[:graph:]]*" > bkploc.txt


--------------------- To find the RMAN backup locations --------------------------------------------
echo "
$(
echo "select fname from v\$backup_files where file_type='PIECE' order by completion_time desc fetch first 1 rows only;" | sqlplus \/ as sysdba | dirname $(grep -e "^/[[:graph:]]*")
)"
----------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment

Enable OpenSSH on Windows 11

Step 1: Install OpenSSH Server You can do this via PowerShell (run as Administrator ): Check if it's already available: Get-WindowsCapab...