Grid Control的安装
1、4种安装模式说明:新的数据库和实例emrep、repository、oms、agent;2、采用已有数据库安装时需提供hostname、port、service/SID、sys的password、两个表空间MGMT_TABLESPACE和MGMT_ECM_DEPOT_TS,repository对应schema是sysman、安装前drop掉,dispatchers参数不能设置、session_cached_cursors》=200、aq_tm_process>=1、执行两个脚本dbmspool.sql和prvtpool.plb;3、oms端的secure通过在安装时require secure communications选项来设置,agent端的secure可通过emctl secure agent命令来设置;4、agent10g/sysman/admin/script/*
Replication/Stream的配置
1、Stream的源数据库需为archived模式;2、参数修改:global_names置为true;compatible>=10.2;job_queue_processes=4;aq_tm_processes=4;open_links=4;3、两边设置stream的管理员用户strmadm,角色有connect、resource、dba、create any job等;4、两边的db_domain不需设置;5、global_name的修改update global_name set global_name='dg1';commit;再重启实例即可;6、配置tnsnames.ora使得两边可以互相访问;7、创建dblink使得两边可以互相访问,db link的名称为global_name的值;8、若创建schema需保证源库上schema对应的表空间在
Rman的维护
1、Report:分析repository并报告各种问题a)目标数据库的物理结构:report schemab)需要备份的数据文件:report need backup incremental 3report need backup days 3 tablespace ts_testreport need backup redundancy 2 databasereport need backup recovery window of 6 daysc)陈旧备份:report obsolete redundancy 2d)不可恢复数据文件(nologging时):report unrecoverable[@more@]2、List:分析repository并罗列备份集和映像副本a)数据文件备份集:list backup of tablespace ts_test;b)控制文件备份集:list backup of controlfile
Flashback Database
1、 设置Flash recovery area:两个动态参数(db_recovery_file_dest_size和db_recovery_file_dest)2、 设置db_flashback_retention_target3、 设置flashback database为on:Shutdown immediate;Startup mount exclusive;Alter database flashback on;Alter database open;4、 闪回操作:Shutdown immediate;Startup mount;flashback database to timestamp(to_date('2008-08-07 08:16:07','yyyy-mm-dd hh24:mi:ss'))alter database open resetlogs;5、 查询:V$flashback_database_logfileV$flashback_database_logV$flashback_datab
network tracing and listener password
首先是三个参数的引入trc_level:跟踪的级别,可取值off,user,admin和supporttrc_directory:跟踪产生的trace文件所在目录trc_file:跟踪产生的trace文件具体的命令使用格式如下:[@more@]LSNRCTL> help set trc_fileset|show trc_{ } [<value>]: set|show trace parameters of current listenerLSNRCTL> help set trc_directoryset|show trc_{ } [<value>]: set|show trace parameters of current listenerLSNRCTL> help set trc_levelset|show trc_{ } [<value>]: set|show trace parameters of current list
configure shared server
Required parameter:dispatchersoptional parameters:shared_servers、max_shared_servers、circuits、shared_server_sessions这5个参数均是动态参数,可以动态修改。[@more@]DISPATCHERS = “(PROTOCOL=TCP)(DISPATCHERS=2)(PROTOCOL=IPC)(DISPATCHERS=1)”dispatchers的属性值中还可以有如下参数service:dispatcher注册的net service name,没有给出采用services_name中的;listener:监听动态注册,非默认端口1521或没有在local_listener中给出时需使用;sessions:每个dispacther的会话数connections:每个dispacther连接数通过查询v
database service registation
For a listener to forward client connections to an instance, the listener must know the name of the instance and where the instance’s ORACLE_HOME is located. The listener can find this information in two ways:1、Dynamic service registration: Oracle8i, Oracle9i, and Oracle Database 10g instances automatically register with the default listener on database startup. No additional listener configuration is required for the default listener.2、Static service registration: The earlier releases of the
Oracle中的用户资源限制的几点说明
1、概要资源文件profile的设定;2、表空间配额quota的设置;3、级联授权机制(系统权限中的with admin option和对象权限中的with grant option);4、特殊用户public,可理解为所有数据库用户的集合;5、两个特殊的系统权限SYSDBA和SYSOPER[@more@]
Oracle中的鉴权口令认证
在Oracle数据库中有三种方式的鉴权口令认证方式,分别是:1、数据库方式;2、密码文件方式;3、操作系统方式。其中数据库方式的认证只有在数据库run状态下普通用户连接上数据库时通过存储在字典表中的用户口令来进行鉴权认证。比如用户test的密码是testP,这该密码可通过查询dba_users中的password来获取,加密的;对于非普通用户,也即具有SYSDBA或SYSOPER的用户登陆数据库可以通过密码文件或操作系统层面的鉴权来访问数据库。有如下的几个参数来决定是采用那个途径来获取鉴权方式。首先初始化参数文件中的参数REMOTE_LOGIN_PASSWORDFILE
Some Dictionary Views For ASM
V$ASM_CLIENT contains one row for every database instance using a disk group managed by the ASM instance. In a database instance, it has one row for each disk group.V$ASM_DISKGROUP contains one row for every disk group discovered by the ASM instance. In a database instance, V$ASM_DISKGROUP has a row for all disk groups mounted or dismounted.V$ASM_TEMPLATE contains one row for every template present in every disk group mounted by the ASM instance. In a database instance, it has rows for all templ
ojdbc14.jar 与 classes12.jar
驱动包classes12.jar用于JDK 1.2和JDK 1.3,而ojdbc14.jar用于JDK 1.4及以上,所以尽量不要使用classes12.jar;针对不同的数据库版本选择相应版本的驱动包;将驱动包置入应用启动的classpath中(jboss的lib或者项目lib)可通过如下链接下载到对应的驱动包:http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html[@more@]
In Oracle 10g,What is Time Model?
When you have a performance problem, what comes to mind first to reduce the response time? Obviously, you want to eliminate (or reduce) the root cause of the factor that adds to the time. How do you know where the time was spent--not waiting, but actually doing the work?[@more@]Oracle Database 10g introduces time models for identifying the time spent in various places. The overall system time spent is recorded in the view V$SYS_TIME_MODEL. Here is the query and its output:SQL> select * from
Managing the Recycle Bin
If the tables are not really dropped in this process--therefore not releasing the tablespace--what happens when the dropped objects take up all of that space?[@more@]The answer is simple: that situation does not even arise. When a tablespace is completely filled up with recycle bin data such that the datafiles have to extend to make room for more data, the tablespace is said to be under "space pressure." In that scenario, objects are automatically purged from the recycle bin in a first
Operating on Specific Objects Using EXPDP
Ever had a need to export only certain procedures from one user to be recreated in a different database or user? Unlike the traditional export utility,Data Pump allows you to export only a particular type of object. For instance, the following command lets you export only procedures, and nothing else--no tables, views, or even functions:expdp ananda/iclaim directory=DPDATA1 dumpfile=expprocs.dmp include=PROCEDURE[@more@]To export only a few specific objects--say, function FUNC1 and procedure PRO
Oracle 10g OCM Practicum Course Prerequisite
1. Oracle Database 10g: Program with PL/SQL 2. Oracle Database 10g: Program with PL/SQL LWC 3. Oracle Enterprise Manager 10g Grid Control 4. Oracle Database 10g: SQL Tuning Workshop 5. Oracle Database 10g: Real Application Clusters 6. Oracle Database 10g: Data Guard Administration 7. Oracle Database 10g: Implement Streams 8. Oracle Database 10g: Advanced PL/SQL 9. Oracle Database 10g: Security 10. Migrate from SQL Server to Oracle Database 10g 11. Migrate from Sybase to Oracle Database 10g 12. O
ORA-01555: snapshot too old的分析与解决
应用程序抛了如下的异常:SQL> exec PR_COMPARE_FREEZEBALANCE_TEMP();begin PR_COMPARE_FREEZEBALANCE_TEMP(); end;ORA-01555: snapshot too old: rollback segment number 10 with name "_SYSSMU10$" too smallORA-06512: at "MOCSACCT.PR_COMPARE_FREEZEBALANCE_TEMP", line 16ORA-06512: at line 1在告警日志中发现如下的异常:[@more@]Wed Mar 12 20:09:22 2008ORA-01555 caused by SQL statement below (Query Duration=11325 sec, SCN: 0x000d.7a79d7d1):Wed Mar 12 20:09:22 2008SELECT B.ACCTID,NVL(B.FR
There are 5 methods of index lookup
index unique scanindex range scanindex full scanindex fast full scanindex skip scanIndex unique scan~~~~~~~~~~~~~~~~~Method for looking up a single key value via a unique index.always returns a single valueYou must supply AT LEAST the leading column of the index to access data viathe index, However this may return > 1 row as the uniqueness will not beguaranteed.[@more@]example explain plan:SQL> explain plan forselect empno,ename from emp where empno=10;Query Plan---------------------------
物化视图(实体化视图)的分区和异常ORA-12014
最近一OLTP生产数据库采用物化视图后性能明显提升,越来越发觉物化视图是把利器了。今天继续尝试物化视图中的一些奇妙的地方。如下是案例的整个过程,供大家学习和引用![@more@]1、先创建两张表test_1和test_2:SQL> conn shiyihai/shiyihai@db80Connected to Oracle9i Enterprise Edition Release 9.2.0.6.0 Connected as shiyihaiSQL> SQL> drop table test_1;Table droppedSQL> create table test_12 (3 test_date date,4 id number(8),5 address varchar2(24)6 );Table createdSQL> drop table test_2;Table droppedS
Oracle 10g OCM exam topics
Server Configuration [ ] Create the database [ ] Determine and set sizing parameters for database structures [ ] Create and manage temporary, permanent, and undo tablespaces [ ] Stripe data files across multiple physical devices and locations [ ] Configure the database environment to support optimal data access performance [ ] Create and manage database configuration files [ ] Create and manage bigfile tablespaces [ ] Create and manage multiple network configuration files [ ] Create and configur
These occupants in the flash recovery area
All the files needed to recover a database from a media failure or a logical error are contained in the flash recovery area. The files that can reside in the flash recovery area are as follows:Control filesA copy of the control file is created in the flash recovery area when the database is created. This copy of the control file can be used as one of the mirrored copies of the control file to ensure that at least one copy of the control file is available after a media failure.[@more@]Archived lo