一次监听不能启动

登录测试环境发现一个节点监听异常

root@xxxxdbb:/ #crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.xxxx_DATA.dg
               ONLINE  ONLINE       xxxxdba
               ONLINE  ONLINE       xxxxdbb
ora.L[......]

Read more

处理一次ora600[4194]

情景
数据库在启动时抛出如下错误

ORA-00604: error occurred at recursive SQL level 1
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4194], [7], [7], [], [], [], [], []

从数据库启动报错可以看出在递归调用SQL出现错误,最终错误为ORA-600[4194]。
这里尝试屏蔽所有的undo segment 进行启动,得到结果还是报错.通过手工创建pfile增加参数,开启trace查看问题出现点
数据库启动mount状态下,recover database;

oradebug setmypid
oradebug unlimit
--dump回滚段回滚前后信息
ALTER SESSION SET events '10015 trace name context forever, level 10';
--错误error[......]

Read more

flashback_on_standby

配置flashbash database参数

 ALTER system SET db_recovery_file_dest='/dg/fra';
 ALTER system SET db_recovery_file_dest_size=10g;
 ALTER system SET db_flashback_retention_target=1440;

alter database flashback on;

primary库建表测试表并同步到standby

SQL> conn enmotech/enmotech123
Connected.
 
USERNAME             INST_NAME            HOST_NAME                 SID   SERIAL#  VERSION    STARTED  SPID            OPID  CPID            SADDR            PADDR
-------------------- -------------------- -------------[......]

Read more

aix_11.2.0.4_quick_delete_rac_scripts

aix下快速删除11.2.0.4 Rac脚本

rm /etc/rc.d/rc2.d/K19ohasd
rm /etc/rc.d/rc2.d/S96ohasd
rm -f /etc/init.tfa
rm -f /etc/inittab.tfa
rm -f /etc/init.ohasd
cp /etc/inittab.no_tfa /etc/inittab
rm -rf /etc/inittab.crs
rm -rf /etc/inittab.no_crs
rm -rf /etc/inittab.no_tfa
rm -rf /etc/inittab.nocrs10205
rm -rf /etc/inittab.orig
rm -rf /etc/inittab.pre10205
rm -rf /etc/inittab.tfa
 
rm -rf /etc/oratab
rm -rf /etc/oraIn*
rm -rf /etc/oracle*
rm -rf /etc/ora*
rm -rf /tmp/.oracle
rm -rf /tmp/ora*
rm -rf /var/tmp/.or[......]

Read more

udev重新加载配置

在red hat 6.2以后使用udev时,当新加磁盘map或者权限时,使用start_udev时会导致vip进行漂移,这是因为udev管理了网卡特性.
看下例子
这里我增加了一个磁盘的map操作

使用start_udev

[root@rac02 ~]# start_udev
[root@rac02 ~]# ls -l /dev/asm*
brw-rw---- 1 grid asmadmin    252,  32 Apr 20 10:37 /dev/asm-acfs-disks  --这个为新增加
-rw-r--r-- 1 root root     24416772096 Apr 20 10:34 /dev/asm-acfs-disks-direct=1
brw-rw---- 1 grid asmadmin    252, 272 May 20 10:11 /dev/asm-fd-diskd
brw-rw---- 1 grid asmadmin    252, 256 May 20 10:11 /dev/asm-fd-diske
brw-rw---- 1 grid asmadmi[......]

Read more

Oracle12c_DataGuard_part_4_switchover

12c dataguard提供了新的语法来实现dg的switchover.下面进行测试下。

主库执行检查

SQL> ALTER DATABASE SWITCHOVER TO orcldg VERIFY;  --主库进行切换检查
ALTER DATABASE SWITCHOVER TO orcldg VERIFY
*
ERROR at line 1:
ORA-16475: succeeded WITH warnings, CHECK alert log FOR more details  --查看alert日志
 
 
SQL>

alert

ALTER DATABASE SWITCHOVER TO orcldg VERIFY   --命令输入
Sun May 10 18:31:29 2015
This is cascading configuration.
LOG_ARCHIVE_DEST_3 has already been configured to switchover target ORCLDG. Clearing LOG_ARCHIVE_DEST_3.--清空参数dest-3[......]

Read more

Oracle12c_DataGuard_part_3

上文中Oracle12c_DataGuard_part_2_far_sync
提到了Far Sync Instance的配置,配置在参数中配置了max_failure=1 alternate=log_archive_dest_3 参数。当dest_2出现问题时会切到打dest_3进行传输日志。下面测试下Far Sync Instance出现问题时,dest_3是否能正常运行

关于此参数参考http://docs.oracle.com/database/121/SBYDB/log_arch_dest_param.htm#SBYDB01102

关闭Far Sync Instance

orcl_fs > shutdown abort
ORACLE instance shut down.
orcl_fs > 
 
alert
Sun May 10 16:18:40 2015
Shutting down instance (abort)
License high water mark = 8
Sun May 10 16:18:40 2015
USER (ospid: 2450): termina[......]

Read more

Oracle12c_DataGuard_part_2_far_sync

在上面的基础上配置Far Sync .这里不实现Far sync的高可用.dg的数据配置恢复参考
Oracle12c_DataGuard_part_1

一、系统环境:

	数据库	操作系统	Ip		Service_name	db_unique_name	备注
	orcl	RHEL6.5	192.168.56.92	orcl		orcl		Primary DB
	orcl	RHEL6.5	192.168.56.94	orcl,orcldg	orcldg		Physical Standby DB
	orcl	RHEL6.5	192.168.56.93	orcl		orclfs		Far Sync Instance

二、配置primary/standby :
2.1 配置强制归档

	SQL> shutdown immediate
	SQL> startup mount
	SQL> alter database archivelog;
	SQL> alter database open;
	SQL> alter database force logging;
	SQL> archive log list;[......]

Read more

Oracle12c_DataGuard_part_1

一、系统环境:

	数据库	操作系统	Ip		Service_name	db_unique_name  备注
	orcl	RHEL6.5	192.168.56.92	orcl		orcl        	Primary DB
	orcl	RHEL6.5	192.168.56.94	orcl,orcldg	orcldg  	Physical Standby DB
 
	[root@ora12102 ~]# cat /etc/hosts
	127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
	::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
	192.168.56.92 ora12102
	192.168.56.93 ora12102fs
	192.168.56.94 ora12102dg

二、配置primary/standby :
2.1 配置强制归档

	SQL[......]

Read more

aix_install_11.2.0.4.6_不能选择节点小记

上周在安装11.2.0.4 for aix rac时,安装grid正常,但是在应用玩grid psu 11.2.0.4.6之后安装rdbms时不能进行选择节点安装db.
在oui启动是增加debug

./runInstaller -J-DTRACING.ENABLED=true -J-DTRACING.LEVEL=2

查看日志发现oracle用户在执行grid下的程序报错.手工执行结果如下

rac02[/u01/app/11.2.0/grid/lib]$/u01/app/11.2.0/grid/bin/olsnodes
exec(): 0509-036 Cannot load program /u01/app/11.2.0/grid/bin/olsnodes.bin because of the following errors:
        0509-150   Dependent module /u01/app/11.2.0/grid/lib/libttsh11.so could not be loaded.
        0509-022 Cannot load[......]

Read more