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...
准备搞定OCP
既然以前的blog有说过,就要实现。开始准备OCP三科考试,年前考完,年后就能拿证了。迫切需要passion and motivation,而且看来have a cat nap at noon很有必要。1Z0-042 已于11/28/2011顺利通过,9...
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 ...
Active Data Guard
Oracle 11gR2 - Active Data Guard.Active Data Guard allows a standby database to be opened for read-only access while redo is still being applied. However, this benefit is offset to a certain extent by...
oracle特性之AWR报告2
三、HOW——如何使用AWR?AWR由ORACLE自动产生,但是也可以通过DBMS_WORKLOAD_REPOSITORY包来手工创建、删除和修改。下面只介绍几个常用的:1. 手工创建一个快照SQL> select count(*) from ...
oracle特性之AWR报告1
我认为每一个要成为ORACLE性能分析的高手,都应该对ORACLE的AWR有一个比较深入的理解和使用。学会从AWR快照分析中获得对自己有用的信息,是性能分析专家不可少的一个方面,如果再能结合应用服务的日志结合分析...
How to rename an Oracle stored procedure
Is there a way to rename an oracle stored procedure, without having to drop and recreate the procedure?You can effectively rename a stored procedure bysimply creating another procedure - with the new...
使用oradebug转储systemstate/processstate
当数据库出现一些挂起状态时,如果sqlplus仍然可以连接,可能视图查询没有相应,但是可以通过oradebug工具来进行进程及系统状态信息的转储,从而可以进行Hang分析。 DUMP进程状态可以使用:alter sessions set...
2.普通表转分区表方法
将普通表转换成分区表有4种方法: 1. Export/import method 2. Insert with a subquery method ...
1.分区表基础知识
摘自博客:http://space.itpub.net/15779287Oracle提供了分区技术以支持VLDB(Very Large DataBase)。分区表通过对分区列的判断,把分区列不同的记录,放到不同的分区中。分区完全对应用透明。 ...
rman进行跨平台数据迁移
rman进行跨平台数据迁移
hanganalyze
hanganalyze解决row cache lock(ZT)
执行一个split分区的脚本时长时间没有响应。登录上去查看,手工执行了split脚本,发现确实会hang住:SQL> ALTER TABLE A_PDA_SP_STAT SPLIT PARTITION P_MAX AT (20090609) INTO (PARTITION P_20090608 TABLESPACE ...
shut down and start crs for Oracle10G
Shut down crs on RAC, including two nodes(dukerac01/02).--> log on to the node1 and issue the following commands srvctl stop database -d ORDB srvctl stop asm -n dukerac01 srvctl s...
Fix RMAN-06207
The script. of RMAN backup is as follows:run{BACKUP FORMAT '/home/oracle/backup_rman/dbf_%U' DATABASE TAG Full_bk;BACKUP CURRENT ControlFile FORMAT '/home/oracle/backup_rman/ctl_%U';BACKUP FORMAT '/h...
移除多个schema中job
Sometimes you need to execute SQL (or PL/SQL) as some other user. Say you need to remove a job residing in some other user’s schema. Or you need to create a database link in a different schema. You ...
计算给定两个日期之间的工作日个数
如何不使用function,而计算给定两个日期之间的工作日个数:SQL>select s, e, e - s + 1 Total_Days, Trunc((e - s + 1) / 7) * 5 + Nvl(Length(replace(Substr('11111001111100', mod(e - s + 1, 7)), '0', '')), 0)...
动态视图V$SESSION_LONGOPS学习
For v$session_longops, it exists in the lock part of oracle directory.本视图显示运行超过6秒的操作的状态。包括备份,恢复,统计信息收集,查询等等.主要列说明:l &nbs...