flashback table也会用到temp表空间?
无意中执行的一个简单的flashback table操作提示:SQL> flashback table t to scn 340592;flashback table t to scn 340592 *第 1 行出现错误:ORA-00604: 递归 SQL 级别 1 出现错误ORA-25153: 临时表空间为空那么到底是flashback table操作需要用到temp tbs呢还是在执行flashback table操作的其他系统操作用到temp tbs?有点疑问[@more@]SQL> desc t 名称 是否为空? 类型 ----------------------------------------- -------- ---------------------------- ID
oracle的两种global temporary table!
1. on commit delete rows2.on commit preserve rows[@more@]SQL> create global temporary table gt1 (id int) ;表已创建。SQL> insert into gt1 values(1);已创建 1 行。SQL> insert into gt1 values(2);已创建 1 行。SQL> select * from gt1;ID----------12SQL> commit;提交完成。SQL> select * from gt1;未选定行SQL> create global temporary table gt2 (id int) on commit delete rows ;表已创建。SQL> create global temporary table gt3 (id int) on commit preserve rows ;表已创建。SQL> insert int
当存在read only或者offline表空间时,重建控制文件时要注意!
当存在read only或者offline表空间时,重建控制文件分两种情况:1、重建controlfile的script中包含read only或者offline所对应的datafile;这种情况比较简单,datafile不需要rename,如果是offline的表空间,那么重建controlfile之后只需要online tbs即可;如果是read only tbs那么重建controlfile之后需要对其对应的daafile进行恢复。2、重建controlfile的script中不包含read only或者offline所对应的datafile;重建controlfile之后需要rename datafile到正确的位置,之后如果是offline的表空间,那么重建controlfile之后只需要online tb
一个有意思的权限问题!
题意是这样的:有3个用户test,test1,test2test下有一表ttest1下有一个view:create view v1as select * from test.t现在test1要把v1的select权限授予test2,需要具备什么条件?[@more@]1、第一种想法test用户在授予t的select 权限给test1时需要带上grant option选项以保证test1在授予v1的select权限时能保证它可以把test.t的select权限授予test2SQL> create user test identified by test;用户已创建。SQL> create user test1 identified by test1;用户已创建。SQL> grant connect, resource to test,test1;授权成功。SQL> c
connect-time failover的配置!
我的理解connect-time failover通常用在rac中,不过单实例环境下依然可以enable connect-time failover特性,实际意义有多大暂且不说![@more@]配置两个监听:listener,和1(之所以叫1,是因为在win下服务中监听对应的服务会自动加上listener,所以最终是为了看起来舒服,我们看到的会是listener1,否则看到的就是...listenerlistener1),这两个监听同时都监听数据库test,port分别是1521和1522,然后配置tns如下:TEST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = xys)(PORT = 1521)) (ADDRESS
dbms_scheduler中参数repeat_interval的一些例子!
来至于管理向导上的一些例子![@more@]Using the Scheduler Calendaring SyntaxThe primary method of setting how often a job will repeat is by setting the repeat_interval attribute with a Scheduler calendaring expression. See Oracle Database PL/SQL Packages and Types Reference for a detailed description of the calendaring syntax for repeat_interval as well as the CREATE_SCHEDULE procedure.Examples of Calendaring ExpressionsThe following examples illustrate simple repeat intervals. For simplicity, it
oracle标准版和企业版的区别!
经常有人我,正好找到一个比较全面而又简洁的doc介绍,随手记录一下![@more@]http://www.oracle.com/lang/cn/database/product_editions.html
OMF和flash_recovery_area的关系!
在OMF出现之前(9i R1),oracle db的文件,主要指dbf,redo,ctl是通过os管理的,为了简化对数据库文件的管理,oracle引入了OMF,通过omf创建的dbf和redo,其default的大小都是100m,autoextend umlimited。9i R1的dbf文件格式default:ora_%t_%u.dbf,redo格式:ora_%g_%u.log;9iR2的格式发生了一些变化,把ora变成了o1_mf_%t(%g)_%u.dbf(log),其中%t表示dbf所属的tbs,%g表示redo所属的group#,%u表示唯一。[@more@]1、仅设置参数db_create_file_dest创建redoSQL> show parameter db_createNAME TYPE VALUE------------------------------
有关role的一点总结!
没有role完全可以控制权限的使用,只是不够灵活和方便而已,那么角色的作用到底是什么呢?简单的归结为2条:1)实现批量授权2)动态控制权限[@more@]1、角色的作用a)实现批量授权b)动态控制权限2、使role生效或者失效SQL> create role rl1;角色已创建。--可以为role设置password,防止他人随意设置roleSQL> create role rl2 identified by rl2 ;角色已创建。SQL> select * from dba_role_privs where grantee='XYS';GRANTEE GRANTED_ROLE ADM DEF------------------------------ ------------------------------ --- ---XYS DB
系统权限UNLIMITED TABLESPACE为什么如此特殊?
1、系统权限UNLIMITED TABLESPACE 不能被授予role,可以被授予用户!2、UNLIMITED TABLESPACE 没有被包括在resource role中,但是UNLIMITED TABLESPACE 随着resource的授出而被授予用户的。3、UNLIMITED TABLESPACE 不能伴随着resource被授予role而授予用户。[@more@]1、测试1系统权限UNLIMITED TABLESPACE 不能被授予role,可以被授予用户!SQL> create role rl1 ;角色已创建。SQL> create user test identified by test;用户已创建。SQL> grant connect , create table , unlimited tablespace to rl1;grant connect , create
使用hostname方式连接数据库!
hostname方式是通过client端hostname连接数据库,无需配置tns![@more@]1. HOSTNAME修改listener.ora中的如下信息(SID_DESC =(GLOBAL_DBNAME = your_hostname) --你的机器名(ORACLE_HOME = E:oracleora92) --oracle home(SID_NAME = orcl) --sid name)然后在客户端的sqlnet.ora中,确保有NAMES.DIRECTORY_PATH= (HOSTNAME)无需在client端配置tns测试一下:C:>sqlplus xys/manager@xysSQL*Plus: Release 10.2.0.1.0 - Production on 星期四 6月 26 09:56:03 2008Copyright (c) 1982, 2005, Oracle. All rights reserved.连接到:Oracle D
SYS_CONTEXT小记!
SYS_CONTEXT函数非常有用,和系统触发器结合起来可以很好的实现审计功能![@more@]selectSYS_CONTEXT('USERENV','TERMINAL') terminal,SYS_CONTEXT('USERENV','LANGUAGE') language,SYS_CONTEXT('USERENV','SESSIONID') sessionid,SYS_CONTEXT('USERENV','INSTANCE') instance,SYS_CONTEXT('USERENV','ENTRYID') entryid,SYS_CONTEXT('USERENV','ISDBA') isdba,SYS_CONTEXT('USERENV','NLS_TERRITORY') nls_territory,SYS_CONTEXT('USERENV','NLS_CURRENCY') nls_currency,SYS_CONTEXT('USERENV','NLS_CALENDAR') nls_calendar,SYS_CONTEX
对read only表空间进行热备份和使用备份的controlfile进行恢复时的一点总结!
1. 对read only tbs进行热备份时不需要执行begin backup;2.从9i开始通过备份的controlfile对只读表空间进行恢复时不再需要把read only tbs对应的数据文件设置为offline[@more@]http://www.hackhome.com/InfoView/Article_164468.html也可以参考这个,写的更周全详细一些!1.SQL> alter tablespace users read only;表空间已更改。SQL> alter tablespace users begin backup;alter tablespace users begin backup*第 1 行出现错误:ORA-01642: 只读表空间 'USERS' 无需开始备份SQL> alter database backup controlfile to trace;数
那些操作会发生局部检查点(Partial checkpoint)!
Partial checkpoint– Dirty buffers belonging to the tablespace– ALTER TABLESPACE BEGIN BACKUP– ALTER TABLESPACE tablespace OFFLINE NORMAL上面2种操作会发生局部检查点!使相应的dirty buffer被写入和tablespace对应的datafile中[@more@]SQL> select name , checkpoint_change# from v$datafile;NAME CHECKPOINT_CHANGE#-------------------------------------------------- ------------------E:ORACLEPRODUCT10.2.0ORADATATESTSYSTEM01.DBF 806682E:ORACLEPRODUCT10.2.0ORADATATESTUNDOTBS01.DB 806682FE:ORACLEPRODUCT10.
How to Dump Redo Log File Information!
http://yumianfeilong.com/2007/04/02/how-to-dump-redo-log-file-information/一篇不错的文章转[@more@]http://yumianfeilong.com/2007/04/02/how-to-dump-redo-log-file-information/
what is Goals for Tuning?
The objective of tuning a system is either to reduce the response time for end users of the system, or to reduce the resources used to process the same work.[@more@]The objective of tuning a system is either to reduce the response time for end users of the system, or to reduce the resources used to process the same work. You can accomplish both of these objectives in several ways:Reduce the Workload Balance the Workload Parallelize the Workload Reduce the WorkloadThis is what commonly constitute
query rewrite和基于函数的索引有关系?
The NOREWRITE hint disables the use of function-based indexes.看到这句话之后不太理解为什么提示NOREWRITE 的使用会丧失基于函数index的使用能力![@more@]出处:http://download.oracle.com/docs/cd/B10501_01/server.920/a96533/hintsref.htmThe NOREWRITE hint disables the use of function-based indexes.看到这句话之后不太理解为什么提示NOREWRITE 的使用会丧失基于函数index的使用能力!
大连oracle培训!
本人在大连,面向全国各地长期提供专业的oracle培训!有oracle培训需求的客户可以联系我!培训的形式大致分两种:1、类似官方培训,以官方的培训讲义为基础结合讲师多年来的实践经验和培训经验为有oracle培训需求的企业或者个人提供最优质的服务;2、企业定制培训,完全根据客户自身的需求为企业或者个人量身定制培训。培训的内容:1、和开发相关的内容,主要介绍sql、plsql的使用;2、oracle数据库的基本概念,基本管理,体系架构;3、详细介绍oracle数据库的备份恢复原理、手段以及备份恢复策略的制定等;4、详细介绍数据库的性能优化,
按照oracle性能改进方法论的步骤来优化系统!
doc上的原话,记录一下,感觉写的很精彩![@more@]Steps in The Oracle Performance Improvement MethodGet candid feedback from users. Determine the performance project's scope and subsequent performance goals, as well as performance goals for the future. This process is key in future capacity planning. Get a full set of operating system, database, and application statistics from the system when the performance is both good and bad. If these are not available, then get whatever is available. Missing s
oracle性能改进方法论告诉我们!
定位系统性能瓶颈的时候要多利用数据以及统计信息等资源而不要过多的依赖自己以前积累的经验想当然。因为今天的系统已经变的非常复杂,性能分析的一些浮浅的规则不容易产生。oracle性能改进方法论定义的是一种工作的方法而不是一组权威性的规则。在定位性能瓶颈的时候,最好的规则就是没有规则(With bottleneck detection, the only rule is that there are no rules!The best performance engineers use the data provided and think laterally to determine performance problems.)[@more@]The Oracle performance improvement method