TX锁处理方法和原理
摘自http://www.itpub.net/695644,1.html[@more@]问题陈述ALTER TABLE table_name MOVE INITRANS int 数据库版本8174。 Oracle Portal 用户在表 WWV_CORNERS 上发生死锁。 Oracle Support让我们增加表init_trans. 用命令 ALTER TABLE WWV_CORNERS MOVE INITRANS 100 这里有些记不清了,为什么要加个"MOVE",两个有什么区别呀?如果"MOVE"的话,对系统有什么影响,是不是也要重建相关的索引?这是个本地管理的表空间。我们有另一个程序定时收集数据库信息,下面发生死锁前一瞬间的lock纪录。 在这里,我主要想知道修改
TM锁的一个小例及发现的问题
通过tm锁和等待事件发现了一个大问题~[@more@]TM锁:用来确保修改表的内容时,表的结构不会受到改变,好比说你在update一个表时,就会得到一个TM锁,这会防止其它用户在该表上执行drop,alter等命令。在CTAS时发现有tm锁,这是正常的,在创建表的过程中不允许用户进行update,因此会有tm锁。一般产生锁的同时会有等待事件的产生,所以当发现产生死锁,其次就要查看时候有显著等待事件产生,再根据具体的事件进行解决。下面是一个小例,检查到tm锁,直觉是CTAS表没有进行,于是查询等待事件,发现了一个大问题,归档无法完成,到归档路径下一
关于修改objects的owner
由于需要把大量表从不同用户exp出来,才有此想法。试想好几百张表按表exp是什么概念~[@more@]http://www.itpub.net/696709.html和大家讨论了一下,发现除了create table table_name as select ...;之外没有什么好的方法。我开始也是想这样做,但是考虑到表很多而且记录数非常大,不想这样做。toms_zhang的这句话是不错的:很多发明创造,就是因为人太懒了。看来懒未必就是坏事~摘录下toms_zhang的一个例子:下code仅供娱乐,不要乱试,否则我不负责的SQL> startupORACLE 例程已经启动。Total System Global Area 125829120 bytesFixed
ORACLE标准版与企业版的差别(转)
包括9i和10g[@more@]**********Oracle 9i标准版&企业版************ 标准版企业版•Jserver Enterprise Edition •InterMedia •Enterprise Manager •Workflow Standard Edition •Standard Management Pack •Object Option •Networking kit •Object for OLE •Distributed Option •64 bit Option •ODBC Driver •Sql*Plus •OCI•Jserver Enterprise Edition •InterMedia •Object Option •Networking kit •Object for OLE •
oracle10g不需要配置文件的连接方式
一个oracle10g的新语法~[@more@]oracle10g中可以不需要配置tnsnames.ora或者sqlnet.ora就可以通过10g的客户端连接到数据库。前提:需要知道目标主机的host_name或host_ip,port,sid限制:只能用于TCP/TP网络使用1521标准端口的话可以不指定段口号语法:connect username/password@//host:port/oracle_sid举例:D:>sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on 星期一 12月 18 15:07:08 2006Copyright (c) 1982, 2005, Oracle. All rights reserved.SQL> connect system/oracle@//xxx.xxx.xxx.xxx/ppe已连接。SQL&g
使用datapump估算导出将占用的磁盘空间大小
使用estimate_only参数来估计导出作业将消耗多少空间,expdp将在在不执行导出的情况下计算作业估计值。[@more@]SQL> conn system/xxxxxConnected.SQL> desc dba_directoriesName Null? Type--------------------------------- -------- ------------------------------------------------OWNER NOT NULL VARCHAR2(30)DIRECTORY_NAME NOT NULL VARCHAR2(30)DIRECTORY_PATH VARCHAR2(4000)SQL> col directory_path for a60SQL> set linesize 130SQL> select * from dba_directories;OWNER DIRECTORY_NAME DIRECTORY_PATH----
Oracle 11g new Features
Oracle 11g new Features[@more@]http://www.dba-oracle.com/oracle11g/oracle_11g_new_features.htmAt Oracle Openworld 2006, Oracle announced some exciting new features of Oracle 11g, and they promise 482 new Oracle11g features. Here is my list which I continually update as new Oracle11g new feature information is released:11g SQL new features11g language & PL/SQL new features11g DBA features11g RAC new features & enhancements11g performance features1g security new features11g Enterprise Man
使用rman迁移tablespace
迁移表空间有多种方法,最常见的就是先copy 再mount 再rename 再open~,使用rman也可以,而且省去了copy操作~[@more@]http://www.itpub.net/697345.htmlD:/>sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on 星期一 1月 1 20:11:09 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.连接到:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith the Partitioning, Oracle Label Security, OLAP and Data Mining optionsSQL> create tablespace tt datafile 'd:/oracle/tt1.db
ORA 1652 "unable to extend temp segment by %s in tablespace %s"
Note:19047.1[@more@]Error: ORA-1652Text: unable to extend temp segment by %s in tablespace %s------- -----------------------------------------------------------------------Cause: Failed to allocate an extent for temp segment in tablespace.Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or morefiles to the tablespace indicated or create the object in anothertablespace.*** Important: The notes below are for experienced users - See Note 22080.1Explanation:This error is fairly self ex
利用VPD细粒度访问策略实现行级安全性 Step By Step(转)
利用VPD细粒度访问策略实现行级安全性 Step By Step[@more@]http://www.itpub.net/showthread.php?s=&threadid=693082Oracle8i以后的版本都提供了VPD(virtual private database 虚拟专用数据库)这样一个强大的功能来实现呼声日益增高的系统安全性要求。通过设置基于VPD的细粒度访问策略,我们可以只通过DBA的工作(不需要修改应用,也就是应用透明化)就可以实现用户只能访问自己有权限访问的数据,当然如果需要更加复杂的权限控制开发人员的参与还是必不可少的。下面用一个简单的例子来实现这样的功能,在EMP表中的用户登录数据库以