自動分析常用腳本
禁用自動分析exec dbms_scheduler.disable('SYS.GATHER_STAT_JOB');啟用自動分析exec dbms_scheduler.enable('SYS.GATHER_STAT_JOB');gather_schema_statsexec dbms_stats.gather_schema_stats(ownname => 'DFM...
日誌輪詢設置
以下我们对oracle数据库的两个基本log进行轮询.具体操作如下:我们需要在 /etc/logrotate.d目录下面配置一个文件,操作如下(root用户操作):# cd /etc/logrotate.d# touch oracle (创建一个文件然后编辑自己的log轮询...
net send message alert
开户防火墙port 137/138/1391. net script. configure#vi /usr/local/bin/net#!/bin/shcase "$1" insend)echo "$3"|smbclient -I "$2" -M `nmblookup -A "$2"|sed -e '1d' -e '3,/*/d'|cut -f2|cut -d' ' ...
awr 自动 mail 发送设置
1. 各节点 AWR 自动生成 script. 设置(awrrun/autoawr.sql)cat /data/run/awrrun#!/bin/shcd /data/awrrptORACLE_HOME=/u01/product/oracle;export ORACLE_HOMEORACLE_SID=delll10;export ORACLE_SID$ORA...
oracle 11g rac standby configure
一.主庫與從庫的oracle版本必須一致﹐主庫必須設置為歸檔模式(從庫安裝oracle并建庫)二.強制主庫為logging狀態Alter database force logging;三.在主庫與從庫中同時生成密碼文件以oracle用戶登陸$rm $ORACLE_HOME/d...
XMD RAC(Oracle 9i) 存儲修復處理(二)
R710 Standby : [root@emd2rac orcl]# lsict_data27.dbf log_data40.dbf perfstat01.dbf sn_data113.dbf sn_data116.dbf sn_data119.dbfict_data28.dbf log_data41.dbf ...
XMD RAC(Oracle 9i) 存儲修復處理
處理技朮﹕[root@DELL-RAC02 root]# powermt display dev=allPseudo name=emcpoweriCLARiiON ID=CK200040700048 [DMDI-NewRAC]Logical device ID=600601602AA31000AEC05C9A0E8DD911 [LUN 2]state=alive; policy=CLA...
ksvcreate: Process(m000) creation failed
ksvcreate: Process(m000) creation failedhttp://yangtingkun.itpub.net/post/468/512612一個節點報如下錯誤﹕Sat Jan 15 01:13:56 EAT 2011Process startup failed, error stack:Sat Jan 15 01:13:56 EAT 2011Err...
等待事件--enq:TX - row lock contention
等待事件--enq:TX - row lock contentionenq是一種保護共享資源的鎖定機制﹐一個排隊機制﹐先進先出(FIFO)發生TX鎖的原因一般有几個1.不同的session更新或刪除同一個記錄2.唯一索引有重復索引3.位圖索引多次更新...
awr_script_example
wmrac01<*+ASM1*/home/grid/dba/run>$cat awrrun #!/bin/shcd /u01/awrrpt ORACLE_HOME=/u01/product/oracle/11.2.0/db_1;export ORACLE_HOMEORACLE_SID=ccptdb1;export ORACLE_SID$ORACLE_HOME/bin/sqlplu...
flashback as of example
alter table xxx enable row movement;flashback table xxx to timestamp to_timestamp('2010-07-07 11:40:00','YYYY-MM-DD HH24:MI:SS');FLASHBACK TABLE EMP TO SCN 101942356712: SELECT * FROM tableName AS ...
在SP查找特定SQL
/* Formatted on 2011/3/29 上午 08:21:20 (QP5 v5.115.810.9015) */SELECT DISTINCT owner, ...
歸檔路徑切換(alternate)
platform.:linux as4.7 64bit+oracle 10.2.0.41. alter system set log_archive_dest_1='location=/data/asusl10/arch/ mandatory alternate=log_archive_dest_2 noreopen';SYS@asusl10>shutdown immediate;Databa...
编译存储过程的时候,執行很慢﹐處理對策
编译存储过程的时候,執行很慢﹐好像hang住一樣1.可能被锁住查看v$lockedselect b.sid,b.serial#,b.machine,b.terminal,b.program,b.process,b.status from v$lock a , v$session b where a.SID = b.SID 得到死锁...
Oracle 11g RAC add logfile
SQL> ALTER DATABASE ADD LOGFILE THREAD 1 group 11 ('+data/ccptdb/onlinelog/redo11a.log','+data/ccptdb/onlinelog/redo11b.log') SIZE 50M;SQL> ALTER DATABASE ADD LOGFILE THREAD 1 group 12 ('+data/ccptdb/...
Oracle 9i&10g&11g RAC 開關機管理(3)
三. Oracle 11G RAC 開關機管理3.1 RAC 資料庫關閉與開啟保养数据库及操作系统,服务器,需要关闭DB(所有实例),OS 及Server 。a. 首先停止Oracle11g 环境(root 用戶在兩個node執行)wmrac01<*+ASM1*/home/grid...
Oracle 9i&10g&11g RAC 開關機管理(2)
二. Oracle 10G RAC 開關機管理2.1 RAC 資料庫關閉與開啟保养数据库及操作系统,服务器,需要关闭DB(所有实例),OS 及Server 。a. 首先停止Oracle10g 环境$ lsnrctl stop (每个节点上停止监听,也可以用srvctl ...
Oracle 9i&10g&11g RAC 開關機管理(1)
一.Oracle 9i 開關機管理1.1 RAC 資料庫關機所有資料庫關閉之前先關閉數據庫監聽器及程序.登入Linux 系統之後 $ lsnrctl stop 就可以了.關閉RAC 資料庫 ( 這裡指兩個...
Oracle 11GR2 RAC resource 自啟動設置
一.啟動模式1. Manually start the diskgroup: srvctl start diskgroup -g <dg_name> [-n "<node_list>"]or2. Modify the attribute AUTO_START to "always" crsctl mod...
Autostart Oracle Services at Clusterware startup
I recently recommended the utilization of Oracle Services to a new client. I knew that you have to start a service manually if you restart your cluster. I told them that I will investigate on how to s...