如何根据exp导出文件确定client端导出时的字符集
其实确定就是nls_lang中提到的字符集,和db server的字符集无关[@more@]client exp导出时的nls_lang值如下:NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK--====================================C:>exp test/test file=c:tempa.dmp tables=tExport: Release 10.2.0.1.0 - Production on 星期四 3月 10 09:46:20 2011Copyright (c) 1982, 2005, Oracle. All rights reserved.连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith the Partitioning, OLAP and Data Mining options已导出 ZHS16GBK 字符集
受困于v$asm_dksigroup里的字段REQUIRED_MIRROR_FREE_MB!
这个字段困扰了我很久,现在理解的也是稀里糊涂的,记录一个测试过程和大致的结论。[@more@]SQL> select total_mb,free_mb,name,failgroup,path from v$asm_disk where group_number=1 order by failgroup; TOTAL_MB FREE_MB NAME FAILGROUP PATH---------- ---------- -------------------- -------------------- ---------------------------------------- 1024 730 DISK2 DG1_0001 G:ASMDISKDISK2 2048 1494 DG1_0002 DG1_0002
和NLS内容相关的一篇不错的文章!
有关这3个view:nls_database_parametersnls_instance_parametersnls_session_parameters相信会对很多人产生困扰,特别是nls_database_parameters对我也有很多困扰,下面是一篇不错的文章http://www.dbapool.com/forumthread/topic_6463.html[@more@]This section explains the order in which NLS parameters are taken into account in the database client/server model. (This does NOT cover Thin JDBC connections)There are 3 levels at which you can set NLS parameters: Database, Instance andSession. If a parameter is defi
diskgroup里和空间相关的几个字段的一些介绍
主要是涉及到v$asm_diskgroup里的4个字段,其中2个字段的含义不是很好理解,可以参考网上一个哥们写的一篇文章:http://www.dbapub.net/bbs/viewthread.php?tid=278&extra=page%3D2[@more@]SQL> select group_number,disk_number,total_mb,free_mb,name,failgroup from v$asm_disk 2 where group_number=1 3 order by group_number,disk_number 4 ;GROUP_NUMBER DISK_NUMBER TOTAL_MB FREE_MB NAME FAILGROUP------------ ----------- ---------- ---------- -------------------- ----------
FAILGROUP和REDUNDANCY之间的关系关系!
我们知道asm里提供了3种redundancy方式:normal,high和external,同事它又提供了template的概念,template里也有redundancy的概念,而且template的redundancy特性优先发挥作用与diskgroup的redundancy特性,这样其实就存在一个问题,当diskgroup处于normal方式并且只存在2个failgroup而位于该diskgroup的asm file的redundancy方式是high的时候,oracle又是如何解决这一矛盾的呢[@more@]ASMCMD> ls -l control01.ctlType Redund Striped Time Sys NameN control01.ctl => +DG1/ASMDB/CONTROLFILE/Current.256.741435505ASMCMD> p
如何理解ASM里FAILGROUP的概念
FAILGROUP在asm里是一个非常重要的概念,oracle在doc上又交待的似乎不够清楚。下面这篇文章是小V的总结,大家也可以参考:http://www.itpub.net/viewthread.php?tid=1348104&extra=&highlight=failgroup&page=1[@more@]SQL> select group_number,name,type from v$asm_diskgroup;GROUP_NUMBER NAME TYPE------------ ---------- ------------1 DG1 NORMAL2 DG2 EXTERNSQL> select group_number,disk_number,total_mb,free_mb,name,failgroup from v$asm_disk order by group_number,disk_number,failgroup;GROUP_NUMBER
通过asmcmd进入asm实例时可能会遇到的一些问题
使用asmcmd时可能会遇到的一些问题,总结一下[@more@]C:>asmcmd"asmcmd: the environment variable ORACLE_HOME is not set."C:>set ORACLE_HOME='G:oracleproduct10.2.0db_1'--进入asmcmd事先需要设置ORACLE_HOME环境变量一直是我所不能理解的,oracle为什么要这么做,本来注册表里已经有了对ORACLE_HOME的设置,今天在讲课的时候一位学员在设置ORACLE_HOME之后进入asmcmd时遇到了下面的错误:C:>asmcmd'perl.exe' 不是内部或外部命令,也不是可运行的程序或批处理文件。--仔细对比之后发现最后是由于在G:oracleprodu
ASM file和file alias之间的映射关系!
asm没有提供视图直接查询asm file和file alias之间的映射关系,我是说没有提供可以直接查询出来的视图,通过下面的sql可以查询出来 [@more@]SQL> col file_name format a30SQL> col alias_name format a30SQL> SELECT f.name file_name,a.name alias_name from2 V$ASM_ALIAS A ,3 v$asm_alias F where f.system_created='Y' AND f.alias_directory='N'4 and a.system_created='N'5 and a.file_number=f.file_number and a.group_number=f.group_number;FILE_NAME ALIAS_NAME------------------------------ --------------------
v$process中pid=1的是什么process
doc描述的比较清楚,看doc吧SQL> select addr,program from v$process where pid=1;ADDR PROGRAM---------------- ---------------043120010AE PSEUDOSQL>[@more@]The PSEUDO 'process' is responsible for interim 'ownership' of internal structures associated with a process such as when a process is killed. The pseudo process is not a true process, per se. There is no associated session. It is as mechanism used internally to aid in the management of internal process structures such as in the situation I
system用户是否可以删除!
突然冒出的一个想法,尝试了一下貌似不行...[@more@]C:>sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Do Dez 23 22:07:10 2010Copyright (c) 1982, 2005, Oracle. All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith the Partitioning, OLAP and Data Mining optionsSQL> drop user system;drop user system*ERROR at line 1:ORA-01922: CASCADE must be specified to drop 'SYSTEM'SQL> drop user system cascade;drop user system cascade*
插入相同的数据量普通表和临时表产生的redo对比
往临时表里插入相同量的数据比普通heap表少产生很多redo。[@more@]SQL> create table t_heap tablespace users as select * from dba_objects where 1=2;Table created.SQL> create global temporary table t_temp on commit preserve rows as select * from dba_objects where 1=2;Table created.SQL> select a.name,b.value,b.sid from v$statname a ,v$sesstat b where a.STATISTIC# in (133,134) 2 and a.STATISTIC#=b.STATISTIC# and b.sid=(select distinct sid from v$mystat);NAME VA
sysaux和system不支持重命名!
2个系统表空间不支持重命名...[@more@]SQL> alter tablespace system rename to system1;alter tablespace system rename to system1*ERROR at line 1:ORA-00712: cannot rename system tablespaceSQL> show parameter undoNAME TYPE VALUE------------------------------------ ----------- ------------------------------undo_management string AUTOundo_retention integer 900undo_tablespace string
连接主机和存储的核心交换机重启引起的一场血案
总结了一下,希望大家能够从中汲取教训...[@more@]为了保护客户的信息我用user1替换了客户使用的用户,用ABCDE代替了所涉及到的2张处理的表。首先要感谢恩墨科技eygle和催化给予的大力支持和帮助...2周过去了,我尽可能的还原一下当时的情况,因为我也不在现场,正好在北京出差...环境:aix5.2单机 oracle:9204单实例大约500g大小的db,应用sap备份情况:有一份前1、2天的db备份(归档日志似乎没有)在磁带上,但是从未验证过是否可以顺利恢复...而且之后的归档似乎已经不全了...(由于磁盘空间紧张系统差不多用了有10年了,一直比较稳定,当
block中AVG_SPACE的意义
在hwm很高的情况下,AVG_SPACE越大意味着block中free space越大,这时候如果表很大的话,这里表大一方面是指num_rows很大,另一方AVG_ROW_LEN也很大。AVG_SPACE如果大到一定程度(当然这个度自己根据和block_size相比较把握)想办法shrink一下这个表,降低hwm的同时降低AVG_SPACE...从而提高性能和空间利用率。[@more@]SQL> create table t tablespace users as select * from dba_objects;表已创建。SQL> insert into t select * from t;已创建11319行。SQL>SQL> insert into t select * from t;已创建22638行。SQL> comm
db支持共享模式连接的话shutdown通常会很慢(dispatcher shutdown)
dispatcher shutdownDuring shutdown immediate or normal, the shutdown process must wait for all the dispatchers to shutdown. As each dispatcher is signaled, the session that causes the shutdown is waits on this event until the requested dispatcher is no longer alive.[@more@]我们也可以通过命令手动shutdown dispatcher:SQL> alter system shutdown 'D000';System altered.SQL> alter system shutdown 'D001';System altered.SQL> alter system shutdown 'D002';System altered.SQL>--==================
Linux操作系统中内存buffer和cache的区别(转载)
看的很晕,记录一下,不过几个有关free命令显示出来的公式解释的很清楚原文连接:http://www.linuxdiyf.com/blog/?90293/action_viewspace_itemid_3004.html[@more@]Linux操作系统中内存buffer和cache的区别我们一开始,先从Free命令说起。free 命令相对于top 提供了更简洁的查看系统内存使用情况:$ freetotal used free shared buffers cachedMem: 255268 238332 16936 0 85540 126384-/+ buffers/cache: 26408 228860Swap: 265000 0 265000Mem:表示物理内存统计 -/+ buffers/cached:表示物理内存的缓存统计 Swap:表示硬盘上交换分区的
Oracle CPU Costing
原文连接:http://www.remote-dba.net/oracle_10g_tuning/t_oracle_cpu_costing.htmhttp://itspace.javaeye.com/blog/644780http://www.eggheadcafe.com/software/aspnet/35989389/what-does-the-costcpu-in-explain-plan-mean.aspxhttp://jonathanlewis.wordpress.com/2006/12/11/cost-is-time/[@more@]Oracle CPU CostingOracle Tips by Burleson ConsultingTurning on CPU CostingThe default setting for the optimizer cost model is CHOOSE, meaning that the presence of CBO statistics will influence whether or not CPU costs
oracle里的连接(connection)究竟是指什么
因为有图,所以没发把内容直接贴过来,直接看连接吧[@more@]http://www.itpub.net/thread-1338428-1-1.html
搜集一篇介绍logical rowid的好文章
Like indexes, IOTs are subject to inserts, deletes, block splits and coalsces, all of which affect the rowid. This means a standard rowid cannot always be used to retrieve an IOT record from a secondary index. For this reason secondary indexes on IOTs use a logical rowid which is made up of the original rowid and the primary key of the row. When a secondary index is referenced the rowid is used to find the block. If the block is not present at that disk address the primary key is used to find th
block corruption type
Type of block corruption in the datafile: ALL ZERO - Block header on disk contained only zeros. The block may be valid if it was never filled and if it is in an Oracle7 file. The buffer will be reformatted to the Oracle8 standard for an empty block.FRACTURED - Block header looks reasonable, but the front and back of the block are different versions.CHECKSUM - optional check value shows that the block is not self-consistent. It is impossible to determine exactly why the check value fails, but it