This file contains 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
-- Identify and change profile life_time | |
select profile from DBA_USERS where username = '<username>'; | |
alter profile <profile_name> limit password_life_time UNLIMITED; | |
select resource_name,limit from dba_profiles where profile='<profile_name>'; | |
-- Identify which accounts are about to expire (or expired), change password and unlock | |
select username,expiry_date,account_status from dba_users ORDER BY expiry_date DESC; | |
alter user <username> identified by <new_password> account unlock; |
This file contains 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 SEGMENT_NAME, (BYTES/1024)/1024 --MB | |
FROM DBA_SEGMENTS | |
WHERE segment_name = :table_name | |
ORDER BY 1 DESC; |
This file contains 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 | |
distinct * | |
from | |
( | |
select | |
upper(:table_name) tabela, | |
'is refereced by' behaviour, | |
b.table_name | |
from | |
all_constraints a, |
This file contains 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
--- template, adjust accordingly | |
declare | |
cnt integer; | |
begin | |
cnt := 0; | |
for req in (select rowid, x, y, z from tabela where x is null) loop | |
update tabela set y = x+z where rowid = req.rowid; | |
This file contains 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
-- drop database link LINK_NAME; | |
create [PUBLIC] database link LINK_NAME connect to REMOTE-USER identified by "PASSWORD" using | |
'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=remote.addess.ip)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=service_name)))'; | |
-- select * from remote_table@link_name; |
This file contains 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
class Animal implements Skills, Talk { | |
abstract String voice | |
Animal(){ | |
initSkills() | |
} | |
} | |
trait Talk { | |
def talk(){println "Ele diz ' ${voice.concat(' ') * 3}'"} | |
} |
This file contains 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
-- 1 - Identify lock | |
column oracle_username format a15 | |
column os_user_name format a15 | |
column object_name format a37 | |
column object_type format a37 | |
select a.session_id,a.oracle_username, a.os_user_name, b.owner "OBJECT OWNER", b.object_name,b.object_type,a.locked_mode from | |
(select object_id, SESSION_ID, ORACLE_USERNAME, OS_USER_NAME, LOCKED_MODE from v$locked_object) a, | |
(SELECT OBJECT_ID, OWNER, OBJECT_NAME,OBJECT_TYPE FROM DBA_OBJECTS) B | |
where a.object_id=b.object_id; |
This file contains 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
rem echo off | |
cd "c:\program files\java" | |
rmdir jdk | |
mklink /d jdk jdk1.8.0_20 | |
rem mklink /d jdk jdk1.7.0_51 | |
rem mklink /d jdk jdk1.6.0_45 |
This file contains 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
############################################################ | |
# Dockerfile to build Pentaho EE BA Server container images | |
# Based on Ubuntu 14.04 | |
############################################################ | |
FROM ubuntu:14.04 | |
MAINTAINER Matt Tucker, matthewtckr@gmail.com | |
## Install Base Software | |
RUN apt-get update -y |
This file contains 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
@Grab(group="org.twitter4j", module="twitter4j-core", version="4.0.2") | |
import twitter4j.* | |
import twitter4j.api.* | |
import twitter4j.conf.* | |
import org.pentaho.reporting.engine.classic.core.util.TypedTableModel; | |
colNames = ['Screen Name', 'Tweet Date', 'Text'] as String[] | |
colTypes = [String, Date, String] as Class[] | |
model = new TypedTableModel(colNames, colTypes); |