/var/spool/postfix/maildrop filling up inodes.
inodes
Reset user password in 11g
Reset user's password in 11g[@more@]SQL> create user lyon identified by test; User created. SQL> select USERNAME,PASSWORD,ACCOUNT_STATUS ,PROFILE from dba_users where USERNAME='LYON'; USERNAME PASSWORD ------------------------------ ------------------------------ ACCOUNT_STATUS PROFILE -------------------------------- ------------------------------ LYON OPEN DEFAULT SQL> select password,spare4 from user$ where name='AMIT'; no rows selected SQL> select password,spare4 from user$ w
A summery about VVR replication mode.
By my understanding the main difference between Sync and Async for VVR is how VVR writes VVR log and ship it to DR side. [@more@]Async mode, 1> Oracle messages OS to request IO operations to write oracle redo buffer into a certain group of log files when a client process commits a transaction.2> Oracle writes redo buffer into a certain group of log files. 3> Oracle completes the transaction and won’t wait for VVR. 4> VVR get the message from OS immediately and writes
笔记: Oracle 10g中一些操作持有锁的小节
Lock mode in which the process requests the lock:¦ 0 - none¦ 1 - null (NULL)¦ 2 - row-S (SS)¦ 3 - row-X (SX)¦ 4 - Table share (S)¦ 5 - Table Share and Row-X (SSX)¦ 6 - Table exclusive (X)Conclusion in 10gR2.1> create index az_obj_id. (4-TM)2>alter index az_obj_id rebuild online; (2-TM and 4-TM)3> alter index az_obj_id rebuild; (4-TM and 3-TM)4>alter table az move tablespace test; (6-TM)5>alter table az shrink space; (3-TM and 6-TM
一篇关于Stream很好的文章(ZT)
http://space.itpub.net/756652/viewspace-442206[@more@]FIY.
Test Negtive Role Set in a stream environmnet- 10g_new_feature
Below is the process of the testing. Primary Side. O01DMS0Target Side. O01LEE3[@more@]PURPOSE-------This Notes explains how to exclude (filter out) specific tables from the capture process and replication, when using schema level Streams replication.SCOPE & APPLICATION-------------------To be used by DBA's as a reference when configuring and implementing the Oracle Streams capture process for schema replication.PROBLEM-------You have configured the Streams capture process at the schema level
Quickly setup a stream environment.
This article is intended to quickly setup a stream environment for playing in which the schema HR in primary side will be in sync with the one in target side.[@more@]Primary Side. O01DMS0Target Side. O01LEE3########################################################################################1.1> Logon to SYS to create an account for stream at primary side.SQL> show userUSER is "SYS"SQL>SQL> create user strmadmin identified by strmadmin 2 default tablespace tbs_stream t
Some examples of using these views follow.
For these examples, assume the following statements have been issued:[@more@]CREATE ROLE security_admin IDENTIFIED BY honcho; GRANT CREATE PROFILE, ALTER PROFILE, DROP PROFILE, CREATE ROLE, DROP ANY ROLE, GRANT ANY ROLE, AUDIT ANY, AUDIT SYSTEM, CREATE USER, BECOME USER, ALTER USER, DROP USER TO security_admin WITH ADMIN OPTION; GRANT SELECT, DELETE ON SYS.AUD$ TO security_admin; GRANT security_admin, CREATE SESSION TO swilliams; GRANT security_admin TO system_administrator; GRANT CREATE SESSION
Partition Pruning
What is Partition Pruning?Some tables are so large that a Full Table Scan is unthinkable. If these tables are not partitioned, they should be.[@more@]The most common (by far) form of partitioning is Range Partitioning on a DATE column. For example, a table may be partitioned on TXN_DATE, with a separate partition for each year, month, or even day (I have seen a multi-terabyte database where daily partitions were the norm!).If Oracle can use the WHERE predicates to eliminate some partitions from
Use the following approach to create tables with constraints and indexes:
Use the following approach to create tables with constraints and indexes:[@more@]1. should be created enabled and validated. All other constraints (Create the tables with the constraints. NOT NULL constraints can be unnamed andCHECK, UNIQUE,PRIMARY KEY, and FOREIGN KEY) should be named and created disabled.See Also: information about the Oracle Database SQL Language Reference for moreCREATE INDEX and ALTER INDEXstatements, as well as restrictions on rebuilding indexesSee Also: Database Administr
Quoted- How Bulk Binds in PL/SQL Boost Performance
http://www.dbspecialists.com/files/presentations/bulk_binds.html[@more@]
Case two -- Recover a datafile in primary site from the backup taken in standby site without using c
The same configuration as the case one.[@more@]1 1> Take a full backup at Standby site[oracle@RAC02 lyon_Dont_touch]$ rman target / catalog rman/cat@catadbRecovery Manager: Release 10.2.0.1.0 - Production on Fri Jun 20 11:07:37 2008Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: O01DMS0A (DBID=231561342, not open)connected to recovery catalog databaseRMAN> backup database;Starting backup at 20-JUN-08using channel ORA_DISK_1channel ORA_DISK_1: starting fu
Case One -- Recover a datafile in primary site from the backup taken in standby site using catalog d
Advanced Backup & Recovery For Oracle Dataguard based on The Reference Using Recovery Manager with Oracle Data Guard in Oracle Database 10gIn a standby environment, backing up data files and archived redo log files taken on the primary or standby system are usable on either system for recovery. Although some files such as the control file and SPFILE must be backed up on the primary database, the process of backing up data files and archived redo log files can be off-loaded to the standby sys
新应用上线又见老问题
忙过了上一周上线的日子 终于可以喘口气了 总结一下目前发现的应用问题.1 还是发现了低效pl/sql2 还要加强对系统设计人员对于函数索引的培训...Load Profile~~~~~~~~~~~~ Per Second Per Transaction--------------- ---------------Redo size: 770,883.85 18,746.07Logical reads: 19,073.28 463.82Block changes: 3,656.68 88.92Physical reads: 698.60 16.99Physical writes: 278.54 6.77User calls: 1,313.17 31.93Parses: 703.90 17.12Hard parses: 18.46 0.45Sorts: 48.68 1.18Logons: 0.29 0.01Executes: 1,469.75 35.74Transactio
查看每次增量备份每个数据文件data blocks修改率(自从上次备份分后)
如果我们的备份策略是: 周日0级 周一,二 1 differential 周三 1 cumulative周四,五 1 differential 周六 1 cumulative我们可以通过查询数据字典试图v$backup_datafile了解到每天数据块修改的情况.[@more@]v$backup_datafile : V$BACKUP_DATAFILE displays information about control files and datafiles in backup sets from the control file.字段解释FILE# : Datafile number; set to 0 for control file DATAFILE_BLOCKS : Size of the datafile in blocks at backup time. This value is also the number of bl
Enqueue events part two
可以被lock manager并行锁的enqueue resources的最大数量由ENQUEUE_RESOURCES初始化参数控制.该参数默认值通常来讲已经足够,如果在应用程序中使用并行DML操作,可以考虑增加ENQUEUE_RESOURCES的值.[@more@]关于ENQUEUE_RESOURCES [10..65535] At database startup time, Oracle allocates the number of enqueues specified by the ENQUEUE_RESOURCES parameter. The default value of ENQUEUE_RESOURCES is derived from the SESSIONS parameter and is usually adequate, as long as its value is greater than DML_LOCKS + 20. For thre
Enqueue events part one
当处理enqueue等待时,熟记这些要点:1 Enqueues 是应用到数据库对象的locks.与latch(应用于SGA内存)不同.2 Enqueues 是由应用程序发起,具有事务性.(具体参见下文)3 Oracle session 正在等候获取一个特定的enqueue. enqueue的名字和mode被记录在P1参数里.针对不同类型的enqueue竞争应采用不同的方式解决.4 一直到Oracle 9i,enqueue wait event 代表所有enqueue waits;从Oracle 10g开始enqueue waits被分类定义(下文详细介绍).[@more@]What Is an Enqueue?一个enqueue是什么由具体环境决定. 如果它被看成是动词,则表示将一个lock请求置于一个
session_cached_cursors
Is a long time since I wrote sth on Oracle last time,for I 've addressed myself to learning English from April this year.Now I come back and feel cool that English is not an obstacle for me to learn Oracle deeply ... ...Let's get to the point .[@more@]Oracle 10g后 默认将session_cached_cursors设置为20(之前为0) 表明了什么?Oracle建议在session中cache cursors.当然前提是应用中是sharable SQL(充分绑定变量)Why?大量重复执行相同sql可以:1 节省解析时间 2 降低cpu资源 If SESSION_CACHED_CURSORS is not set, it
How to convert TIMESTAMP value to a DATE value
PL/SQL - Version: 9.0.1.4 to 10.2.0.0Information in this document applies to any platform.[@more@]Currently there are no built in functions to convert TIMESTAMP to DATE, but the following PL/SQL function can be used to achieve the same:Create or replace function convert_ts_to_date(tstamp timestamp) return date is V_DATE date; V_DAY VARCHAR2(2); V_MONTH VARCHAR2(2); V_YEAR VARCHAR2(4);BEGIN V_DAY:=EXTRACT(DAY FROM tstamp); V_MONTH:=EXTRACT(MONTH FROM tstamp); V_YEAR:=EXTRACT(YEAR FR
Oracle事件列表
Oracle常见事件如下:10000 control file debug event, name 'control_file'10001 control file crash event110002 control file crash event210003 control file crash event310004 control file crash event410005 trace latch operations for debugging[@more@] 10006 testing - block recovery forced10007 log switch debug crash after new log select, thread %s10008 log switch debug crash after new log header write, thread %s10009 log switch debug crash after old log header write, thread %s10010 Begin Transaction10