sysstatgar.sh 收集数据库指标信息脚本
#!/bin/sh## sysstatgar.sh, Gather system v$sysstat details .# sh sysstatgar.sh SERVICE_IPif [ $# -ne 1 ]; then echo "Usage: sh sysstatgar.sh SERVICE_IP" exit 1;fiBASE_HOME=`/usr/bin/dirname "$0"`. ~/.profile# Log To LogFile MLOGFILE=${BASE_HOME}/`hostname`_sysstat...
numtoyminterval函数——数字转换函数
numtoyminterval函数——数字转换函数 语法:NUMTOYMINTERVAL ( n , 'char_expr' ) char_expr:日期描述,可以是YEAR和MONTH; 作用:可以将数字转换成相应的日期单位时间 比如:NUMTOYMI...
ORACLE NTERVAL 时间表达式
NTERVAL DAY TO SECOND数据类型Oracle语法:INTERVAL '{ integer | integer time_expr | time_expr }' { { DAY | HOUR | MINUTE } [ ( leading_precision ) ]| SECOND [ ( leading_precision [, fractional_seconds_precision ] ) ] }[ TO { DAY | HOUR | MINUTE | SECOND [ (fractional_seconds_precision) ] } ...
Oracle RAC 客户端故障转移(failover) TAF
Oracle RAC 客户端故障转移(failover),当采用TAF方式时,对于已经建立连接的客户端,在连接的实例或节点出现故障时,客户端无需再次发出连接请求,仍然可以继续之前的数据库操作,此称之为透明故障转移。本文描述基于Oracle 10g rac,客户端TAF方式的故障转移并给出示例。 下面是一些关于这方面的基础参考...
channel t1: no AUTOBACKUP in 7 days found
RMAN> run {<br />2> allocate channel t1 type 'sbt_tape'<br />3> parms 'ENV=(NSR_SERVER=backupsvr4, NSR_CLIENT=toyy2b,NSR_DATA_VOLUME_POOL=TOYY2fulldata)';<br />4> restore controlfile from 'IBM-3584-2_toyy2_full_ORAYY2_gfqd4urg';<br />5> release channel t1;<br />6> }<br /><br ...
oraccle statspack 使用
<p><b><span style="font-size:22.0pt;font-family:宋体;color:red;">一、</span></b><b><span style="font-size:22.0pt;font-family:;">Statspack</span></b><b><span style="font-size:22.0pt;font-family:宋体;color:red;">概述</span></b><b><span style="font-size:22.0pt;font-family:;"></span></b> </p><p styl...
归档告警频繁监控脚本
<div style="font-family:微软雅黑;white-space:normal;widows:auto;background-color:#FFFFFF;">归档监控脚本做了一下改动,发现的告警信息如下:</div><div style="font-family:微软雅黑;white-space:normal;widows:auto;background-color:#FFFFFF;"><span style="background-color:rgba(0, 0, 0, 0);"><span style...
SHELL NR与FNR区别
<p style="color:#333333;font-family:tahoma, 宋体;font-size:14px;line-height:22.3999996185303px;text-align:justify;white-space:normal;background-color:#FAFAFC;">NR,表示awk开始执行程序后所读取的数据行数.</p><p style="color:#333333;font-family:tahoma, 宋体;font-size:14px;line-height:22.399999618530...
for 循环境实现游标LOOP提取
create or replace procedure p_repaire_data_route_nbr is<br /> cnt number(7) :=0;<br />begin<br /> for cl in (select a.*,rowid from KXD_TMP_ERRNBR a where servnumber like '1064%' and flag is null) loop<br /> for cl2 in (select * from subs_telnum t where value = cl.servnum...
auto_grant_privilege
create or replace procedure auto_grant_privilege as<br /> /*<br /> CREATED Time: 20150803 <br /> AUDITOR : HURP<br /> FUNCATION : Find the new object of program account and grant to maintain user;<br /> DESCRIBE : 本过程将表SH...
undo_analyze.sh
#####added by hurp for undo analyze ##############<br />10 * * * * sh /oracle/hurp/undo_analyze.sh >/oracle/hurp/undo_analyze.log 2>&1 &<br /><br />[oracle@c4oyy1a] /oracle> more /oracle/hurp/undo_analyze.sh <br />#!/usr/sbin<br />. /oracle/.profile<br />$ORACLE_HOME/bin/...
动态 SQL、EXECUTE IMMEDIATE、using、into、returning
很多时候我们需要在存储过程中使用动态的SQL,要怎么用好动态SQL呢,怎样执行效率最高呢。下面来介绍一下,如何使用动态SQL操作数据库。在存储过程中执行一个简单的SQL语句使用下面的方法即可。
oracle SPA 性能分析案例
---创建中转表<br /><br /><br />begin<br />DBMS_SQLTUNE.create_stgtab_sqlset(table_name => 'SQLSET3_TAB',<br />schema_name => 'SPA',<br />tablespace_name => 'TBS_IDX_ORDER_04');<br />END;<br />/ <br /><br />-------------将优化集打包到stgtab表SQLSE3_TAB里面<br /><br /> ...
aix etherchannel 切换方法和查看方式
1、查看etherchannel的配置,如下ent3为主,ent1为备dbrac1:/@root>#lsattr -El ent4 adapter_names ent3 EtherChannel Adapters  ...
lsdb.bin: Cannot allocate memory of size 0
Copying coraenv to /usr/local/bin ...Entries will be added to the /etc/oratab file as needed byDatabase Configuration Assistant when a database is createdFinished running generic part of root script.Now product-specific root actions will be performed.Relinking oracle with rac_on ...
ORA-15081 解决方法
解决方法:1. oracle用户要属于asmdba组,不然无法发现磁盘组2. $ORACLE_HOME/bin/oracle 文件的所有者和权限不对执行:$GRID_HOME/bin/setasmgidwrap O=$ORACLE_HOME/bin/oracle (注意要先把库down下来)如果在装的时候报错:chown grid:asmadmin 即可正确的oracle 文件权限为示例...
ASM创建失败由于PRKH-1010 PRKH-3002
"asmca-150711PM110616.log" 138 lines, 14165 characters [main] [ 2015-07-11 23:06:16.143 GMT+08:00 ] [UsmcaCmdLineParser.discoverRAC:245] Cluster Existence Check[main] [ 2015-07-11 23:06:16.199 GMT+08:00 ] [Version.isPre:583] version to be checked 11.2.0.4.0 major version to chec...
[INS-40901] The cluster node information table is unfilled 解决方案
11.2.0.4在安装集群配置的时候,出现 [INS-40901] The cluster node information table is unfilled,原因是由于第三方厂家集群LIB存在,解决方法:登录/opt/ORCLcluster/lib/ 移除libskgxn2.soINFO: Completed validating view at state Jul 12, 2015 10:35:38 PM oracle.install.commons.f...
AIX 11gR2 grid root.sh Error: with status:FAIL.Error code is 256
AIX:AIX: 11gR2 Grid Infrastructure Installation, root.sh Error: Failed to write the checkpoint:'' with status:FAIL.Error code is 256 (文档 ID 13...
sqlplus -prelim / as sysdba强制登录
强制登录sqlplus -prelim / as sysdba