This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT 'ALTER SYSTEM KILL SESSION ''' || sid || ',' || serial# || ',@' || inst_id || ''' IMMEDIATE;' | |
FROM gv$session | |
WHERE module = 'SQL*Plus' | |
AND machine = 'host.company.com'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set parameters; these should be dynamically supplied by provisioning, with the possible exception of the two $_HOME paths. | |
DB_SID="ORCL" | |
LISTENER_PORT="1521" | |
ORACLE_HOME="/u01/app/oracle/product/11.2.0/dbhome_1" | |
LISTENER_HOME="/u01/app/oracle/product/11.2.0/dbhome_1" | |
SYS_PASSWORD="tiger" | |
DBSNMP_PASSWORD="tiger" | |
SYSMAN_PASSWORD="tiger" | |
# Run emca with parameters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT table_name, num_rows, last_analyzed | |
FROM all_tab_statistics | |
WHERE table_name IN (SELECT table_name | |
FROM all_tab_cols | |
WHERE column_name = 'DOMAIN_NAME' | |
AND owner IN ('GLOGOWNER')) | |
ORDER BY num_rows DESC; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Java and JDBC path configuration | |
jvmHome <- 'C:\\Program Files (x86)\\Java\\jre7\\' | |
ojdbcPath <- 'lib/ojdbc.jar' | |
# Load rJava library | |
Sys.setenv(JAVA_HOME=jvmHome) | |
options(java.parameters="-Xmx1g") | |
library(rJava) | |
# Output Java version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT path, label, inst_id, | |
(bytes_read / DECODE(reads, 0, 1, reads)) / 1024. AS kb_per_read, | |
(bytes_written / DECODE(writes, 0, 1, writes)) / 1024. AS kb_per_write | |
FROM gv$asm_disk_stat | |
ORDER BY path, inst_id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load rJava library | |
Sys.setenv(JAVA_HOME='C:\\Program Files (x86)\\Java\\jre7\\') | |
options(java.parameters="-Xmx1g") | |
library(rJava) | |
# Output Java version | |
.jinit() | |
print(.jcall("java/lang/System", "S", "getProperty", "java.version")) | |
# Load RJDBC library |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@author Bommarito Consulting, LLC | |
@date 20120622 | |
Identify and, if requested, remove orphaned snapshots from an EC2 account. | |
''' | |
# Imports | |
import boto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
@author Bommarito Consulting, LLC | |
@date 2012-12-23 | |
Generate .ssh/config lines from EC2 instance information. | |
''' | |
# Imports | |
import boto | |
import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#@author Bommarito Consulting, LLC; http://bommaritollc.com | |
#@date 2012-12-20 | |
import subprocess | |
import smtplib | |
from email.mime.text import MIMEText | |
fromAddress = '[email protected]' | |
adminEmail = '[email protected]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set JAVA_HOME, set max. memory, and load rJava library | |
Sys.setenv(JAVA_HOME='/path/to/java_home') | |
options(java.parameters="-Xmx2g") | |
library(rJava) | |
# Output Java version | |
.jinit() | |
print(.jcall("java/lang/System", "S", "getProperty", "java.version")) | |
# Load RJDBC library |