1.报错:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2011-07-06_03-14-36PM/jre/1.4.2/lib/i386/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
at sun.awt.DebugHelper.<clinit>(Unknown Source)
at java.awt.Component.<clinit>(Unknown Source)
2.出错原因:缺少系统安装包:rpm -ivh libXp-1.0.0-8.i386.rpm
posted @
2011-07-06 15:26 xrzp 阅读(283) |
评论 (0) |
编辑 收藏
摘要: oracle读取数据的最小单位是块.oracle读取数据的最大限制取决于OS和oracle对多块读I/O的限制(db_file_multiblock_read_count).物理上来说,一个sql读取某个记录,得将记录读取到DB Cache中,然后才能从中或者,这个称为物理读.如果这个数据已经存在于DB Cache中,那么前台进程可以直接冲DB Cache中读取数据,这个称谓逻辑读.逻辑上来说,有...
阅读全文
posted @
2011-06-12 01:23 xrzp 阅读(180) |
评论 (0) |
编辑 收藏
1.查看隐藏参数
脚本1:
SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ
FROM SYS.x$ksppi x, SYS.x$ksppcv y
WHERE x.inst_id = USERENV ('Instance')
AND y.inst_id = USERENV ('Instance')
AND x.indx = y.indx
AND x.ksppinm LIKE '%&par%' 脚本2:
select
x.ksppinm name,
y.ksppstvl value,
y.ksppstdf isdefault,
decode(bitand(y.ksppstvf,7),1,'MODIFIED',4,'SYSTEM_MOD','FALSE') ismod,
decode(bitand(y.ksppstvf,2),2,'TRUE','FALSE') isadj
from
sys.x$ksppi x,
sys.x$ksppcv y
where
x.inst_id = userenv('Instance') and
y.inst_id = userenv('Instance') and
x.indx = y.indx and
x.ksppinm like '%_&par%'
order by
translate(x.ksppinm,'_','') 2.Oracle通过一个内部参数_small_table_threshold来定义大表和小表的界限.缺省情况下该参数等于2%的数量,如果表的buffer大小小于这个参数的定义,则oracle认为它是小表,反之为大表.
select (db_cache_size/块size)*0.02 from dual
posted @
2011-06-11 20:44 xrzp 阅读(295) |
评论 (0) |
编辑 收藏
SELECT d.VALUE || '/' || LOWER(RTRIM(i.INSTANCE, CHR(0))) || '_ora_' ||
p.spid || '.trc' trace_file_name
FROM (SELECT p.spid
FROM v$mystat m, v$session s, v$process p
WHERE m.statistic# = 1
AND s.SID = m.SID
AND p.addr = s.paddr) p,
(SELECT t.INSTANCE
FROM v$thread t, v$parameter v
WHERE v.NAME = 'thread'
AND (v.VALUE = 0 OR t.thread# = TO_NUMBER(v.VALUE))) i,
(SELECT VALUE FROM v$parameter WHERE NAME = 'user_dump_dest') d
posted @
2011-06-11 19:38 xrzp 阅读(184) |
评论 (0) |
编辑 收藏
posted @
2011-06-06 20:58 xrzp 阅读(2590) |
评论 (0) |
编辑 收藏
安装clusterware之前做一个检查,./runcluvfy.sh stage -pre crsinst -n rac1,遇到反馈错误
ERROR:
User equivalence unavailable on all the nodes.
Verification cannot proceed.
网上查了下,解决方法如下
root@rac1 # mkdir -p /usr/local/bin
root@rac1 # ln -s -f /usr/bin/ssh /usr/local/bin/ssh
root@rac1 # ln -s -f /usr/bin/scp /usr/local/bin/scp
在oracle用户下:
$ exec /usr/bin/ssh-agent $SHELL
$ /usr/bin/ssh-add
再执行./runcluvfy.sh stage -pre crsinst -n rac1,rac2,就能正常检查了
[oracle@rac1 cluvfy]$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2
Performing pre-checks for cluster services setup
Checking node reachability
Node reachability check passed from node "rac1".
Checking user equivalence
User equivalence check passed for user "oracle".
Checking administrative privileges
User existence check passed for "oracle".
Group existence check passed for "oinstall".
Membership check for user "oracle" in group "oinstall" [as Primary] passed.
Administrative privileges check passed.
Checking node connectivity
Node connectivity check passed for subnet "172.16.0.0" with node(s) rac2,rac1.
WARNING:
Make sure IP address "10.10.10.51" is up and is a valid IP address on node "rac1".
Node connectivity check failed for subnet "10.10.10.0".
Suitable interfaces for the private interconnect on subnet "172.16.0.0":
rac2 eth0:172.16.40.52
rac1 eth0:172.16.40.51
ERROR:
Could not find a suitable set of interfaces for VIPs.
Node connectivity check failed.
Checking system requirements for 'crs'
Total memory check passed.
Free disk space check passed.
Swap space check passed.
System architecture check passed.
Kernel version check passed.
Package existence check passed for "make-3.79".
Package existence check passed for "binutils-2.14".
Package existence check passed for "gcc-3.2".
Package existence check passed for "glibc-2.3.2-95.27".
Package existence check passed for "compat-db-4.0.14-5".
Package existence check failed for "compat-gcc-7.3-2.96.128".
Check failed on nodes:
rac2,rac1
Package existence check failed for "compat-gcc-c++-7.3-2.96.128".
Check failed on nodes:
rac2,rac1
Package existence check failed for "compat-libstdc++-7.3-2.96.128".
Check failed on nodes:
rac2,rac1
Package existence check failed for "compat-libstdc++-devel-7.3-2.96.128".
Check failed on nodes:
rac2,rac1
Package existence check passed for "openmotif-2.2.3".
Package existence check passed for "setarch-1.3-1".
Group existence check passed for "dba".
Group existence check passed for "oinstall".
User existence check passed for "nobody".
System requirement failed for 'crs'
Pre-check for cluster services setup was unsuccessful on all the nodes.
posted @
2011-06-06 20:03 xrzp 阅读(3200) |
评论 (0) |
编辑 收藏
监控flash_recovery_area的使用情况可以查询2个视图:
1.V$FLASH_RECOVERY_AREA_USAGE:displays usage information about flashback recovery areas
SQL> select * from v$flash_recovery_area_usage;
FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE 0 0 0
REDO LOG 0 0 0
ARCHIVED LOG 30.81 0 61
BACKUP PIECE 0 0 0
IMAGE COPY 0 0 0
FLASHBACK LOG 12.99 8.54 70
FOREIGN ARCHIVED LOG 0 0 0
已选择7行。
SQL> select sum(PERCENT_SPACE_USED) from v$flash_recovery_area_usage;
SUM(PERCENT_SPACE_USED)
-----------------------
43.8 2.V$RECOVERY_FILE_DEST:displays information about the disk quota and current disk usage in the flash recovery area.
SQL> select * from V$RECOVERY_FILE_DEST;
NAME SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
---------------------------------------- ----------- ---------- ----------------- ---------------
/opt/oracle/flash_recovery_area 8589934592 3762538496 733315072 131
SQL> select round(100*(a.space_used/space_limit),2) from v$recovery_file_dest a;
ROUND(100*(A.SPACE_USED/SPACE_LIMIT),2)
---------------------------------------
43.8
posted @
2011-05-30 13:53 xrzp 阅读(1978) |
评论 (0) |
编辑 收藏
1.先将备份的控制文件和数据文件copy到原来的位置
2.mount数据库
3.RECOVER DATABASE USING BACKUP CONTROLFILE
4.ALTER DATABASE OPEN RESETLOGS;
代码如下:
SQL> shutdown abort
ORACLE 例程已经关闭。
SQL> host del D:\oracle\product\10.2.0\oradata\suredd\control*.ctl
/**//** 在此先将备份的控制文件和数据文件还原*/
SQL> startup mount
ORACLE 例程已经启动。
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 230689668 bytes
Database Buffers 373293056 bytes
Redo Buffers 7135232 bytes
数据库装载完毕。
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE
ORA-00279: 更改 873855 (在 05/05/2011 15:47:47 生成) 对于线程 1 是必需的
ORA-00289: 建议:
D:\ORACLE\PRODUCT\10.2.0\ARCHIVELOGS\SUREDD\ARC00001_0750352730.001
ORA-00280: 更改 873855 (用于线程 1) 在序列 #1 中
指定日志: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00308: 无法打开归档日志
'D:\ORACLE\PRODUCT\10.2.0\ARCHIVELOGS\SUREDD\ARC00001_0750352730.001'
ORA-27041: 无法打开文件
OSD-04002: 无法打开文件
O/S-Error: (OS 2) 系统找不到指定的文件。
ORA-00308: 无法打开归档日志
'D:\ORACLE\PRODUCT\10.2.0\ARCHIVELOGS\SUREDD\ARC00001_0750352730.001'
ORA-27041: 无法打开文件
OSD-04002: 无法打开文件
O/S-Error: (OS 2) 系统找不到指定的文件。
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE
ORA-00279: 更改 873855 (在 05/05/2011 15:47:47 生成) 对于线程 1 是必需的
ORA-00289: 建议:
D:\ORACLE\PRODUCT\10.2.0\ARCHIVELOGS\SUREDD\ARC00001_0750352730.001
ORA-00280: 更改 873855 (用于线程 1) 在序列 #1 中
指定日志: {<RET>=suggested | filename | AUTO | CANCEL}
E:\oracletest\backup\suredd\REDO01.LOG
ORA-00339: 归档日志未包含任何重做
ORA-00334: 归档日志: 'E:\ORACLETEST\BACKUP\SUREDD\REDO01.LOG'
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE
ORA-00279: 更改 873855 (在 05/05/2011 15:47:47 生成) 对于线程 1 是必需的
ORA-00289: 建议:
D:\ORACLE\PRODUCT\10.2.0\ARCHIVELOGS\SUREDD\ARC00001_0750352730.001
ORA-00280: 更改 873855 (用于线程 1) 在序列 #1 中
指定日志: {<RET>=suggested | filename | AUTO | CANCEL}
E:\ORACLETEST\BACKUP\SUREDD\REDO02.LOG
ORA-00339: 归档日志未包含任何重做
ORA-00334: 归档日志: 'E:\ORACLETEST\BACKUP\SUREDD\REDO02.LOG'
SQL> RECOVER DATABASE USING BACKUP CONTROLFILE
ORA-00279: 更改 873855 (在 05/05/2011 15:47:47 生成) 对于线程 1 是必需的
ORA-00289: 建议:
D:\ORACLE\PRODUCT\10.2.0\ARCHIVELOGS\SUREDD\ARC00001_0750352730.001
ORA-00280: 更改 873855 (用于线程 1) 在序列 #1 中
指定日志: {<RET>=suggested | filename | AUTO | CANCEL}
E:\ORACLETEST\BACKUP\SUREDD\REDO03.LOG
已应用的日志。
完成介质恢复。
SQL> ALTER DATABASE OPEN RESETLOGS;
数据库已更改。
SQL> select * from dd.t1;
ID NAME
---------- ----------
1 test1
2 test2
SQL>
posted @
2011-05-05 16:02 xrzp 阅读(421) |
评论 (0) |
编辑 收藏
直接摘录2段话:
1.Set NORESETLOGS case
The following commands will create a new control file and use it to open the database.
Data used by Recovery Manager will be lost.
Additional logs may be required for media recovery of offline.
Use this only if the current versions of all online logs are available.
2.Set RESETLOGS case
The following commands will create a new control file and use it to open the database.
Data used by Recovery Manager will be lost.
The contents of online logs will be lost and all backups will be invalidated.
Use this only if online logs are damaged.
posted @
2011-05-05 15:39 xrzp 阅读(359) |
评论 (0) |
编辑 收藏
1.控制文件全部丢失,在线重做日志丢失,如果有备份的2进制的控制文件也不能使用,为什么呢?因为用备份的控制文件进行恢复时(
RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL),
由于使用了备份的控制文件,备份之后的归档日志信息丢失,所以需要在线重做日志来进行介质恢复,而当前的情况是在线重做日志也丢失了,所以只能进行手工创建控制文件.
2.以alter database open resetlogs打开数据库
2.1如果当初关闭数据库时是非正常关闭,那么在打开数据库之前应该先RECOVER DATABASE USING BACKUP CONTROLFILE
3.添加temp文件
代码如下:
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> host del D:\oracle\product\10.2.0\oradata\suredd\control*.ctl
SQL> host del D:\oracle\product\10.2.0\oradata\suredd\redo*.log
SQL> startup nomount
ORACLE 例程已经启动。
Total System Global Area 612368384 bytes
Fixed Size 1250428 bytes
Variable Size 226495364 bytes
Database Buffers 377487360 bytes
Redo Buffers 7135232 bytes
SQL> edit
已写入 file afiedt.buf
1 CREATE CONTROLFILE REUSE DATABASE "SUREDD" RESETLOGS ARCHIVELOG
2 MAXLOGFILES 16
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 100
5 MAXINSTANCES 8
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\SUREDD\REDO01.LOG' SIZE 50M,
9 GROUP 2 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\SUREDD\REDO02.LOG' SIZE 50M,
10 GROUP 3 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\SUREDD\REDO03.LOG' SIZE 50M
11 DATAFILE
12 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\SUREDD\SYSTEM01.DBF',
13 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\SUREDD\SYSAUX01.DBF',
14 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\SUREDD\USERS01.DBF',
15 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\SUREDD\EXAMPLE01.DBF',
16 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\SUREDD\DDTESTTBS02.DBF',
17 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\SUREDD\UNTOTBS_NEW_01.DBF'
18* CHARACTER SET ZHS16GBK
SQL> /
控制文件已创建。
SQL> ALTER DATABASE OPEN RESETLOGS;
数据库已更改。
SQL> ALTER TABLESPACE TEMP ADD TEMPFILE 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\SUREDD\TEMP01.DBF'
2 SIZE 20971520 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;
表空间已更改。
SQL> select * from dd.t1;
ID NAME
---------- ----------
1 test1
2 test2
SQL>
posted @
2011-05-05 15:25 xrzp 阅读(539) |
评论 (0) |
编辑 收藏