enqueue
enqueue [@more@]enqueue The enqueue wait event is related to transaction locking.1. Discover the requested lock type and mode by deciphering the P1 value supplied by the CURRENT_EVENT cursor.select chr(bitand(<cursor P1>,-16777216)/16777215) || chr(bitand(<cursor P1>,16711680)/65535) lock_type, mod(<cursor P1>,16) lock_mode from dual;2. Determine the name of the object the enqueue is for using the ROW_WAIT_OBJ# supplied by the CURRENT_EVENT cursor:sele
direct path write
direct path write [@more@]The direct path write wait event is related to direct write operations.1. Ascertain the name of the object the session is writing to using the P1 and P2 values supplied by the CURRENT_EVENT cursor:select segment_name, partition_name from dba_extents where <cursor P2> between block_id and (block_id + blocks - 1) and file_id = <cursor P1>;2. You can get a rough idea of what the session is doing from the type of database file it writes to. If
direct path read
direct path read [@more@]The direct path read wait event is related to direct read operations that read data into the session’s PGA.1. Find out the name of the object the session is reading from using the P1 and P2 values supplied the CURRENT_EVENT cursor:select segment_name, partition_name from dba_extents where <cursor P2> between block_id and (block_id + blocks - 1) and file_id = <cursor P1>;2. You can get a rough idea of what the session is doing from the type
latch free
latch free[@more@]latch free The latch free wait event is related to concurrency and serialization.1. Get the name of the latch that is being competed for using the P2 value supplied by the CURRENT_EVENT cursor:select name from v$latchname where latch# = <cursor P2>;2. Obtain the SQL statement that is associated with the latch free event using the hash value supplied by the CURRENT_EVENT cursor:select hash_value, address, piece, sql_text from v$sqltext where hash_value = &
db file sequential read and db file scattered read
db file sequential read and db file scattered read [@more@]db file sequential read and db file scattered read The db file sequential read and db file scattered read are I/O related wait events.1. Determine the object name and partition name (if applicable) using the P1 and P2 values supplied by the CURRENT_EVENT cursor:select segment_name, partition_name from dba_extents where <cursor P2> between block_id and (block_id + blocks - 1) and file_id = <cursor P1>;Querying the
Options for Repairing Data Block Corruption
Options for Repairing Data Block Corruption[@more@]Oracle provides different methods for detecting and correcting data block corruption. One method of correction is to drop and re-create an object after the corruption is detected. However, this is not always possible or desirable. If data block corruption is limited to a subset of rows, another option is to rebuild the table by selecting all data except for the corrupt rows.Yet another way to manage data block corruption is to use the DBMS_REPAI
V$SESSION_EVENT
V$SESSION_EVENT[@more@]Copyright (c) 1982, 2005, Oracle. All rights reserved.SQL> conn / as sysdbaConnected.SQL> desc V$SESSION_EVENT Name Null? Type ----------------------------------------- -------- ---------------- SID NUMBER EVENT VARCHAR2(64) TOTAL_WAITS NUMBER TOTAL_TIMEOUTS NU
v$system_event
v$system_event[@more@]Copyright (c) 1982, 2005, Oracle. All rights reserved.SQL> conn / as sysdbaConnected.SQL> desc v$system_event Name Null? Type ----------------------------------------- -------- ------------- EVENT VARCHAR2(64) TOTAL_WAITS NUMBER TOTAL_TIMEOUTS NUMBER TIME_WAITED NUMBER AV
v$event_name
v$event_name[@more@]$ sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Wed Jan 31 10:52:16 2007Copyright (c) 1982, 2005, Oracle. All rights reserved.SQL> conn / as sysdbaConnected.SQL> desc v$event_name Name Null? Type ----------------------------------------- -------- -------------------- EVENT# NUMBER EVENT_ID NUMBER NAME
Vi 使用说明
Vi 使用说明[@more@]1、Vi 简介 Vi 是 Unix 世界里极为普遍的全萤幕文书编辑器,几乎可以说任何一台 Unix 机器都会提供这套软体。Linux 当然也有,它的 vi 其实是 elvis (版权问题),不过它们都 差不多。熟悉 DOS 下的文书处理後,也许会 感到 vi 并不好用;Unix 上也已经发展出 许多更新、更好用的文书编辑 器,但是并不一定每一台 Unix 机器上都会安装这些额外的软体。所以, 学习 vi 的基本操作还是有好处,让你在各个不同的机器上得心应手。 2、Vi 基本观念 Unix 提供一系列的 ex 编辑器,包括 ex, edit 和 vi 。相对於全萤幕编辑 器
sybase中文乱码解决办法
sybase中文乱码解决办法[@more@]ASE12.4 在XP下中文乱码解决办法: 查看注册表,在键:key_local_machinesoftwaremicrosoftwindows NTCurrentVersionCurrentVerison中,可知当前系统版本为5.1 进入Sybase源安装目录,查看run.bat文件,找到一行:set JAVA_HOME=.shared-1_0jre1.2.2, 然后进入: .shared-1_0jre1.2.2lib目录,将文件font.properties.zh.NT4.0的名称改为font.properties.zh.NT5.1即可。如果源目录在光 盘上,将jre1.2.2目录、run.bat文件拷到硬盘上,修改run.bat中的JAVA_HOME项,然后运行run.bat. 安装后,基于中文的管理工
TNS-12542 Error When Executing Batch Jobs or in High Transaction Environment
TNS-12542 Error When Executing Batch Jobs or in High Transaction Environment[@more@]The information in this document applies to: Oracle Net Services - Version: 8.1.7.4 to 10.1.0.0Microsoft Windows 2000Microsoft Windows XP (64-bit Itanium)Microsoft Windows (32-bit)ErrorsTNS-00512 "Address already in use"TNS-12542 TNS:address already in useTNS-12560 "TNS:protocol adapter error"SymptomsTNS-12542 errors in log files when executing batch jobs or in high transaction environments. C
SysAdmin Commands
SysAdmin Commands[@more@]Debugging truss executable /* Trace doing of given command ( useful debugging ) */ truss -f -p <pid of a shell> /* Using multiple windows, this can be used to trace setuid/setgid programs */ Arp, ethernet trouble shooting arp -a . /* Shows the ethernet address arp table */ arp -d myhost /* Delete a stale ethernet entry for host myhost */ Disk Commands du -k . /* Reports disk space used in Kilobytes */ du -sk . /* Reports only total disk space use
修改OEM中sysman的密码
修改OEM中sysman的密码[@more@]sysman不是oracle用户,因此不能用alter user 子句修改密码。修改方法是以oem所属用户登陆,然后运行该用户下的存储过程:smp_maintenance.RESET_SYSMAN 该过程将sysman的密码重置为oem_temp.例如,如果存放oem的用户是oem,密码也是oem在sqlplus 中执行:SQL> conn oem/oem;SQL>exec smp_maintenance.RESET_SYSMAN;
FTP命令详解
FTP命令详解[@more@]FTP的命令行格式为: ftp -v -d -i -n -g [主机名] , 其中 -v 显示远程服务器的所有响应信息; -n 限制ftp的自动登录,即不使用;.n etrc文件; -d 使用调试方式; -g 取消全局文件名。 FTP使用的内部命令如下(中括号表示可选项): 1.![cmd[args>:在本地机中执行交互shell,exit回到ftp环境,如:!ls*.zip 2.$ macro-ame[args]: 执行宏定义macro-name。 3.account[password]: 提供登录远程系统成功后访问系统资源所需的补充口令。 4.append local-file[remote-file]:将本地文件追加到远程系统主机,若未指定远程
在AIX5.3上安装Oracle10g
在AIX5.3上安装Oracle10g(10.1.0.2)[@more@]在AIX5.3上安装Oracle10g(10.1.0.2)本文结合Oracle10g的Quick Installation Guide,主要针对其中一些缺失的环节、含糊不明或者与实际情况不一致的地方进行特殊说明。如果只是按Quick Installation Guide之图索骥,那真的只能弄一个蛤蟆回来。一、 检查硬件1、 检查物理内存# /usr/sbin/lsattr –E –l sys0 –a realmem注意是-l是杠L,不是杠一。内存不能小于512M。2、 检查交换空间# /usr/sbin/lsps -a交换空间就是页面文件(在AIX的smit中叫Paging space),构造虚拟内存用的。应该是物理
DB2 8.2 for aix5L安装和配置步骤
DB2 8.2 for aix5L安装和配置步骤[@more@]AIX5.2上安装DB2 V8.2安装平台:IBM eserver,AIX 5.3 64位一 删除以有的DB2系统:1.停止DB21.1使用:"ps -ef|grep db2 "查看是否有db2进程1.2如果有,停止所有D 2的连接活动:db2 force application all1.3停止DB2:db2stop2.删除db2产品2.1 smit-1-3-32.2 设置preview=no2.3 使用'/'查找所有db2软件产品2.4 使用F7或esc +7选择所有db2软件产品2.5 回车3.删除db2的用户和组3.1smit -5-1-6:删除用户,db2inst1,db2fenc13.2smit -5-2-4:删除组,db2inst1,db2fenc14.在/home下删除实例用户目录
STANDBY DATABASE平常维护处理操作脚本和说明
STANDBY DATABASE平常维护处理操作脚本和说明[@more@]平时检查:1.从操作系统查看日志文件是否从主数据库传到备用数据库上2.查看数据库告警文件(入E:oracleadminorclbdumpalert_orcl)有无告警正常归档的日志有如下:Sun Jan 14 12:00:05 2007ARC2: Evaluating archive log 3 thread 1 sequence 10ARC2: Beginning to archive log 3 thread 1 sequence 10Creating archive destination LOG_ARCHIVE_DEST_2: 'orcl_aux'(日志文件传到TNSNAME为orcl_aux的服务器上)Creating archive destination LOG_ARCHIVE_DEST_1: 'D:ORACLEARCH1ARC
用RMAN创建Standby Database
用RMAN创建Standby Database[@more@]数据库软件必须为企业版,主数据库和备用数据库软件版本相同(最好打了相同补丁)一.主数据库用rman创建数据库备份在进行操作前先备用原来的备用的文件和归档日志文件,以免复制的内容太多。1.备份和删除以前rman备份的文件把原来用rman备用的文件地址备份一下,建议修改一下文件目录名字,然后再创建一个目录。同样对归档日志文件进行相同的操作。1.1 sqlplus登陆修改参数检查数据库是否为归档模式,如果为非归档模式请先修改为归档模式,请参考以前的文档SQL> archive log list数据库日志模式
Using an RMAN Backupfile Located on a Remote Network Drive (WinNT)
ORA-19505 :Using an RMAN Backupfile Located on a Remote Network Drive (WinNT)[@more@]Problem Description-------------------When using RMAN to restore a database, where the RMAN backupis located on a remote node, this fails with errors like:(In example below H: is a mapped network drive).RMAN-10035: exception raised in RPC: ORA-19505: failed to identify file"H:BACKUP_RMANBACKUP15_RMAN1_432213015"ORA-27041: unable to open fileOSD-04002: unable to open fileO/S-Error: (OS 5) Permission den