区分exp&expdp导出的dmp文件
xxd -ps -l 2 test.dmp输出内容及意义:0301:expdp文件0303:exp文件
ORA-27300、ORA-27301、ORA-27302、ORA-27303
数据库启动后,修改了相关目录的属组,普通用户登录失败[oracle@dasong ~]$ sqlplus dasong/dasongSQL*Plus: Release 11.2.0.1.0 Production on Thu Nov 3 09:47:26 2016Copyright (c) 1982, 2009, Oracle. All rights reserved.ERROR:ORA-27140: attach to post/wait facility failed...
字段 与 变量 同名造成的sql问题
前几天前端程序开发的人问了个奇怪的问题,说是存储过程中sql语句查不出数据,但是单独拉出来,用相同的值 替换一下变量 就没有问题;奇怪是吧,看起来真的很奇怪,同样的sql,不同的地方怎么可能会有不同的结果;根据之前解决 各种不可思议问题 的经验,99%的问题都出在人为的细节问题上,所以这种问题我基...
Configuring the Reserved Pool
Database Performance Tuning Guide7.3.8 Configuring the Reserved PoolIf there is not enough free space in the shared pool, then Oracle Database must search for and free enough memory to satisfy this request. This operation could conceivably hold the latch resource for detectable peri...
char, varchar2, nchar, nvarchar2
本文主要比较一下char、varchar2、nchar、nvarchar2的区别。1.字符集不同数据库在创建的时候会指定两个字符集,Character set 和 NCHAR Character set;char、varchar2用Character set存储;nchar、nvarchar2用NCHAR Character set存储select * from database_properties where property_name like '%...
ORA-39714: upgrade script utlmmig.sql failed
之前遇到一个i_obj4索引问题,导致创建表失败(大概是这样,具体问题记不得了),试过rebuild、重建索引等都失败,最后没有搞定;最近在mos上看到了解决方法(How to Create/Rebuild Bootstrap Indexes (Doc ID 1587581.1)),因为没有当时问题的环境,所以也不能确定是不是可以顺利解决,不再有其它问题;这个不是今天...
Archive log rejected (thread 1 sequence 2200) at host 'standby'
客户环境上的一个问题,大概的描述一下。一个新建的dg环境,在创建完成后出现了日志无法同步的问题,检查后发现造成此问题的原因可能是 rman备份。dg是通过rman duplicate from active database创建的,由于数据文件有200-300g,网络传输速度又有点慢,同步数据大概花了7,8个小时,在这个数据同步的过程中发生了一次rma...
数据文件offline后unusable索引造成的问题
最近在做一个oracle入库速度测试时,想到将最近一个小时的索引放到内存中(表是按小时分区)是不是会提升入库的速度,索引的维护对io是一个不小的开销;不过这个方案如果要使用的话数据库必须是 oracle 12c,因为在当前小时结束后,需要将相关索引移出内存,让下一个小时的索引留在内存,这样内存的使用情况基本是...
物理备库open ORA-10458
刚创建的物理备库在打开时可能会报 ORA-10458: standby database requires recovery 这个错,此时只要打开备库的 日志恢复,让备库apply重做日志即可。[oracle@n2 ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Wed May 25 09:52:17 2016Copyright (c) 1982, 2013, Oracle. All righ...
lsnrctl start - Linux Error 29 Illegal seek
注释掉/etc/hosts中127.0.0.1一行,启动oracle侦听程序可能报错,如下:[root@n2 ~]# su - oracle[oracle@n2 ~]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.4.0 - Production on 25-MAY-2016 09:42:25Copyright (c) 1991, 2013, Oracle. All rights reserved.Starting /oracle/db/ora11g/bin/tn...
oracle dg相关参数
1.DB_FILE_NAME_CONVERT当主、备库在同一台机器(主、备库数据文件目录肯定不同)时 或是 主、备数据库目录不同时需要设置此参数。此参数需要设置成成对的值(可以有多对),如果主库的数据文件包含第一个值,则会用第二个值替换第一个值来构建备库的数据库。参数设置如下:DB_FILE_NAME_CONVERT = '/oracle/db/dg1'...
oracle物理dg安装:主库创建
以下记录了dbca创建主库的过程,基本每一步都有图片。oracle用户执行dbca,如果是root用户登录图形图面,则su切换用户前需要先执行一下xhost +x,否则oracle不能启动图形界面程序,下一步选择Create Database,下一步选择General Purpose or Transaction Processing,下一步dbname=orcl,sid=dg1,下一步Conf...
oracle物理dg安装:方法二
本文记录了物理dg的第二种安装方法,使用rman duplicate from active database,不需要做备份文件。准备工作:1.两台虚拟机,主机名:n1, n2,操作系统:centos6.7,建好信任关系2.oracle database 11.2.0.4软件已装好3.节点1(n1)数据库创建好,db_name=orcl,db_unique_name=dg1,归档模式(归档目录/...
Data Guard Protection Modes(dg保护模式)
Home / Database / Oracle Database Online Documentation 11g Release 2 (11.2) / High AvailabilityData Guard Concepts and Administration1.4 Data Guard Protection Modes dg保护模式In some situations, a business cannot afford to lose data regardless o...
Oracle 11gR2 + ASM + spfile (eng)
https://aychin.wordpress.com/2011/01/22/oracle-11gr2-asm-spfile-eng/全文翻译太累了,大概的讲一下文章讲的内容吧。1.Oracle 11gR2的grid增加了许多特性,其中的一个是OLR,主要存放本地资源配置的信息,功能类似rac中的OCR2.Oracle 11gR2 ASM的spfile存放在asm disks上,而没有存放在操作系统文件系统的dbs目...
oracle物理dg角色转换
Data Guard Concepts and Administration8.2 Role Transitions Involving Physical Standby DatabasesThe following sections describe how to perform a switchover or failover to a physical standby database:接下来的章节介绍怎样switchover或是failover到物理备库Performing a Switchove...
oracle物理dg状态检查
1.在主库 查看主、备库scn--如果主库、备库的scn一直在变,并且很接近,说明备库日志恢复正常select 1 dest_id, current_scn from v$databaseunion allselect dest_id, applied_scn from v$archive_dest where target='STANDBY';以下3个查询可以看到主库的scn一直在变,但是备库的scn始终不变,此时...
oracle物理dg gap解决
一般 redo传输服务(redo transport services)会自动探测并重发日志文件到备库来解决gap,但也有自动解决不了的时候,此时就需要人工介入,以下是操作步骤。1.备库查看gapselect * from v$archive_gap;2.主库查看gap对应的日志文件,sql中的40和49是上一步查出的日志sequence号...
UDEV SCSI Rules Configuration for ASM in Oracle Linux 5, 6 and 7
https://oracle-base.com/articles/linux/udev-scsi-rules-configuration-in-oracle-linuxFor Oracle Automatic Storage Manager (ASM) to use disks, it needs to be able to identify the devices consistently and for them to have the correct ownership and permissions. In Linux you can use ASMLib to manage ...
传输表空间迁移数据:expdp&impdp
数据库版本信息:1.创建目录源数据库、目标数据库创建目录create directory dir_datapump as '/home/oracle';2.源数据库导出--要导出的表空间需要被read onlyalter tablespace tbs_test1 read only;alter tablespace tbs_test2 read only;--expdp导出表空间及包含对...