学习系统包-DBMS_TTS
包DBMS_TTS用于检查表空间集合是否是自包含的,并在执行了检查之后,将违反自包含规则的信息写入到临时表TRANSPORT_SET_VIOLATIONS中。 在表空间传输的中...
学习系统包-DBMS_SPACE
1. unused_space 该过程用于返回对象(表、索引等)的未用空间。举例如下:编辑space.sql,内容如下:declaretotal_blocks number;total_bytes number;unused_blocks number;unused_bytes numb...
学习oracle系统包-DBMS_ROWID
包DBMS_ROWID用于再PL/SQL程序和SQL语句中取得行标识符的信息并建立rowid。1.取得特定rowid所对应的数据库。SQL> select dbms_rowid.rowid_block_number(rowid) from t; DBMS_ROWID.ROWID_BLOCK...
学习oracle系统包-DBMS_JOB
1.创建job。SQL> conn scott/tigerConnected.SQL> var jobno numberSQL> begin 2 dbms_job.submit(:jobno, 3 'dbms_ddl.analyze_object(''TABLE'', 4 ''SCOTT'',''EMP'',''COM...
初试RDA
1.RDA简介RDA is a set of command line diagnostic scripts that are executed by an enginewritten in the Perl programming language. RDA is used to gather detailedinformation about an Oracle environment;...
分区表管理
1. 分区的好处。Reduce the possibility of data corruption in multiple partitions Back up and recover each partition independently Control the mapping of partitions to disk drives (important for bal...
一个查找引起latch free的脚本
select to_char(sysdate,'yyyymmdd hh24:mi:ss') from dual;set echo onset pagesize 100 set linesize 100 COLUMN EVENT FORMAT A26 select event,sid,p1,p2,p3, SECONDS_IN_WAIT from v$session_wait where event ...
学习使用logminer
1.启用SUPPLEMENTAL LOG DATASQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA2. Extracting the Dictionary to a Flat File(1)添加字典文件存放路径,将以下参数添加到初始化参数文件里UTL_FILE_DIR = /oracle/da...
linux下升级oracle到9208
1.去metalink下载相应的升级包及cpu patch9208升级包:p4547809_92080_LINUX.zipcpu patch: p6646842_92080_LINUX.zip\opatch: p2617419_10102_GENERIC.zip2.执行升级过程整个升级过程与hp下升级oracle 9208基...
模拟行链接
1.创建测试表T,该表每一行长度8000个字节,由于block大小为8192字节,考虑到pct_free默认设置为10,则每个block将容纳不下每一行数据。 SQL> create table t (a char(2000),b char(2000),c char(2000),d char...
学习笔记二-nologging对move和rebuild操作的影响
1。测试nologging对move操作影响。(1)创建2个同样的表test1和test2,分别为logging和nologgingSQL> create table test logging as select * from sys.dba_objects; Table created. SQL> insert into t...
学习笔记-nologging与logging对DML操作的影响
目的:测试表的nologging与logging属性的区别。试验1:logging模式下,插入数据时产生的redo日志量。SQL> create table t as select * from sys.dba_objects; Table created. SQL> @mystat...
模拟试验之-外键未加索引导致死锁
session 1:scott@TEST>create table p(x int primary key); Table created. scott@TEST>create table c(x references p); Table created. scott@TEST>insert into p values(1); 1 r...
一个自动生成spreport的shell--by rollingpig(转)
#!/bin/ksh#Script. to auto genarate statspack report# Coding by Serol Luo, rollingpig@163.comusername=perfstatpass=perfstattargetdb=testdbfunction snap_id_list {sqlplus -S $username/$pass@$targetdb <...
裸设备上创建数据文件与删除表空间的某一个数据文件测试
一。 裸设备上创建数据文件测试 今天做一个在裸设备上创建数据文件的测试,裸设备大小为200m,尝试添加这个裸设备为数据文件:SQL> alter tablespace users add datafile '/dev/raw/raw1' size 200m;a...
查找数据库中未加索引的外键脚本
column columns format a30 word_wrappedcolumn tablename format a15 word_wrappedcolumn constraint_name format a15 word_wrappedselect table_name, constraint_name, cname1 || nvl2(c...