oracle asm
drop diskgroup data;create diskgroup DATA external redundancy disk 'ORCL:A01'(alter diskgroup data mount;) alter diskgroup DATA1 add disk 'ORCL:A04';[@more@]
redhat 5 iscsi
1 Iscsi包: iscsi-initiator-utils-6.2.0.742-0.5.el5.i386.rpm 2.config iSCSI Service # service iscsid start # service iscsi start Turning off network shutdown. Starting iSCSI daemon: [ OK ] [ OK ] # chkconfig iscsid on # chkconfig iscsi on 3. 发现target,询问target名称 [root@RedHat5 ~]# iscsiadm -m discovery -t sendtargets -p targetIP地址:端口号 该命令将报告出target名称 4. 建立连接 (one by one)得到了target名称后,使用下面命令建立连接
linux 修改默认路由
[root@node2 ~]# route -n [root@node2 ~]# route del -net 0.0.0.0 netmask 0.0.0.0 或者 ([root@node2 ~]# route del default) [root@node2 ~]# route add default gw 192.168.16.1 dev eth0 [@more@]
linux ping
[root@node1 ~]# vi ping.sh #!/bash/binwhile [ 1 -eq 1 ]dore=`ping 192.168.16.115 -c 1|grep -i "unreachable"`if [ "$re" ]thenmail -s "Host Check Timed Out" 304877329@qq.comelsemail -s "recover" 304877329@qq.comfidone[@more@]
vm ware 添加共享磁盘
所有节点 disk.locking = "false" diskLib.dataCacheMaxSize = "0"diskLib.dataCacheMaxReadAheadSize = "0"diskLib.dataCacheMinReadAheadSize = "0"diskLib.dataCachePageSize = "4096"diskLib.maxUnsyncedWrites = "0"scsi1:0.deviceType = "disk"scsi1:1.deviceType = "disk"scsi1:0.sharedBus = "virtual"scsi1:1.sharedBus = "virtual" [@more@]
10g RAC: How to Clean Up After a Failed CRS Install
Normal 0 7.8 pt 0 2 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan
rman copy asm datafile(rename asm datafile)
1. Using RMAN to copy this datafile to another folder or copy to a new name RMAN> copy datafile FILE_NUMBER TO '/db/data/abc_new.dbf'; --copy datafile 4 to '/home/oracle/u01/app/oradata/test/USERS01.dbf'; 2. Offline the datafile SQL> ALTER DATABASE datafile FILE_NUMBER offline; --ALTER DATABASE datafile 4 offline; 3. Using RMAN to rename the datafile run{ allocate channel ch1 device TYPE disk; SET NEWNAME FOR datafile 4 TO '/home/oracle/u01/app/oradata/test/USERS01.dbf';
rename datafile
SQL> alter tablespace users offline; 表空间已更改。 SQL> host copy ..... SQL> alter tablespace users rename datafile 'D:oracleproduct10.2.0oradatate sttestusers02.dbf' to 'D:oracleproduct10.2.0oradatatestusers02.dbf'; 表空间已更改。 SQL> alter tablespace users online; 表空间已更改。[@more@]
SQL Profiles与语句优化
个人理解SQL Profiles可以看作是SQL语句的统计信息。只是这个统计信息对特定SQL语句才能起作用,不对会语句的对象、其它语句产生影响。 使用SQL Profiles前要用SQL Tuning Advisor收集对语句的优化建议,再根据优化建议创建SQL Profiles。 SQL Profiles 使用也比较灵活,可以在会话级、系统级应用。 语句绑定SQL Profile后,测试了下SQL Profile与Bind Peeking的关系。测试发现,Bind Peeking的特性还是会起作用。这从另一方面说明SQL Profile与OUTLINE的不同:绑定OUTLINE后,执行计划是被固化的;绑定SQL Profile后,执行
绑定变量和BIND PEEKING
绑定变量和BIND PEEKING使用绑定变量可以减少SQL PARSE,但是使用绑定变量有一个不好的地方,就是对于访问具有倾斜的列,可能使用错误的执行计划。在Oracle 9i之前,如果WHERE 条件里面全部使用绑定变量,那么只能使用固定的选择性参数来确定执行计划。=操作和>=操作的选择性为5%,范围扫描的选择性为25%。缺省值的方式可能生成不好的执行计划。所以Oracle 9i就出现了一个新的技术,bind peeking。什么是bind peeking呢?当SQL第一次执行的时候,优化器会根据绑定变量来确定执行计划(如果存在柱状图)。BIND PEEKING只有当该SQL第一次
How To List All The Named Events Set For A Database [ID 436036.1]
v:* {behavior:url(#default#VML);} o:* {behavior:url(#default#VML);} w:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 7.8 pt 0 2 false false false MicrosoftInternetExplorer4 st1:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colb
restore controlfile from autoback
RMAN> startup force nomount; RMAN> restore controlfile from autobackup; RMAN> alter database mount; RMAN> recover database; RMAN> alter database open resetlogs;[@more@]
rman restore database(spfile,controlfile, datafile)
Normal 0 7.8 pt 0 2 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan
ora-04301错误
共享池碎片太多了,加大共享池,或者设置SESSION_CACHED_CURSORS=0[@more@]
oracle 10g em patch
经查询,此问题是由于enterprise manager database control组件的跟CA证书授权过期造成的,其证书到期日为2010年12月31日,2011年安装此版本数据库都会出现这个问题,官方的解决方案是打Patch 8350262[@more@]
oracle asm Unable to mount ASMlib driver filesystem
[root@dbatest1 asm]# /etc/init.d/oracleasm configureThis will configure the on-boot properties of the Oracle ASM librarydriver. The following questions will determine whether the driver isloaded on boot and what permissions it will have. The current valueswill be shown in brackets ('[]'). Hitting <ENTER> without typing ananswer will keep that current value. Ctrl-C will abort.Default user to own the driver interface []: oracleDefault group to own the driver interface []: dbaStart Oracle
Oracle Outline的使用及注意事项
Oracle Outline是用来保持SQL执行计划(execution plan)的一个工具。我们可以通过outline工具防止SQL执行计划在数据库环境变更(如统计信息,部分参数等)而引起变化。Outline的主要使用在以下情况:1.为避免在升级后某些sql出现严重性能下降而且在短时间内不能优化的情况,我们可以使用outline的功能将原生产库中的sql执行计划实施在新的数据库上。2.为避免SQL的执行计划在统计数据不准确的情况(如未能及时收集表或索引的统计信息)下导致变化从而引起的性能降低。3.避免大规模分布实施的应用出现数据库版本、配置等区别引起的优化器产
Oracle DataGuard 常用维护命令参考手册
Start Standby Database startup nomount alter database mount standby database; alter database recover managed standby database disconnect; Disable/Enable archive log destinations alter system set log_archive_dest_state_2 = 'defer'; alter system set log_archive_dest_state_2 = 'enable'; To remove a delay from a standby alter database recover managed standby database cancel; alter database recover managed standby database nodelay disconnect; Stop and Start of Log
yum 配置本地源
vi /etc/yum.repos.d/rhel-debuginfo.repo [rhel-debuginfo] name=Red Hat Enterprise Linux $releasever - $basearch - Debug #baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/$basearch/Debuginfo/ baseurl=file:///mnt/Server enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[@more@][base] #name=Red Hat Linux $releasever - $basearch - Base #baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/$releasever/$basearch/ name=Red Hat Lin
tr '[a-z]' '[A-Z]' --大写转小写
ll|tr '[a-z]' '[A-Z]' --大写转小写[@more@]