Skip to content

Instantly share code, notes, and snippets.

Alexs-MBP:Downloads alexlima$ pwd
/Users/alexlima/Downloads
Alexs-MBP:Downloads alexlima$ ls -lrt in*
-rw-r–r–@ 1 alexlima staff 68160048 Jan 25 11:13 instantclient-basic-macos.x64-12.2.0.1.0-2.zip
-rw-r–r–@ 1 alexlima staff 905985 Jan 25 11:14 instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip
-rw-r–r–@ 1 alexlima staff 673883 Jan 25 11:14 instantclient-sdk-macos.x64-12.2.0.1.0-2.zip
# Unzip basic libraries
SQL> select name, display_name, wait_class from v$event_name where name != display_name;
NAME DISPLAY_NAME WAIT_CLASS
---------------------------------------------------------------- ---------------------------------------------------------------- ----------------------------------------------------------------
control file sequential read control file read System I/O
control file single write control file write System I/O
log file sequential read log file multiblock read System I/O
log file single write log file header write System I/O
log file parallel write
@aoflima
aoflima / gist:30f7f03efc0fc7947ba80d44dc0c57f9
Created July 18, 2017 02:28
ORA-00257: archiver error – FRA Clean Up emergency
JDEPROD@xxxx-/cloudfs/DBA/scripts$ cat delete_arch_logs.sh
export ORACLE_SID=JDEPROD
export ORAENV_ASK=NO
. oraenv
$ORACLE_HOME/bin/rman target / << EOF
run
{
crosscheck backup;
crosscheck archivelog all;
@aoflima
aoflima / gist:6db968727fdc7277565f92ef76141ac9
Last active July 18, 2017 02:26
Avoid Resetting Expired Oracle Password
SQL> col username format a30
SQL> select username , account_status from dba_users where username = 'DBSNMP';
USERNAME ACCOUNT_STATUS
—————————— ——————————–
DBSNMP EXPIRED & LOCKED
SQL> alter user DBSNMP account unlock;
User altered.