RAC+ASM添加控制文件
1、任意节点上启动到nomount状态SQL> startup nomount2、查看当前的控制文件SQL> show parameter controlNAME ...
使用mysqldump备份异机恢复数据库
使用mysqldump备份异机恢复数据库1、创建测试数据库mysql> create database allen;Query OK, 1 row affected (0.01 sec)mysql> use allen;Database changedmysql> create table tab1 (ID tinyint unsigned not null primary key auto_increment,Name char(20) not null unique key,Age tinyint unsigned,Gender cha...
【转】DBMS_STATS.GATHER_TABLE_STATS详解
由于Oracle的优化器是CBO,所以对象的统计数据对执行计划的生成至关重要!作用:DBMS_STATS.GATHER_TABLE_STATS统计表,列,索引的统计信息(默认参数下是对表进行直方图信息收集,包含该表的自身-表的行数、数据块数、行长等信息;列的分析--列值的重复数、列上的空值、数据在列上的分布情况;索引的分析-索引页块的...
为其它会话打开trace
select sid,serial# from v$session where audsid=userenv('sessionid'); --sqlplus下查看当前会话sidSQL> select s.sid,s.serial#,p.spid from v$session s,v$process p where s.paddr=p.addr and s.sid=42; --已知某个会话的sid SID SERIAL# SPI...
oracle11g RAC+单实例DataGuard+OGG目标库搭建记录
第一部分 搭建oracle11g RAC一、安装操作系统系统一:RHEL5.8(两张网卡,分别配置public IP和private IP;两个磁盘,一个用于安装系统本身以及grid和oracle软件,另一个作为共享磁盘,做ASM磁盘组,存放数据)系统二:RHEL5.8(两张网卡,分别配置public IP和private IP;一个磁盘用于安装系统本身以及grid和ora...
oracle分析函数ratio_to_report
函数功能:主要完成对百分比的计算,函数语法:ratio_to_report(exp) over() 根据over窗口函数的作用区间,求出作用区间中的单个值在整个区间的总值的比重案例:比如要求scott用户下emp表中每个员工的工资占本部门的比重select ename,sal,deptno,ratio_to_report(sal) over(partition by deptno) ra...
UNDO表空间丢失报错:ORA-01157
SQL> startupORACLE instance started.Total System Global Area 2505338880 bytesFixed Size 2215944 bytesVariable Size 1392513016 bytesDatabase Buffers 1107296256 bytesRedo Buffers&nbs...
impdp导入数据时报错ORA-12899
[oracle@rhel5 ~]$ impdp parfile=/home/oracle/expbk/impdp.txt Import: Release 11.2.0.1.0 - Production on Fri May 27 22:02:50 2016Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production...
ORA-01012: not logged on
[oracle@rhel5 ~]$ echo $ORACLE_SIDdb02[oracle@rhel5 ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Thu May 26 10:56:20 2016Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected.SQL> startup nomountORA-01012: not logged on杀掉db02实例进程[oracle@rhel5 ...
DBCA创建ASM数据库时遇到ORA-01031
问题:是dbca创建ASM数据库时,图形界面缓冲条停留在86% 监控建库日志([root@rhel5 bin]# tail -f /u01/app/oracle/cfgtoollogs/dbca/orcl/trace.log)中显示如下错误:[Thread-73] [ 2016-05-26 10:04:35.701 CST ] [PostDBCreationStep.executeImpl:820] Starting Database HA Resource...
AIX6.1下重新添加oracle11gRAC坏掉的节点,
错误一:bash-3.2$ ./addNode.sh -silent "CLUSTER_NEW_NODES={db2}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={db2-vip}" "CLUSTER_NEW_PRIVATE_NODE_NAMES={db2-priv}" Starting Oracle Universal Installer...Checking swap space: must be greater than 500 MB. Actual 4352 MB PassedOrac...
ORA-16014: log 4 sequence# 1 not archived, no available destinations
RAC节点启动实例到mount后,session一直卡在那儿,没有报错。查看警告日志发现ORA-16014报错根据提示为归档日志的问题查看归档日志情况如下:SQL> archive log listDatabase log mode Archive ModeAutomatic archival ...
将表移动表空间时遭遇ORA-01950
SQL> alter table scott.emp move tablespace bank;alter table scott.emp move tablespace bank *ERROR at line 1:ORA-01950: no privileges on tablespace 'BANK'SQL> show userUSER is "SYS"SQL> alte...
数据库恢复时遭遇ORA-01152
故障现象:SQL> alter database open resetlogs;alter database open resetlogs*ERROR at line 1:ORA-01152: file 1 was not restored from a sufficiently old backupORA-01110: data file 1: '+DATA/eisoo/datafile/system.256.901474327'故障原因:在一次全库恢复中,首先恢复控制文件,恢复成功,但是在恢复数...
AIX6.1系统下RAC11gR2启动节点实例遭遇ORA-00205
故障:启动RAC一个实例节点时报错ORA-00205,如下bash-3.2$ srvctl start instance -d db01 -i DB011PRCR-1013 : Failed to start resource ora.db01.dbPRCR-1064 : Failed to start resource ora.db01.db on node db1ORA-00205: error in identifying control file, check alert log for more infoCRS-2674: Start o...
AIX6.1上重新安装RAC11G时,ASM无法识别磁盘为Candidate Dsik
原因:由于在删除原RAC时没有删除ASM磁盘组,导致重新安装是ASM无法利用共享磁盘解决:使用dd命令清楚需要重新使用的共享磁盘dd if=/dev/zero of=/dev/rhdisk1 bs=1024dd if=/dev/zero of=/dev/rhdisk2 bs=1024dd if=/dev/zero of=/dev/rhdisk3 bs=1024dd if=/dev/zero of=/dev/rhdisk4 bs=1024dd if=/dev/zero of=/...
使用impdp导入数据报错:ORA-39001/39000/39142
[oracle@ora10g ~]$ impdp bank/bank directory=my_dir dumpfile=USERBANK.DMP logfile=imp.log remap_schema=userbank:bank remap_tablespace=tablespace_bank:bankImport: Release 10.2.0.5.0 - 64bit Production on Monday, 16 May, 2016 19:36:05Copyright (c) 2003, 2007, Oracle. All rights reserved.Co...
ORA-30012 undo tablespace 'UNDOTBS3' does not exist or of wrong type
问题分析:根据错误提示内容为打开UNDO表空间是出错(发现UNDO表空间不存在或者类型错误),所以此时数据应该是可以启动到mount状态SQL> startup mount;ORACLE instance started.Total System Global Area 534462464 bytesFixed Size 2215064 bytesV...
undo表空间不足,ORA-30036 unable to extend segment by ...
一、一次更新或者删除大量数据,这些数据需要保存在undo表空间中(直到提交或回滚后这些undo表空间中的数据才允许被覆盖),如果undo表空间不足,就会报ORA-30036错误。下面是两种解决办法: 1、增加undo表空间大小,或将undo表空间数据文件设置为自动扩展(如果磁盘空间不足也会导致该问题) 2、批量更新...
ORA-09817 Write to audit file failed错误处理
报错如下:[oracle@rhel5 ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Mon May 16 14:39:36 2016Copyright (c) 1982, 2009, Oracle. All rights reserved.ERROR:ORA-09817: Write to audit file failed.Linux-x86_64 Error: 28: No space left on deviceAdditional information: 1...