scripts

Scripts: Monitor Tablespace space growth

January 10, 2013 maintain, oracle No comments

这个脚本可以监控tablespace 空间增长趋势,并且邮件通知到相关domain– 根据TOAD SPACE MANAGEMENT 修改

创建schema,tablespace,table:

create tablespace toad '+ARCH/data/tbs_ts[......]

Read more

Scripts: dbms_backup_restore modify dbid and db_name

December 5, 2012 Internals, oracle 1 comment

Scripts:dbms_backup_restore_dbid

eg:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Par[......]

Read more

Scripts: 查找每年特定星期x的日期

August 10, 2012 maintain, oracle No comments

11g之前还不支持分区自动interval day 功能,对于需要指定日期的分区需求例如每周2一个分区,可以采用下面脚本实现

select  'alter table END_USER_LOGIN_LOG_1 add partition P'|| TO_CHAR[......]

Read more

Scripts: Monitor smon rollback progress

July 7, 2012 maintain, oracle No comments

this scripts is used to monitor transaction rolling back progress

——————————————————————————-[……]

Read more

Scripts: check user all granted privileges

June 14, 2012 maintain, oracle No comments

this scripts is used to check user all privileges

set serveroutput on;
DECLARE
v_user VARCHAR2(30) := ‘XXX’;
v_ddl[……]

Read more

“hcheck.sql” script to check for known problems in Oracle8i, Oracle9i, Oracle10g and Oracle 11g

April 20, 2012 Internals, oracle No comments

Execution Environment:

Access Privileges:
Requires to be run connected as SYS schema

Usage:
$ sqlplus
SQL*Plus: Release 9.2.0.2.[……]

Read more

Scripts:sess_uncommited_transactions.sql

March 2, 2012 maintain, oracle No comments

This script is monitoring sessions that are not commited :

— |—————————————————————————-|[……]

Read more

Scripts:lock_internal

February 10, 2012 Internals, oracle No comments

set echo off

————————————————–
— @name: lock_internal
— @author: dion cho
— @description: my own version of[……]

Read more

Scripts:show_space

January 16, 2012 maintain, oracle No comments

修改过的show_space 支持ASSM

create or replace
procedure show_space
( p_segname_1 in varchar2,
p_space in varchar2 def[……]

Read more

Scripts:xplan_extended_display_cursor

January 9, 2012 maintain, oracle No comments

Alter session set sql_trace=true;
Alter session set STATISTICS_LEVEL = ALL;

set echo off verify off termout off
set doc off
doc
— ———-[……]

Read more