hp dp(data protector)使用大致配置步骤
整理一下,备查.[@more@]hp dp(data protector)使用大致配置步骤1.首选在连接带库的server上安装cell manager(在windows professional上能否安装不得而知,至少在xp home版上无法安装)2.在需要备份的db的server端安装dp client3.在cell manager中添加client,在添加之前最好在各自机器的hosts文件中加入双方的ip和hostname对应关系(有dns的情况下是否需要加入没有验证过)4.在cell manager中添加user,首先创建一个group,也可以使用安装cell manager时它自己创建的group(如admin group),之后在group中添加用户,这个用户用来验证client端连
监视index的使用看看是否需要重建!
我们知道index的key值被删除之后其使用的空间并不会理解释放,只有当这个index block空间完全不被使用之后才可以被再次使用,这也就是index的pctused为0的缘故。有些时候由于表中的数据被大量删除,此时index的leaf block中保留了很多没有用的key 值,不仅浪费了空间,而且再次使用该index时效率可能也极其低下,可以通过对index的监视以及对index结构的有效性验证来判断index是否需要重建,重建时在高可用性系统中当然还需要考虑lock的问题。[@more@]SQL> desc t 名称 是否为空? 类型 ---------
data buffer cache的一点总结。
这部分东西涉及的参数较多,感觉稍微有些乱,简单的总结一下。[@more@]SQL> show parameter db_block_sizeNAME TYPE VALUE------------------------------------ ----------- ------------------------------db_block_size integer 8192SQL> show parameter keepNAME TYPE VALUE------------------------------------ ----------- ------------------------------buffer_pool_keep stringcontrol_f
nls参数、环境变量以及函数等起作用的顺序!
nls参数、环境变量以及函数起作用的顺序是:instance级参数--->nls_lang--->session级参数--->函数。[@more@]C:>set nls_lang=SIMPLIFIED CHINESE_CHINA.ZHS16GBKC:>sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on 星期三 7月 29 21:01:38 2009Copyright (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 optionsSQL> show parameter nls_date_formatNAME
ASM Buffer Cache是用来做什么的!
10g在视图v$sga_dynamic_components中我们注意到多了一个component:ASM Buffer Cache,并且在instance_type=asm的实例中该参数有值,也就是说该参数是为asm实例所使用,它是用来做什么,在doc中搜了一下没找到,我猜测应该和db_cache_size的作用差不多,估计是用来cache disk header信息的。[@more@]SQL> select component,current_size from v$sga_dynamic_components;COMPONENT CURRENT_SIZE------------------------------ ------------shared pool 41943040large pool
使用call在sqlplus中调用procedure和funtion!
call 不可以使用在plsql中,只能在sqlplus中使用。[@more@]SQL> create or replace procedure proc_test2 is3 v_count number;4 begin5 select count(*) into v_count from tt;6 dbms_output.put_line(v_count);7 end;8 /过程已创建。SQL> set serveroutput onSQL> call proc_test();2调用完成。--使用call调用过程时即使过程没有参数依然要加上括号SQL> exec proc_test;2PL/SQL 过程已成功完成。SQL> create or replace function fun_test(p_a int , p_b int)2 return number3 is4 begin5 return p_a/p_b;6 end fun_test;
修改+asm的名字!
使用asm创建db时oracle缺省的asm实例的sid是+asm,这个sid有时候使用起来很不方便,比如我想通过plsql developer来查询和asm实例相关的视图:V$ASM_DISKGROUP、V$ASM_DISK等,因为这些视图有很多列,通过sqlplus直接查询很不方便;或者说我想远程连接asm实例,此时都需要通过配置tns来连接,既然通过tns来连,那么必然要配置listener,但是+是特殊符合,没法在listener中书写,因此为了使用方便,我们可以尝试修改+asm为asm或者其他名字,总之只要不含特殊字符能配置listener和tns就可以[@more@]在win下修改步骤大致是:(假设要把+asm->
11g视图dba_segments中增加了一个有用的segment_subtype字段!
以前我们要查一个segment所在的表空间是assm还是mssm,需要查看这个segment所在的表空间的segment_space_management 字段属性,在11g中不需要了,只需要查看dba_segments的segment_subtype就可以了,看似一个小小的改进,却给dba们带来了方便。[@more@]SQL> select segment_name,segment_type,segment_subtype,tablespace_name from dba_segments where owner='SYS' and segment_name='T';SEGMENT_NA SEGMENT_TYPE SEGMENT_SUBTYPE TABLESPACE---------- ------------------ -------------------- ----------T TABLE ASSM TESTSQL>
HWM下被使用了的block占hwm下所有block的百分比计算!
可以大致看一下hwm下有多少block是free的。[@more@]SQL> select count(*) from t; COUNT(*)---------- 126264SQL> delete from t where object_id<14000;已删除96216行。SQL> commit;提交完成。SQL> analyze table t compute statistics;表已分析。SQL> select blocks,empty_blocks,num_rows from dba_tables where table_name='T' and owner='SYS'; BLOCKS EMPTY_BLOCKS NUM_ROWS---------- ------------ ---------- 1756 36 30048SQL> select count(distinct dbms_rowid.rowid_block
About the Oracle Universal Installer Inventory!
The Oracle Universal Installer inventory stores information about all Oracle software products installed in all Oracle homes on a host, provided the product was installed using Oracle Universal Installer.Inventory information is stored in Extensible Markup Language (XML) format. The XML format allows for easier diagnosis of problems and faster loading of data. Any secure information is not stored directly in the inventory. As a result, during removal of some products, you may be prompted to ente
2篇对session产生sql跟踪信息的不错的文章!
http://www.eygle.com/case/Use.sql_trace.to.Diagnose.database.htmhttp://xiaoxiongg.itpub.net/post/6060/31115[@more@]http://www.eygle.com/case/Use.sql_trace.to.Diagnose.database.htmhttp://xiaoxiongg.itpub.net/post/6060/31115
字段avg_row_len of dba_tables是如何被计算的!
困扰了很久的一个问题![@more@]SQL> create table tt(id int , name varchar2(20)) tablespace users;表已创建。SQL> insert into tt values(1,'a');已创建 1 行。SQL> insert into tt values(2,'aa');已创建 1 行。SQL> insert into tt values(2,'aaa');已创建 1 行。SQL> insert into tt values(2,'aaaa');已创建 1 行。SQL> insert into tt values(2,'aaaaa');已创建 1 行。SQL> insert into tt values(2,'aaaaaa');已创建 1 行。SQL> insert into tt values(2,'aaaaaaa');已创建 1 行。SQL> insert into
利用trcsess合并以共享模式连接的session所产生的tracefile!
我们知道mts下存在多个process为一个session服务的情况,这样如果想开启该session的trace功能,那么产生的trace文件势必就有多个文件,如何把这个多个文件中的session信息提取出来就显的尤为重要,oracle提供的trcsess工具可以帮助我们,通过trcsess处理之后的tracefile就可以通过tkprof继续处理了。[@more@]SQL> select distinct sid from v$mystat;SID----------138SQL> select saddr,paddr,server,sid,serial# from v$session where sid=138;SADDR PADDR SERVER SID SERIAL#-------- -------- --------- ---------- ----------69
10g采用共享模式连接db产生的tracel文件放在了bdump中!
之前的版本貌似都放在了udump中...[@more@]SQL> select distinct sid from v$mystat; SID---------- 159SQL> select paddr,server from v$session where sid=159;PADDR SERVER-------- ---------6964C00C SHAREDSQL> alter session set sql_trace=true;会话已更改。SQL> select name,paddr from v$shared_server where paddr='6964C00C';NAME PADDR---- --------S000 6964C00CSQL> select pid,spid from v$process where addr='6964C00C'; PID SPID---------- ------------ 14 544SQL> sel
行连接的一点内部存储测试!
主要是验证一下block内部的一个"fb"标志The ‘fb’ value gives us flags about the row. ‘H’ means that we have the head of the row. ‘F’ means that we have the first piece of the row. ‘L’ means we also have the last piece of the row. Since this is the first and last piece of the row, the row is not chained. Since this is also the head of the row, the row has not been migrated.[@more@]SQL> create table tt(a char(2000),b char(2000),c char(2000) , d char(2000) ,e char(2000)) tablespac
获得tracefile name的脚步!
可以利用下面的脚本获得tracefile name,在11g可以非常方便的获得,其他版本相对比较麻烦。在oradebug中也很容易获得。[@more@]select pa.value ||decode(d.PLATFORM_NAME,'Microsoft Windows IA (32-bit)','','Microsoft Windows IA (64-bit)','','/') || i.instance_name || '_ora_' || pr.spid || '.trc' as trace_filefrom v$session s, v$process pr, v$parameter pa, v$instance i , v$database dwhere s.username = user and s.paddr = pr.addrand pa.name='user_dump_dest';
10g依然可以启动手动归档!
不细看doc还真不行。http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/archredo.htm#i1006731[@more@]SQL> shutdown immediate数据库已经关闭。已经卸载数据库。ORACLE 例程已经关闭。SQL> startup mountORACLE 例程已经启动。Total System Global Area 104857600 bytesFixed Size 1247540 bytesVariable Size 96470732 bytesDatabase Buffers 4194304 bytesRedo Buffers 2945024 bytes数据库装载完毕。--启用手动归档SQL> alter database archivelog
standby中RFS process的作用!
doc的原话,记录一下,加深印象。[@more@]Specifying the Mode of Log TransmissionThe two modes of transmitting archived logs to their destination are normal archiving transmission and standby transmission mode. Normal transmission involves transmitting files to a local disk. Standby transmission involves transmitting files through a network to either a local or remote standby database.Normal Transmission ModeIn normal transmission mode, the archiving destination is another disk drive of the databas
oracle 讲师
需要oracle讲师联系我![@more@]mobile:13840879243msn:xys_666888@hotmail.commail:yongsheng.xie@gmail.comqq:9020630个人简介:http://warehouse.itpub.net/post/777/403336整体过的一些文章:http://www.itpub.net/thread-911241-1-1.html
控制listener安全性的2篇不错的文章!
http://hi.baidu.com/edeed/blog/item/b8ad3901365c0f087bec2cca.htmlhttp://www.dbform.com/html/2009/771.html[@more@]http://hi.baidu.com/edeed/blog/item/b8ad3901365c0f087bec2cca.htmlhttp://www.dbform.com/html/2009/771.htmlhttp://www.itpub.net/viewthread.php?tid=1176759&highlight=%2Bwarehouse