转个分区表Local索引Rebuild的总结
今天一个脚本里面的一条build index老是出现ORA-00054: resource busy and acquire with NOWAIT specified 错误,错误本身比较容易理解,肯定是有排他锁限制了对Partition Index的DDL操作。 那么如何避免,以及使用...
drop表空间以及对应的数据文件后空间不释放的问题
执行drop tablespace PSGLOG INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;后,在磁盘上可以看到对应的datafile已经不存在了,但是df -h发现空间仍未释放,但是如果直接rm 是可以释放的,为什么呢?出...
Oracle什么情况下需要rebuild index
主要还是看index的扁平程度,Rebuild the index when : - deleted entries represent 20% or more of the current entries - the index depth is more then 4 levels.Possible candidate for bitmap...
Oracle数据库维护常用的SQL代码示例(zt)
1、求当前会话的SID,SERIAL#SELECT Sid, Serial# FROM V$session WHERE Audsid = Sys_Context('USERENV', 'SESSIONID');2、查询session的OS进程IDSELECT p.Spid "OS Thread", b.NAME "Name-User", s.Program, s...
RAC环境Library Cache Lock的处理方法(zt)
我要监控某个Job,该session 处于 Library cache lock 等待中数据库有2个节点SQL> select inst_id from gv$instance; INST_ID---------- 2 &n...
表外键未加索引之处理
就像在Tom编程艺术中提到的,如果数据库中确实存在死锁,那么需要查看是否存在未加索引的外键,而且在99%的情况下都会发现表中确实存在这个问题。只需对外键加索引,死锁(以及大量其他的竞争问题)都会烟消云散...
How to disable data guard
如果启用了DGRMGL,那么需要先disable it.Asuming you can use DGMGRL start dgmgrl and connect to the primary database.For example: 1.Issue the following DGMGRL command to disable the broker's active...
11gR2和10gR2中crsctl/srvctl的区别
Oracle RAC版本,11gR2中crsctl命令有所增加:dukerac02 | CBABDB2 | /home/oracle > crsctlUsage: crsctl <command> <object> [<options>] command: enable|disable|config|start|st...
ORA-01152 故障解决
今天在测试库上做RMAN备份恢复实验时,open resetlogs阶段出现了错误:ORA-01152: file 1 was not restored from a sufficiently old backup ORA-01110: data file 1: '/opt/oracle/oradata/dbp/system0...
转载一个step by step change public-ip and vip on RAC
更改10g RAC公网IP以及VIP的简单步骤:1. Stop all crs resources标准操作步骤,参考另一帖子:http://space.itpub.net/628922/viewspace-690171 2. Modify /etc/hosts 这里修改以后为如下:[oracle@hsdb1...
oracle表空间管理维护
1. 新表空间的创建语法格式:CREATE TABLESPACE 表空间名 DATAFILE 文件标识符[,文件标识符]...[DEFAULT STORAGE(存储配置参数)] [ONLINE\OFFLINE];其中:文件标识符=’文件名’[SIZE整数[K\M][REUSE]2....
rman recover database
1 recover database using backup controlfile 2 recover database until cancel3 recover database using backup controlfile until cancel; 4 recover database until cancel using b...
Oracle 11gR1中的表空间加密
转载自51cto.comOracle 10gR2中引入了透明数据加密功能后,大大简化了加密数据文件中的数据,预防来自操作系统的访问,表空间加密扩展了这种技术,允许对表空间中的内容条目进行加密,而不是基于一列一列地配置加密...
Oracle参数修改后的生效判定
当使用spfile时,不用重启就能生效的初始化参数,可以通过v$parameter.ISSYS_MODIFIABLE字段来判断。v$parameter.ISSYS_MODIFIABLE参数Indicates whether the parameter can be changed with ALTER SYSTEM and when ...
FLASHBACK中使用到的两张表说明(zt)
This 2 tables are v$flashback_database_log and v$flashback_database_stat.select * from v$flashback_database_log;OLDEST_FLASHBACK_SCN OLDEST_FLASHBACK_TI RETENTION_TARGET FLASHBACK_SIZE&n...
Data Pump with Network import
Datapump is a server based bulk data movement infrastructure that supersedes the old import and export utilities. The old export/ import tools are still available, but do not support all Oracle ...
How does one add a column to the middle of a table(ZT)
For example, in MySQL the following syntax is valid:ALTER TABLE tablename ADD columnname AFTER columnname;Oracle does not support this syntax. However, it doesn't mean that it cannot be done.一. S...
How to monitor data transaction on one table
First, we need to see if there is an attribute "MONITORING" of the table. Just query 'all_tables':SQL> select owner,MONITORING from all_tables where TABLE_NAME=''EVENT_BILLING_PRODUCT_T";O...
Change the Archiving Mode in a RAC Environment
For Oracle 10g R2, you can run the ALTER DATABASE SQL statementto change the archiving mode in Oracle RAC as long as the database ismounted by the local instance ...
alert log on Oracle11g
About Oracle 11g, one of the first things that caught me by surprise with 11g, when I first started in the beta program, was that the default location for the alert log has moved. It is still ...