06 2013 档案
摘要:递归式查询:服务器端之间的查询迭代式查询:客户端与服务器端之间的查询
阅读全文
摘要:查看RMAN所有配置信息 [oracle@rac1 ~]$ rman target / Recovery Manager: Release 11.2.0.1.0 - Production on Thu Jun 27 11:51:59 2013 Copyright (c) 1982, 2009, Or
阅读全文
摘要:主要内容RMAN备份,还分为差异增量备份和累积增量备份.案例背景介绍RMAN备份工具如何使用RMAN做自动备份RAC库如何做RMAN增量备份现场调整某RAC生产库备份策略report schema;list backup summary;list copy;run{ allocate channel c1 device type dis; allocate channel c2 device type dis; allocate channel c3 device type dis; allocate channel c4 device ...
阅读全文
摘要:软件RAID技术RAID0/RAID1/RAID5LVM逻辑卷磁盘管理PV/VG/LV整合RAID和LVM的磁盘存储策略RAID原理RAID是一种把多个独立的硬盘按照不同方式组合起来形成一个磁盘组,从而提供比单个硬盘更高的存储性能和提供数据冗余的技术。不同的组织方式组成不同的RAID级别(RAID Levels).数据冗余的功能是在用户数据一旦发生损坏后,利用冗余信息可以使损坏数据得以恢复,从而保障了用户数据的安全性.在用户看来,组成的磁盘组就像是一个独立的整体的硬盘,对磁盘阵列的操作与单个硬盘一模一样.RAID级别目前共有7种基本的RAID级别常用RAID级别是level0,level1和l
阅读全文
摘要:Restricting and Sorting DataObjectivesAfter completing this lesson,you should be able to do the following:Limit the rows that are retrieved by a querySort the rows that are retrieved by a queryCharacter Strings and Dates列别名应当使用双引号字符串拼接或者日期信息,以及where子句中的数据,需要使用单引号Character strings and date values are
阅读全文
摘要:A null is a value that is unavailable,unassigned,unknown,or inapplicable.A null is ot the same as a zero or a blank space.
阅读全文
摘要:参考视频:[bbk5486]第4集 - 10g OCP之007研究[bbk5487]第5集 - 10g OCP之007研究[bbk5488]第6集 - 10g OCP之007研究Cluster table适合查询,因为聚簇表会将相关联的表信息数据存放在一个块中,这样读取数据时,会一次I/O读到全部信息,减少I/O,提高性能.多表联合查询.不适合DML操作;不适合TRUNCATE操作.不适合做全表扫描,因为你在进行I/O操作的时候,需要将相关联的、但是实际不需要的额外数据给读取出来,所以不适合全表扫描;聚簇表,分为基于索引的和基于哈希的;如果没有索引,是拒绝DML操作的.所以是先要进行创建索引,
阅读全文
摘要:1、如何创建cluster table?SQL> show userUSER is "HR"SQL> create cluster dept_emp_cluster(department_id number(4));Cluster created.SQL> create index idx_dept_emp_cluster on cluster dept_emp_cluster;Index created.SQL> create table dept cluster dept_emp_cluster(department_id) as select
阅读全文
摘要:1、Perl的4种变量Scalar:$纯变量,标量数组:@Hash:%文件:大写2、Perl变量的组成简单变量以$开头,+字符或者下划线字母,数字,下划线区分大小写 $var $VAR $Var变来那个长度不限$this_is_a_really_long_but_legal_name_that_is_different没有关键字,但是不要和内置变量重复$if可以 $_重复1、整数的表示1212e2(1200) e不分大小写-121_200_0000012 八进制数,值为100x1f 十六进制数,值为31 f不区分大小写#!/usr/bin/perl$int=1_200_000;print &q
阅读全文
摘要:参考视频:[bbk4345]小布-OCP 042全真试题讲解在非归档模式下,你只能做冷备;做热备是无法保证数据的一致性的.在归档模式下,是可以做热备的,其原理是根据归档日志文件来实现数据的一致性.1、Your test database is running in NOARCHIVELOG mode.What are the implications of this?You can perform open database backups.You can perform closed database backups.You cannot perform schemal-level logi
阅读全文
摘要:参考视频:[bbk4343]小布-OCP 042全真试题讲解什么叫commit?commit就是oracle server process将redo log buffer中的数据,写到redo log file中.1、Which naming method uses the tnsnames.ora file to store connect descriptor used by the client while connecting to the database instance from a remote machine?A.host naming methodB.local namin
阅读全文
摘要:参考视频:[bbk4343]小布-OCP 042全真试题讲解1、You are in the middle of a transaction and very crucial data has been modified.Because of a hardware failure,the instance has shutdown before synchronizing all the database files.Which two statements are true ? (Choose two.)A.On startup,SMON coordinates instnace recov
阅读全文
摘要:1、调整snap levelSQL>exec statspack.Snap(i_snap_level=>6,i_modify_parameter=>'TRUE');
阅读全文
摘要:1、我们研究了一下这几个SQL,发现其中几个SQL都是对一张300万条记录的表做全表扫描,而从SQL来看,每次返回的记录只有几条,这种情况下,完全是可以通过索引来访问的.添加了一个复合索引后,这几个TOP SQL的性能有了明显的改善,SQL的成本下降了99%,过了几分钟CPU也出现了久违的IDLE,系统性能得到了明显的改善.启示
阅读全文
摘要:对于数据库数据的采集,可以通过多种方式进行。首先,进行一次Statspack分析 对于Oracle 8i以前的版本,可以使用bstat/estst工具进行采集数据; 对于Oracle10g或者更新的版本,可以使用AWR报告、ADDM报告和ASH报告。根据Statspack报告,可以分析出很多数据库目前的状态信息。根据这些情况,在进行进一步分析。如果你使用的是Oracle10g或者更高的版本,还可以通过ASH来分析会话的情况. 其次,toad也是一个数据库状态采集很有效的工具。通过toad中的健康检查工具,可以找出目前系统中的不健康因素。通过SGA工具,可以定位开销比较大的SQL语句. ...
阅读全文
摘要:常见问题:EXP-00091: Exporting questionable statistics(参考文章http://hi.baidu.com/weihua0722/item/c52d9cdbb6c3264fddf9be0f)...解决思路: 通常情况下,在数据库数据导入导出的问题,主要是由于服务器端的字符集与客户端的字符集设置不一致导致的.然而我们一般不会轻易的去修改数据库服务器端的字符集,那么我们就从客户端的字符集设置修改入手.前提是我们首先要知道当前情况下,服务器端的字符集及客户端的字符集是什么?如何探测出服务器端、客户端的字符集信息,请参考文章:http://www.cnblog.
阅读全文
摘要:1、操作系统的字符集[oracle@arcerzhang perl]$ echo $LANGen_US.UTF-8View Code 2、Oracle 客户端的字符集[oracle@arcerzhang perl]$ echo $NLS_LANGView Code 3、数据库服务器的字符集SQL> ...
阅读全文
摘要:Unix manual pages(online documentation):man perlhttp://www.perl.orghttp://www.perl.comhttp://www.cpan.orghttp://www.activestate.comhttp://www.oreilly.com
阅读全文
摘要:1、连接数据库#!/usr/bin/perluse strict;use DBI;my $tnsname = "DB234";my $username = "SCOTT";my $password = "TIGER";my $dbh = DBI->connect("dbi:Oracle:$tnsname",$username,$password) or die "Cannot connect db : $DBI::errstr\n";print "I have connect t
阅读全文
摘要:1、安装之前,先检查一下当前系统中Perl的版本[root@arcerzhang ~]# perl -vThis is perl, v5.10.1 (*) built for x86_64-linux-thread-multiCopyright 1987-2009, Larry WallPerl may be copied only under the terms of either the Artistic License or theGNU General Public License, which may be found in the Perl 5 source kit.Complet
阅读全文
摘要:Here is some pretty good code piece to check it:#!/usr/bin/perluse strict;use ExtUtils::Installed;my $inst=ExtUtils::Installed->new();my @modules = $inst->modules();foreach(@modules){ my $ver = $inst->version($_) || "???"; printf("%-12s -- %s\n",$_,$ver);}exit;View Code
阅读全文
摘要:Oracle10G以前执行drop table后表就即被删除了。10G后引入了垃圾回收站的概念recyclebin。如果仍只是drop table xxx,表不会立即被删除,而是被暂时放入回收站。 可以保障某些误操作后还可以将表还原。 1.查看数据库是否开户recyclebin功能 SQL> sho...
阅读全文
摘要:1、oracle 10g oracle 11g,数据库同步归档 对外查询在oracle 10g中,备库与主库之间的同步归档与备库的对外查询功能是二选一的,要么只能与主库进行同步归档功能,要么只能对外查询,二者不可以同时兼容存在;在oracle 11g中,备库与主库之间的同步归档与备库的对外查询功能是可以同时存在的.
阅读全文
摘要:1、查看哪些文件需要进行RMAN 备份?RMAN> report need backup;RMAN retention policy will be applied to the commandRMAN retention policy is set to redundancy 1Report of...
阅读全文
摘要:RAC集群软件存在两大核心部分:表决磁盘、OCR.脚本1、a_preusers.sh#!/bin/bash#Purpose:Create 6 groups named 'oinstall','dba','asmadmin','asmdba','asmoper','oper', plus 2 users named 'oracle','grid'.#Also setting the Environment#variable for oracle user.#variab
阅读全文
摘要:参考视频[bbk4436]第1集 - Oracle 11g DataGuard 概述[bbk4437]第2集 - Oracle 11g DataGuard 概述[bbk4742]第3集 - 创建一个物理备库[bbk4743]第4集 - 创建一个物理备库Steps to Create a Physical Standby DatabasePrepare the primary database.Set parameters on the physical standby database.Configure Oracle Net Services.Start the standby databa
阅读全文
摘要:查看数据库中log file信息SQL> col member format a50SQL> select group#,status,type,member from v$logfile; GROUP# STATUS TYPE MEMBER---------- ------- ------- -------------------------------------------------- 3 ONLINE D:\APP\MARYHU\ORADATA\ARCERZHANGDB\REDO03.LOG 2 ONLI...
阅读全文
摘要:如何将数据库设置成FORCE LOGGING模式?执行此命令可以在mount或者Open状态都可以.假如在open状态执行此命令,执行过程会消耗很长时间;推荐在mount状态下执行.SQL>ALTER DATABASE FORCE LOGGING;View Code FORCE LOGGING ModeFORCE LOGGING mode is recommeded to ensure data consistency.FORCE LOGGING forces redo to be generated even when NOLOGGING operations are executed
阅读全文
摘要:mkdir .sshchmod 700 .ssh/usr/bin/ssh-keygen -t dsassh rac2 cat .ssh/authorized_keys >> authorized_keysscp authorized_keys rac1:.ssh/authorized_keys这一块要对双节点全执行一遍对自己也还要执行$ssh rac1 date $ssh rac1-priv date $ssh rac2 date $ssh rac2-priv date
阅读全文
摘要:参考视频:[bbk5218] 第1集 - Oracle 11gR2 RAC Installation - 01[bbk5211] 第2集 - Oracle 11gR2 RAC Installation - 02[bbk5218] 第3集 - Oracle 11gR2 RAC Installation - 03[bbk5226] 第4集 - Oracle 11gR2 RAC Installation - 04[bbk5231] 第5集 - Oracle 11gR2 RAC Installation - 05[bbk5239] 第6集 - Oracle 11gR2 RAC Installation
阅读全文
摘要:CentOS下网络配置方法 在Linux的系统下如何才能修改IP信息 以前总是用ifconfig修改,重启后总是得重做。如果修改配置文件,就不用那么麻烦了~ A、修改ip地址 即时生效: # ifconfig eth0 192.168.0.20 netmask 255.255.255.0 启动生效:
阅读全文
摘要:Ref:Oracle@Database Reference,Part IIIv$asm_disk(_stat)v$asm_diskgroup(_stat)v$asm_operationv$asm_clientv$asm_filev$asm_templatev$asm_alias
阅读全文
摘要:AMS Installation Best PracticesFor higher availability and manageability ,it is recommended that the ASM instance be installed in a separate ORACLE_HOME than the database ORACLE_HOME.为了便于对oracle instance及ams instance的管理,建议将二者各自的安装目录不放在一起.This separation of ORACLE_HOMEs,allows independent upgrades of
阅读全文
摘要:一个ASM instance可以服务于一个或者一个以上的oracle instance.
阅读全文
摘要:->->ReblanceASM Files are equally spread across all disk in a Disk Group.Storage reconfiguration(add/drop/failure) leads to a need to rebalance.Rebalance is done automatically while Disk Group is online and only one extent is locked at a time.Disk add=> Share of file extents from all curren
阅读全文
摘要:ASM一个文件是不可能横跨DISK GROUP的.但是一个disk group里面可以存放多个文件.一个文件可以跨越多个DISK,实现Load Blance的方式方法之一.------>
阅读全文
摘要:Node Startup SequenceOperating SystemOracle ClusterwareVIP1ASMInstance 1ListnerServiceOracle Dependencies Prior to 10.2.0.3在oracle 10.2.0.3之前,如果出现VIP1漂移的情况,Oracle会把VIP1所在节点的instance及linsnter给down掉.当vip1修复完成之后,需要重启lisnter及instance;在oracle10.2.0.3之后,即使vip出现漂移,所在节点的lisnter及instance不会被down掉,恢复回来之后,可以立即使
阅读全文
摘要:阿斯顿飞
阅读全文
摘要:/****************************Install Lab****************************/Run CVU "post hwos" and fix any missing prereqsRun CVU pre/post all install stagesInstall Oracle Clusterware 10.2OCR and Voting Disk on raw devicesInstall RAC 10.2Use ASM for database storageApply 10.2.0.4 patchset
阅读全文
摘要:阿斯顿发水电费
阅读全文
摘要:而打算
阅读全文
摘要:1.CRS架构Cluster Synchronization Services (CSS)—管理群集配置,谁是成员、谁来、谁走,通知成员。Cluster Ready Services (CRS)—管理群集内高可用操作的主要程序,crs管理的全部内容都被看作资源,包括数据库、实例、服务、监听器、vip地址、应用进程等。Crs进程根据OCR中的配置信息管理群集资源,包括启动、停止、监视和容错操作。当某个资源的状态发生改变时,crs进程产生事件。RAC安装完成后,crs进程监视各种资源,发生异常时自动重启该资源,一般来说重启5次,如不成功不再尝试。Event Management (EVM)—后台进
阅读全文
摘要:
阅读全文
摘要:艾丝凡
阅读全文
摘要:阿斯顿飞
阅读全文
摘要:asdf
阅读全文
摘要:asdf
阅读全文
摘要:[系列50-共18集]Oracle公司 - Oracle RAC Workshop培训[系列51-共6集]Oracle公司 - Oracle 11g R2 RAC Hands on Training[系列59-共6集]小布 -Oracle 11gR2 RAC Installation[系列93-共15集]黄伟 -Oracle 11g R2 RAC + DG高端实战[系列145-共4集]King -Oracle RAC系列培训[系列219-共6集]Luocs - Oracle 11g R2 RAC安装系列培训[系列230-共2集]黄伟 - 黄伟之RAC生产库现场调整备份策略实战
阅读全文
摘要:Selecting the Right Linux SoftwareIP AddressUsers and GroupsThe Directory LayoutOracle SID
阅读全文
摘要:Grid Infrastructure这个软件包含了集群软件及ASM软件.ObjectivesAfter competing this seminar,you should be able to do the following:Learn the detailed process to setup Oracle 11gR2 RACLearn how to startup and shutdown RACLearn the basic administration method about RACRAC ArchitectureInterconnected nodes act as a sin
阅读全文
摘要:复制数据库,采用目标数据库的备份可以进行;Active source database ---> TCP/IP ---> Destination or AUXILIARY databaseDuplicating a DatabaseWith network(no backups required)Including customized spfileVia Enterprise Manager or RMAN command linePerforming Active Database DuplicationThe RMAN DUPLICATE Command采用命令行方式克隆数据
阅读全文
摘要:复制数据库两种方式:采用命令行方式采用OEM方式Ensuring That Backups and Archived Redo Log Files Are AvailableBackups of all target database files must be accessible on the duplicate host.Backups can be a combination of full and incremental backups.Archived redo log files needed to recover the duplicate database must be a
阅读全文
摘要:a说都发生
阅读全文
摘要:ObjectivesAfter completing this lesson,you should be able to :List the purpose of creating a duplicate database.Choose a technique for duplicating a database.Duplicate a database with RMANUse an RMAN backup to duplicate a databaseDuplicate a database based on a running instanceUsing a Duplicate Data
阅读全文
摘要:检查数据库中存在的外部表,外部文件:SQL> show userUSER is "SYS"SQL> declare 2 external boolean; 3 begin 4 external := dbms_tdb.check_external; 5 end; 6 /PL/SQL procedure successfully completed.SQL> set serverout onSQL> /The following external tables exist in the database:SH.SALES_TRANSACTIONS_EX
阅读全文
摘要:1、来自动态性能视图v$tempfile,临时文件信息SQL> select file#,name from v$tempfile; FILE# NAME---------- ------------------------------------------------------------ 1 D:\APP\MARYHU\ORADATA\ARCERZHANGDB\TEMP01.DBFView Code 2、添加临时文件alter tablespace tempadd tempfile 'f:\app\user\oradata\kelongdb\temp01.dbf...
阅读全文
摘要:Transporting DatabasesGeneralize the transportable tablespace featureData subsets can easily be distributed from a data warehorsing enviroment to data marts,which are usually on smaller platforms.A database can be migrated from one platform to another very quickly.Database Transportation Procedure:S
阅读全文
摘要:一般都是以哪些方式打开,举例;
阅读全文
摘要:查看哪些用户下的数据,存放在表空间里面?SQL> select owner,segment_name from dba_segments 2 where tablespace_name = 'TAB_U2';OWNER SEGMENT_NAME------------------------------ ------------------------------U2 EMP1U2 TU2 ...
阅读全文
摘要:Imp、exp、impdp、expdp都是属于逻辑导出数据,也就是说需要逐个将元数据及数据本身导出导入.采用可传输表空间的移植数据,是最快移植数据方式.可传输表空间,支持跨平台,不同的平台间的数据移植.平台不一样,文件的高地位编码就不一样.但是两个平台之间要有相同的字符集.Transporting TablespacesCross-platform transportable tablespaces:-Simplify moving data between data warehouse and data marts-Allow database migration from one plat
阅读全文
摘要:案例场景: 源数据库:windows 32bit + oracle 9i 目标数据库: suse linux 64bit + oracle 10g思路:构建一个standby database,与oracle 9i数据库同步升级standby database 9i 到 10g,同样是在windows平台将windows standby 10g,数据迁移至suse linux 64bit;使用rman将备库中的字符集格式转换成与目标数据库的字符集一致.修改数据文件的编码保持一致;做少上述工作之后开始移植.
阅读全文
摘要:以前市场上大都是512字节的磁盘,现在Oracle提供了4K扇区的磁盘,大大提高了I/O效率通过可传输表空间,实现数据移植,平台间的移植;通过可传输数据库,实现数据库整体移植.Oracle可以不通过操作系统,直接操作物理磁盘,大大提高存储效率.采用逻辑块访问,效率比访问直接物理地址要快.数据库管理的核心,主要涉及到文件存储相关的管理配置.SQL> select group#,blocksize from v$log; GROUP# BLOCKSIZE---------- ---------- 1 512 2 512 ...
阅读全文
摘要:SQL> select name,value from v$sysstat where name like '%redo%';NAME VALUE---------------------------------------------------------------- ----------redo synch writes 40988redo synch t...
阅读全文
摘要:/* 项目案例:有一个事务,需要执行20小时,假如在执行过程中执行到第19个半的时候,突然遇到了空间不足的情况,此时运行的事务就会报错,错误解决后事务将不再执行,也就意味着之前的19个半小时全部前功尽弃,此种事务叫做不可恢复性事务;现在我们提供一种遇到空间不足的情况的事务,在中止暂停之后,等分配完自由空间之后,还能够继续执行的解决方案.*/实现可恢复性空间分配的功能(可恢复模式),需要在系统或者session级别开启此项功能,这样一旦事务运行过程中出现空间不足的情况,所有的事务资源将被挂起,不会被释放,知道有足够的资源可以供事务使用.假如空间分配问题一直没有得到解决,事务并不是始终处于挂起状.
阅读全文
摘要:如何开启可恢复性空间分配功能?在系统级别开启可恢复性分配模式功能ALTER SYSTEM ENABLE RESUMABLE在session级别开启可恢复性空间分配模式功能ALTER SESSION ENABLE RESUMABLE;INSERT INTO sales_new SELECT * FROM sh.sales;ALTER SESSION DISABLE RESUMABLE;如何开启ASSM功能?
阅读全文
摘要:Reclamining Space Within ASSM SegmentsOnline and in-place operationApplicable only to segments residing in ASSM tablespacesCandidate segment types:Heap-organized tables and index-organized tablesIndexesPartitions and subpartitionsMaterialized views and materialized view logsSegment Advisor:OverviewM
阅读全文
摘要:参看博文:http://www.cnblogs.com/arcer/archive/2013/06/09/3128254.html
阅读全文
摘要:/* create table --- emp1 delete shrink space*/1、创建表emp1,构建大数据SQL> select count(*) from emp1; COUNT(*)---------- 229376View Code SQL> select segment_name,blocks from user_segments where segment_name = 'EMP1';SEGMENT_NAME BLOCKS-------------------------...
阅读全文
摘要:Proactive Tablespace MonitoringThreshold and Resolving Space ProblemsLocally managed tablespace Resolve space problem by:Adding or resizing data fileSetting AUTOEXTEND ONShrinking objectsReducing UNDO_RETENTIONChecking for long-running queried in temporary tablespacesMonitoring Tablespace Space Usag
阅读全文
摘要:/* 实验目的:对比压缩表和非压缩表之间的区别 实验步骤:create table -- emp3insert datacreate table -- emp1 -- nocompressshow spacecreate table -- emp1 -- compress -- basicshow spaceinsert record --create table -- emp2 -- compress - oltpinsert record --show space*/--建表SQL> create table emp3 select * from emp;--录入数据insert i
阅读全文
摘要:SQL> analyze table emp1 compute statistics;Table analyzed.SQL> select table_name,blocks from user_tables;TABLE_NAME BLOCKS------------------------------ ----------EMP3 499EMP1 338T ...
阅读全文
摘要:在oracle 9i版本中,表的压缩技术就已经引入.oracle可以做到,直接读取压缩的数据,不用解压再读取,大大提高了读写效率.压缩后,存储空间减少,占用的块也会减少,读取时I/O必然也会减少,自然而然地性能就提高了.关键是在读取的时候不需要解压,即可进行读取,如此更加大大提高读取的速率.Table Compression:OverviewReducing storage costs by compressing all data:Basic compression for direct-path insert operations:10xOLTP compression for all D
阅读全文
摘要:/* 小实验:在11g下创建表、索引等段信息,在不插入数据的情况下查看其段信息是否产生,这是Oracle 11g r2的一个改进;对比oracle 10g版本的功能就会清晰可见;*/SQL> conn test/testConnected.SQL> select table_name,min_extents from user_tables;TABLE_NAME MIN_EXTENTS------------------------------ -----------EMP1 1S...
阅读全文
摘要:BitMap信息是保存在段头信息.录入信息的时候,就是直接读取段头信息,不在读取数据字典中的信息;以前使用数据字典方式进行管理的时候,当多用户多并发的操作发生时,就会发生高负荷的读写系统表空间的操作,增加系统负荷.因为数据字典的信息是存放在系统表空间当中的.段就是存储各种类型数据的对象,段的空间分配是通过extent来实现的.oracle采用延迟创建段技术,提高效率;当一个表创建的时候,不给它创建对应的段空间信息,只有在使用的时候才创建;没有段信息的索引或者分区索引是不可用的.在10g以前的版本中,将索引置为不可用的时候,其所占用的空间依然是存在的;在10g,11g之后,删除了或者设为不可用之
阅读全文
摘要:PCTFREE参数的用途:主要是用来保障UPDATE操作的顺利执行,假如在一个block中的数据,都已经满了的情况下,假如再想更新块中的数据的时候,就无法直接保存在本块中了,就会产生row chain or row migration,存放在其他块中,这样本来可以通过一个块就能操作的步骤,现在必须通过读取两个块来完成,影响了执行效率,降低了性能.PCTFREE参数值,如果表本身修改的比较频繁,那么此值就可以设置的大一点,否则可以设置小一点.如果是数据仓库系统,此值就可以设置为0,因为不存在数据修改.使用自动段管理的前提,表空间必须是本地管理方式.row migration:当修改某一行数据的时
阅读全文
摘要:Oracle对于表空间的管理,提供两种方式:自动和手工Oracle 11g以后,表压缩的功能不仅仅适用于数据仓库系统,也适用于联机交易系统;段是如何创建的,创建之后是如何分配的?对于表空间的管理,分为数据字典方式管理和本地管理两种: 数据字典的方式,就是说将表空间中的segment、extent等信息以数据字典记录的方式进行管理,读取表空间使用情况信息的时候,直接通过数据字典方式获取; 地管理方式,其原理是通过将空间管理的信息存放在数据文件本上的头信息中,摆脱之前的数据字典方式管理,更加直接方便有效.ObjectivesAfter completing this lesson,you sh..
阅读全文
摘要:Segment AdvisorCompression Advisor
阅读全文
摘要:SQL> edWrote file afiedt.buf 1 create table ext_emp2 2 ( 3 employee_id, 4 last_name, 5 salary, 6 department_id 7 ) 8 organization external 9 ( 10 type oracle_datapump 11 default directory test_dir 12 location ('emp1.dat') 13 ) 14 as 15* select employee_id,...
阅读全文
摘要:[oracle@arcerzhang data_pump]$ sqlplus test/testSQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 7 16:24:06 2013Copyright (c) 1982, 2009, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining a.
阅读全文
摘要:SQL> spool /RealData/oracle/backup/emp1.txtSQL>SQL> !lsdata_pump emp1.txt FGPS_BACKUPSQL> select employee_id||','||last_name||','||salary||','||department_id from emp1;EMPLOYEE_ID||','||LAST_NAME||','||SALARY||','||DEPARTMENT_ID------------
阅读全文
摘要:Oracle 数据引擎ORACLE_LOADER 用户只能从外部读取表数据,但是不能将数据库中的数据卸载到操作系统文件中.ORACLE_DATAPUMP 用户不仅可以从外部表中读取数据,同时可以将数据库中复杂的数据查询后卸载到操作系统文件中.External TablesExternal tables are read-only tables stored as files on the operating outside of the Oracle database.External Table BenefitsData can be used directly from the exter
阅读全文
摘要:set heading on|offSQL> set heading offSQL> select * from dba_directories;SYS TEST_DIR /RealData/oracle/backup/data_pumpSYS SUBDIR /RealData/oracle/demo/schema/order_entry//2002/SepSYS ...
阅读全文
摘要:使用SQL*Loader可以替换已有的数据.在SQL*Loader中replace这种命令就可以.truncate与sql loader中的replace有什么区别,truncate要比replace快,使用replace 进行数据替换之前,首先得先删除原有的数据,然后再添加新的数据,replace的删除,会触发删除对应的触发器,而truncate则不会.sql loader可以过滤掉无效的数据,将不符合条件的数据排除在数据库之外.使用sql loader可以从多个数据源中加载,加载到数据库中的时候可以插入到多个数据库表中.执行sql loader的时候,需要将操作系统上的执行批量作业的功能打
阅读全文
摘要:本集视频与上集视频为一个整体,具体内容参照上片文章.
阅读全文
摘要:参考博文:http://www.cnblogs.com/arcer/archive/2013/06/07/3123602.htmlexpdp ARCER/ARCER dumpfile=fgps_20130711.dmp directory=dmp_dir logfile=fgps_20130711.logView Code
阅读全文
摘要:/*实验目的:使用impdp and expdmp实验步骤:test user ->create table -> emp1test user -> create index -> emp1create directory -> test_dir -> grantgrant create any directory to test;--授权创建目录对象create directory test_dir as '/RealData/oracle/backup/data_pump';--创建目录对象drop directory test_dir;
阅读全文
摘要:Data Pump Export using Database ControlData Pump Export Example:Basic OptionsData Pump Export Example:Advanced OptionsData Pump Export Example:FilesData Pump Export Example:ScheduleData Pump Export Example:ReviewData Pump Import Example:impdpData Pump Import:Transformations在原来的导入导出过程中,假如导出的表所在表空间为sy
阅读全文
摘要:Login as sysman user to the database and execute the following :execute MGMT_USER.MAKE_EM_USER('ARCER');//标红处为需要导出导入权限的用户的用户名备注:假如你没有开启SYSMAN用户,自行开启;
阅读全文
摘要:Directory Object(目录对象)其拥有者是SYS;Directory Objects for Data PumpCreating Directory ObjectsData Pump Export and Import Clients :OverviewData Pump导出、导入原理:在导入、导出过程中,进程会创建一个Master Table来记录实时的导入、导出的状态信息,一旦导入、导出操作完成,这个Master Table便会被进程清除;Database link(DBLINK)实现Source与Target之间的直接导入导出工作.Data Pump Utility:Inte
阅读全文
摘要:数据泵与原始Imp、exp命令比较Data pump是一个服务器端的工具;数据泵可以实现暂停功能;imp、exp是一个客户端的工具;Oracle Data Pump:OverviewAs a server-based facility for high-speed data and metadata movement,Oracle Data Pump:Is callable via DBMS_DATAPUMPProvides the following toolsexpdpimpdpWeb-based interfaceProvides four data movement methodsDa
阅读全文
摘要:ObjectivesAfter completing this lesson,you should be able to:Describe ways to move dataCreate and use directory objectsUse SQL*Loader to load data from a non-Oracle database(or user files)Use external tables to move data via platform-independent filesExplain the general architecture of Oracle Data P
阅读全文
摘要:The Data Recovery Advisor handles both cases:when you cannot start up the database (because some required database files are missing,inconsistent,or corrupted) and when file corruptions are discovered during run time.TrueFlaseWhich of the following checks can the Health Monitor Perform?Intuitive com
阅读全文
摘要:健康检查项目指标信息SQL> select name,internal_check,offline_capable,description from v$hm_check order by 2,3;NAME I O DESCRIPTION------------------------------ - - ---------------------------------------------Transaction Integrity Check N N Checks a transaction for corruptionsDict...
阅读全文
摘要:Automatic Diagnostic WorkflowAutomatic Diagnostic Repository查看ADR(Automatic Diagnositc Repository)方法有三:通过OEM support workbenchADRCI - ADR Command-Line(ADR命令行)V$DIAG_INFO(动态性能视图)The ADR Command-Line Tool(ADRCI)ADRCI procides interaction with ADR from an operating system prompt.Using ADRCI,you can vie
阅读全文
摘要:参考博文:http://www.cnblogs.com/arcer/archive/2013/06/05/3119511.html
阅读全文
摘要:合并于上一章节:http://www.cnblogs.com/arcer/archive/2013/06/05/3119511.html
阅读全文
摘要:安装Oracle的时候碰到也是这样的问题,刚好在网上搜到了一篇很好的文章。转载在这里,给方便自己以后学习。 原文链接:http://www.iteye.com/problems/62745好像从oracle10开始,就没有enterprise console manager(有没有写错?)这个东西了,只能通过类似http://localhost:5500/em打开,于是打开http://localhost:5500/em,打不开,想到dbconsole可能没起动,于是在服务中启动,结果启动不了。于是做如下操作希望能启动。1、在cmd下,照网上资料:在命令行下输入 emctl start dbc
阅读全文
摘要:sqlplus以管理员方式接入数据库,启动时出现报错,如下:> sqlplus "/as sysdba"SQL> startup......ORA-01157: cannot identify/lock data file 8 - see DBWR trace fileORA-01110: data file 8: '/tmp/test.dbf'查看数据库日志文件alert_$ORACLE_SID.log,存在对应报错信息:Errors in file ....../aix85_psp0_454886.trc:查看此trc文件中记录信息:***
阅读全文
摘要:/* 实验目的:db_block corrupt recover*/configarchive logflashbackparametercreate tablespace---app_testbackup-rman破坏check block-dbv-rmanstartuprecover blockcheck block1、configSQL> archive log list;Database log mode Archive ModeAutomatic archival EnabledArchive destination ...
阅读全文
摘要:查看alert文件,是否存在ora-01578错误,便可知晓.
阅读全文
摘要:oracle在内存中操作数据块,达到一定条件后,往磁盘文件上去读或者写的时候,会检查是否存在坏块.db_block_checksum参数设置成off的时候,Oracle只针对系统表空间的数据块进行检查,非系统表空间则不关心.假如db_block_checksum=typical,oracle会在由内存写到磁盘的时候,会检查是否存在坏块.假如db_block_checksum=full,oracle会在执行DML操作之前,都会检查是否存在坏块.不管是内存中的还是磁盘上的块,只要发生insert,delete,update发生多少次就会检查多少次,如果是内存中的,当往磁盘中写的时候还要检查,提高了
阅读全文
摘要:What is blokc corruption?Whenver a block is read or written,a consistency check is performed.Block versionDBA(data block address) value in cache as compared to the DBA value in the block bufferBlcok-checjsum,if enabledA corrupt block is identified as being one of the following:Media corruptLogically
阅读全文
摘要:参考文章:http://www.cnblogs.com/arcer/admin/EditPosts.aspx?postid=3118718&update=1
阅读全文
摘要:/* 说明:oracle 11g才拥有数据库恢复专家功能 实验目的:使用数据库恢复专家恢复数据库 实验步骤:tablespace--app_databackup---datafile-app_data_01.dbf-rman破坏recover-data recover advisor-rman */1、准备实验环境 创建表空间APP_DATA 创建用户TESTSQL> CREATE TABLESPACE APP_DATA DATAFILE 'D:\APP\MARYHU\ORADATA\ARCERZHANGDB\APP_DATA_01.dbf' SIZE 200M AUTO
阅读全文
摘要:数据库恢复专家,在进行修复的时候,有2个项选,其中之一是无损修复,另外一种是有损修复,可供DBA选择.执行ADVISE FAILURE与REPAIR FAILURE命令,必须是在同一个SESSION当中.修复工作,是无法并发操作的.使用数据库恢复专家,有两种途径:OEM方式及Manual方式,接下来介绍一下Manual方式Listing Data FailuresThe RMAN LIST FAILURE command lists previously executed failure assessment.Including newly diagnosed failuresRemoving
阅读全文
摘要:Data Recovery AdvisorReducing down time by eliminating confusion:Data FailuresData Failure:ExamplesNot accessible components,for example:Missing data files at the OS levelIncorrect access permissionsOffline tablespace,and so onPhysical corruptions,such as block checksum failures or invalid block hea
阅读全文
摘要:oracle 10g、11g能够做到恢复指定的、被破坏的块.ObjectivesAfter completing this lesson,you should be able to :Detect and repair database corruptionHandle block corruptionSet up Automatic Diagnostic RepositoryRun health checksData Recovery AdvisorFast detection,analysis,and repair of failuresMinimizing disruptions for
阅读全文
摘要:SQL Performance Analyzer : OverviewTarget users:DBAs,QAs,application developersHelps predict the impact of system changes on SQL workload response time.Builds different versions of SQL workload performance (that is,SQL execution plans and execution statistics)Executes SQL serially(concurrency not ho
阅读全文
摘要:SQL Access Advisor:OverviewTypical SQL Access Advisor SessionWorkload SourceRecommendation OptionsReviewing Recommendations
阅读全文
摘要:Using the SQL Tuning AdvisorUse the SQL Tuning Advisor to analyze SQL statements and obtain performance recommedationsSources for SQL Tuning Advisor to analyze:Top Activety:Analyzes the top SQL statements currently activeSQL Tuning Set:Analyzes a set of SQL statements you provideHistorical SQL(AWR):
阅读全文
ORA-19815: WARNING: db_recovery_file_dest_size of 5218762752 bytes is 100.00% used, and has 0 remain
摘要:今天一个同学问的一个有关数据库的问题,我看了一下alert日志,发现有以下报错信息。现记录下来,以备后用ORA-19815: WARNING: db_recovery_file_dest_size of 5218762752 bytes is 100.00% used, and has 0 rema...
阅读全文
摘要:AWR能够帮助DBA识别占用资源最多的SQL语句.SQL Tune Advisor执行步骤捕获到占用资源较多的SQLAdvisor对捕获到的、占用资源较多的SQL进行分析Advisor产生建议的SQL执行实施SQLSQL Tuning Advisor:OverviewAutomatic SQL Tuning:OverviewAutomatic SQL Tuning automates the entire SQL tuning process and replaces manual SQL tuning.Optimizer modes:Normal modes:Tuning mode or A
阅读全文
摘要:oracle的智能体现:oracle在AWR执行完成一次快照收集之后,ADDM会自动监控本次收集快照之后发现的影响性能的SQL或者其他组件,然后自动调用相应的Advisor进行分析,被报告出分析结果.ObjectivesAfter completing this lesson,you should be able to :Use the SQL Tuning Advisor to:-Identify SQL statements that are using the most resources-Tune SQL statements that are using the most resou
阅读全文
摘要:oracle搜集表的信息,并不是每张表都搜集,一下若干种情况,会被搜集到:统计信息是空的表,会被搜集达到一定比例的表,会被搜集在搜集表信息的时候,加上CASCADE关键字之后,就会搜集此表相关的索引等信息.Statistics Preferences:OverviewUsing Statistics PreferencesPUBLISH:Used to decide whether to publish the statistics to the dictionary or to store them in a pending area before.publish the statistic
阅读全文
摘要:Optimizer Statistics CollectionWays to collect statistics:-Automatically:Automatic Maintenance Tasks(自动搜集统计数据信息的功能,是自oracle10g以后才有的)查看系统里的job信息SQL> select owner,job_name from dba_scheduler_jobs;OWNER JOB_NAME------------------------------ ------------------------------SYS ...
阅读全文
摘要:1、analyze table emp1 compute statistics;2、dbms_stats package搜集系统的统计信息:dbms_stats.gahter_system_stats
阅读全文
摘要:/* Oracle optimizer 执行选择方式原理分析*/select * from emp where empno=7369;oracle在执行查询计划的时候,并不是说要执行一次全表扫描和一次索引扫描之后,来决定到底是走哪一条路?而是通过数据字典里的统计数据信息,来分析判断到底是走那一条执行计划.|-full table|-index scandata_table---> num_rows(10000)-1/10000 num_rows(10000)-1/2SQL> create table emp1 as select * from emp;Table created..
阅读全文
摘要:Performance Tuning DataType of data gathered:Cumulative statistics:(自从instance启动以来的的数据,累加值)-Wait events with time information-Time model(基于时间模型的比较)Metrics:Statistics rates(度量指标)Sampled statistics:Active session history(样本指标)Statistics by sessionStatistics by SQLStatistics by serviceOther dimensions
阅读全文
摘要:Instance TuningHave well-defined goalsAllocate memory to database structures.Consider I/O requirements in each part of the database.Tune the operating system for optimal performance of the database.Performance Tuning MethodologyThe tuning steps:Tune from the top down.Tune:1.The design2.The appliatio
阅读全文
摘要:Managing Database PerformanceTuning ActivitiesThe three activites in perfomrance management are:Performance planningInstance tuningSQL tunningPerformance PlanningInvestment optionsSystem architetureScalabilityApplication design principlesWorkload testing,modeling,and implementationDeveloping new app
阅读全文