asmcmd does not exist in directory
在oracle 10g asmcmd 清理归档日志时,会提示ASMCMD> sthread_1_seq_885.314.738655069thread_1_seq_886.313.738692047thread_2_seq_833.316.738654865ASMCMD> rm -rf thread*ASMCMD> lsasmcmd: entry '2010_12_25' does not exist in directory '+data/zj/archivelog/'ASMCMD> cd ..需要exit 推出asmcmd 界面,然后再进入,否则无法回到上一级目录。[@more@]
oracle RAC 环境解决sequence 不一致问题
Sequences in Oracle 10g RACJust recently I got a call from a developer. He had a table with a primary key populated by a sequence, a timestamp column with the current date and some other columns. He had a specific set of data that, when ordered by the primary key had out of order timestamps. He was puzzled how this could be. This is a RAC database and the sequence was created with the default values. Not only the sequences cache was the default of 20, but it was “noordered”. Being “noordered”
Redhat Enterprice linux Server 5上安装 Oracle 10G R2 手册
1.操作系统设置1.1 安装说明Swap应不低于2G selinux 状态disable1.2 操作系统组件安装组件时选择定制,组件包括: GNOME Desktop Environment Editors Graphical Internet Text-based Internet Development Libraries Development Tools Legacy Software Development Server Configuration Tools Administration Tools Base Legacy Software Support System Tools X Window System1.3 安装RPM包cd /media/cdrom/Server rpm -Uvh setarch-2*rpm -Uvh make-3*rpm -Uvh glibc-2*rpm -Uvh libaio-0*rpm -Uvh compat-libstdc++-33-3*rpm -Uvh c
u01/app/oracle/product/10.2.0/db_1/bin/dbca has failed
[oracle@db1 bin]$ ./crs_stat -tName Type Target State Host ------------------------------------------------------------ora....B1.lsnr application ONLINE OFFLINE ora.db1.gsd application ONLINE ONLINE db1 ora.db1.ons application ONLINE ONLINE db1 ora.db1.vip application ONLINE ONLINE db1 ora....B2.lsnr application ONLINE OFFLINE ora.db2.gsd application ONLINE ONLINE db2 ora.db2.ons application ONLINE ONLINE db2 ora.db2.vip application ONLINE ONLINE db2 出现以下错误TNS-12542: TNS:address already in
设置两台RAC 主机的信任关系
两台机器都需同样操作ssh db1 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keysssh db1 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keysssh db2 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keysssh db2 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keysscp authorized_keys db2:/home/oracle/.ssh/scp authorized_keys db1:/home/oracle/.ssh/[@more@]
redhat 5.3 版本创建 ocr 和vote
ln -s /dev/raw/raw1 /oracle/app/oracle/10.2.0/crs/ocr.crsln -s /dev/raw/raw2 /oracle/app/oracle/10.2.0/crs/vote.crs[@more@]ln -s /dev/raw/raw1 /oracle/app/oracle/10.2.0/crs/ocr.crsln -s /dev/raw/raw2 /oracle/app/oracle/10.2.0/crs/vote.crs
UnsatisfiedLinkError:/usr/java/j2sdk1.4.2_06/jre/lib/i386/libawt.so: libXt.so.6
Exception :java.lang.UnsatisfiedLinkError:/usr/java/j2sdk1.4.2_06/jre/lib/i386/libawt.so: libXt.so.6: cannot open shared object file: No such file or directory这个错误是也是由于缺少系统安装包造成的,只需安装XFree86-libs包即可,这个安装包可以在系统光盘中找到。 在上面两个错误如果出现在redhat as5版本中,解决如下:在RHEL5中上面的包被libXp所取代了,因此rpm -ivh libXp-1.0.0-8.i386.rpm将包打上后问题即可解决。libXp-1.0.0-8.1.el5.i386.rpm[@more@]
Could not find a suitable set of interfaces for VIPs.
ERROR: Could not find a suitable set of interfaces for VIPs.Result: Node connectivity check failed.这个现象可忽略,通过vi vipca[@more@]
oracle 10G RAC 安装环境验证
sh runcluvfy.sh stage -pre crsinst -n db-1,db-2 -verbose[@more@]
TNS-12542: TNS:address already in use
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=db1)(PORT=1521)))Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.80.10.251)(PORT=1521)(IP=FIRST)))TNS-12542: TNS:address already in use TNS-12560: TNS:protocol adapter error TNS-00512: Address already in use Linux Error: 98: Address already in use[@more@]
while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or dir
# ./srvctl config database/u01/crs/oracle/product/10.2.0/crs/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory需要修改srvctl 脚本新增加以下内容LD_ASSUME_KERNEL=2.4.19export LD_ASSUME_KERNEL[@more@]
CRS-0184: Cannot communicate with the CRS daemon.
[root@db1 bin]# ./crs_statCRS-0202: No resources are registered.[root@db1 bin]# ./crs_statCRS-0202: No resources are registered.[root@db1 bin]# vi vipca 修改参数[@more@]
shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
[root@db1 bin]# ./srvctl config database/u01/crs/oracle/product/10.2.0/crs/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory 解决方法:vipca 和 srvctl 进行修改,添加unset LD_ASSUME_KERNEL否则报错LD_ASSUME_KERNEL=2.4.19export LD_ASSUME_KERNELunset LD_ASSUME_KERNEL[@more@]
oracle 10G rac 运行dbca 报错处理方法
运行dbca 报错Command = /u01/app/oracle/product/10.2.0/db_1/bin/dbca has failedExecution Error : Exception in thread "main" java.lang.NullPointerExceptionat oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtocolAddress(NetworkUtils.java:2655)at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtocolAddress(NetworkUtils.java:2599)at oracle.sysman.assistants.util.NetworkUtils.getOneLocalListenerProtocolAddress(NetworkUtils.java:2753)at oracle.sysman.assistan
oracle 10G RAC for redhat as5.3 安装说明
1、安装操作系统,建议分10G root如果是虚拟机,建议分1G的内存空间,磁盘空间为30G官方文档在AS4的推荐参数如下,同时注明若默认参数大于推荐值,则不要修改。semmsl 250semmns 32000semopm 100semmni 128shmmax Half the size of physical memory (in bytes)shmmni 4096shmall 2097152file-max 65536ip_local_port_range Minimum: 1024 Maximum:65000rmem_default 1048576rmem_max 1048576wmem_default 262144wmem_max 262144实际发现as5在参数上大多已超过推荐值实例如下:/etc/sysctl.conf.文件net.ipv4.ip_forward = 0net.ipv4.conf.
oracle LOAD数据
LOAD数据 1.loading data using direct_load insert sql> insert /*+append */ into emp nologging sql> select * from emp_old; 2.parallel direct-load insert sql> alter session enable parallel dml; sql> insert /*+parallel(emp,2) */ into emp nologging sql> select * from emp_old; 3.using sql*loader sql> sqlldr scott/tiger sql> control = ulcase6.ctl sql> log = ulcase6.log direct=true[@more@]
oracle键约束控制
约束 1.define constraints as immediate or deferred sql> alter session set constraint[s] = immediate/deferred/default; set constraint[s] constraint_name/all immediate/deferred; 2. sql> drop table table_name cascade constraints sql> drop tablespace tablespace_name including contents cascade constraints 3. define constraints while create a table sql> create table xay(id number(7) constraint xay_id primary key deferrable sql> using index storage(initial 100k next 100k) tablespace indx
oracle 索引 管理
索引 1.creating function-based indexes sql> create index summit.item_quantity on summit.item(quantity-quantity_shipped);2.create a B-tree index sql> create [unique] index index_name on table_name(column,.. asc/desc) tablespace sql> tablespace_name [pctfree integer] [initrans integer] [maxtrans integer] sql> [logging | nologging] [nosort] storage(initial 200k next 200k pctincrease 0 maxextents 50);3.pctfree(index)=(maximum number of rows-initial number of rows)*100/maximum number of r
oracle 表操作
表 1.create a table sql> create table table_name (column datatype,column datatype]....) sql> tablespace tablespace_name [pctfree integer] [pctused integer] sql> [initrans integer] [maxtrans integer]sql> storage(initial 200k next 200k pctincrease 0 maxextents 50) sql> [logging|nologging] [cache|nocache] 2.copy an existing table sql> create table table_name [logging|nologging] as subquery 3.create temporary table sql> create global temporary table xay_temp as select * from xay
oracle 表空间管理
表空间管理 1.create tablespaces sql> create tablespace ts_name datafile 'c:oracleoradatafile1.dbf' size 100m ,sql>'c:oracleoradatafile2.dbf' size 100m minimum extent 550k [logging/nologging]sql> default storage (initial 500k next 500k maxextents 500 pctinccease 0) sql> [online/offline] [permanent/temporary] [extent_management_clause] 2.locally managed tablespace sql> create tablespace user_data datafile 'c:oracleoradatauser_data01.dbf' sql> size 500m extent management local uni