Skip to content

Instantly share code, notes, and snippets.

View thewellington's full-sized avatar

W. S. Wellington thewellington

View GitHub Profile
@thewellington
thewellington / no_password_expire.sql
Last active December 25, 2015 04:49
Oracle: Prevent password from expiring in the future
/* Set Oracle to prevent password form expiring */
alter profile default limit password_life_time unlimited;
@thewellington
thewellington / account_status.sql
Last active December 25, 2015 04:49
Oracle: Whose password have expired?
/* shows the account status of every user */
select username, account_status, expiry_date, sysdate, profile from dba_users;
/* shows the account status of a specific user */
select username, account_status, expiry_date, sysdate, profile from dba_users where username='username'
@thewellington
thewellington / mod_sysctl.sh
Created October 10, 2013 20:50
Modify sysctl.conf for Oracle
#!/bin/bash
#
# Change Linux kernel parameters prior to installing Oracle 11g R2 on RHEL 6.3
# v2.0 by bwellington@fulcrum.net 2012.11.20
#
f='/etc/sysctl.conf'
# Get Total Memory in KB
@thewellington
thewellington / req-rpm.txt
Created October 10, 2013 20:58
Required RPMs for Oracle
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
@thewellington
thewellington / wlsadmin
Created October 10, 2013 20:59
init scripts to start/stop Weblogic and Node Manager
#!/bin/bash
#
# wlsndm startup script for node manager
#
# chkconfig: - 75 15
# description: weblogic
# processname: WLSADMIN
# Source function library
. /etc/rc.d/init.d/functions
@thewellington
thewellington / oracle_iops.sql
Last active December 25, 2015 05:39
Get Oracle iops
select 'orcl', sample_hour, (rps+wps) IOPS
from (
with snaps as (
select hiof1.snap_id, sum(hiof1.value) reads, sum(hiof2.value) writes
from sys.WRH$_SYSSTAT HIOF1, sys.WRH$_SYSSTAT HIOF2
where HIOF1.stat_id in (select stat_id from v$statname where name like '%physical read total IO%')
and HIOF2.stat_id in (select stat_id from v$statname where name like '%physical write total IO%')
and HIOF1.snap_id=hiof2.snap_id
group by hiof1.snap_id
),
@thewellington
thewellington / .screenrc
Created October 12, 2013 02:19
My .screenrc file
## .screenrc ##
startup_message off
sorendition 00 07
# Tab bar
hardstatus off
@thewellington
thewellington / XProtect
Created October 16, 2013 04:39
File to edit when APple is being Jerks about Java and Flash
`/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta.plist`
@thewellington
thewellington / etc-inittab
Last active December 25, 2015 21:48
Disable GUI in CentOS 6
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
@thewellington
thewellington / unlock.sql
Created October 18, 2013 17:46
Unlock Oracle Schema/User account
alter user USERNAME account unlock;