Tools & Scripts
Dave
The important thing in life is to have a great aim and the determination to attain it !
展开
-
Oracle 查看 session 当前统计信息 脚本 说明
一.相关说明 当我们在一个session 上进行事务操作时,如果我们想查看这个事务的相关统计信息,那么可以通过v$mystat ,v$sysstat, v$sesstat, v$statname 字典来查看。 在Oracle 11g中,通过这2个视图,我么可以查看到588个相关的统计信息。SQL> select * from v$version;BANNER-----------------原创 2012-06-25 12:46:47 · 10673 阅读 · 1 评论 -
Oracle 查看 对象 持有 锁 的情况
同事在测试库上对一个表加字段,提示 ORA-00054, 资源忙。 应该是表对象的锁没有释放。有关Oracle 锁的说明,参考:ORACLE锁机制http://blog.csdn.net/tianlesoftware/article/details/4696896 用如下SQL 查看一下系统中相关对象上锁的情况: /* Formatted on 2012/2/13 14:24:32 (QP5 v5原创 2011-09-26 15:05:39 · 11513 阅读 · 0 评论 -
Oracle 查看当前会话 SESSION ID 方法 说明
查看当前会话的session ID 有如下三种方法: 1. v$mystat视图 SQL> desc v$mystat Name Null? Type ------------------------------------------------- -------------- SID原创 2012-02-07 17:10:14 · 21624 阅读 · 0 评论 -
Oracle Show_space 过程 使用示例 与 注释
一.Show_space 过程源码 1.1 源码Tom 大师的show_space过程,经pub某位同学完善之后,脚本如下: CREATE OR REPLACE PROCEDURE show_space ( p_segname_1 IN VARCHAR2, p_type_1 IN VARCHAR2 DEFAULT 'TABLE',p_space IN原创 2012-11-06 00:55:22 · 16441 阅读 · 2 评论 -
Oracle AWR 报告 每天自动生成并发送邮箱 Python脚本
Oracle 的AWR 报告能很好的提供有关DB性能的信息。 所以DBA 需要定期的查看AWR的报告。 有关AWR报告的说明参考: Oracle AWR 介绍 http://blog.csdn.net/tianlesoftware/archive/2009/10/17/4682300.aspx 如果说每天都去手工的出创建AWR报告,是个费时的活。 所以,最好就原创 2011-04-12 22:27:00 · 10963 阅读 · 1 评论 -
Python 发送带 附件 邮件 脚本
Python 发送普通邮件的脚本参考: Python 发送 RMAN 备份 Log 脚本 http://blog.csdn.net/tianlesoftware/archive/2011/02/25/6206543.aspx 在这篇里主要演示一个Python 发送附件邮件的脚本。 参考Pytheon 文档:http://docs.python.org/原创 2011-04-12 15:44:00 · 7914 阅读 · 0 评论 -
Oracle 发送邮件 存储过程 代码
SQL 代码如下: CREATE OR REPLACE PROCEDURE PROCSENDEMAIL(P_TXT VARCHAR2, P_SUB VARCHAR2, P_SENDOR VARCHAR2原创 2010-08-27 10:30:00 · 8023 阅读 · 1 评论 -
RAC 完整显示 crs_stat 命令中 name 列的脚本
RAC 常用的脚本说明,参考我的Blog: Oracle RAC 常用维护工具和命令 http://blog.csdn.net/tianlesoftware/archive/2010/03/09/5358573.aspx crs_stat 命令在显示上比srvctl 直观。 先查询一下: [oracle@rac1 u01]$ crs_stat -t Name原创 2011-03-22 20:19:00 · 7750 阅读 · 0 评论 -
Oracle 查看 使用 UNDO 段的事务 脚本
Undo 表空间管理的说明,参考:Oracle undo 表空间管理http://blog.csdn.net/tianlesoftware/article/details/5689558我们可以使用如下脚本查看Oracle undo segment段的信息:/* Formatted on 2012/6/18 18:10:55 (QP5 v5.185.11230.41888) */SELECT T原创 2012-06-18 18:25:36 · 8028 阅读 · 0 评论 -
Python 发送 RMAN 备份 Log 脚本
RMAN 备份的日志放到一个文件里了。 之前的Nocatalg 下的备份脚本是使用Linux 的sendmail 来发送的。 不过这玩意影响系统的启动时间。 还是关了用Python来发送的。 备份完之后,调用一下脚本。 把RMAN的日志发送到邮箱。 早上来看下邮件,就知道备份是否成功了。 不然一台一台连服务器,有点小累。 Nocatalog 下的RMAN 增量备份 shell脚本http://b原创 2011-02-25 00:07:00 · 7022 阅读 · 0 评论