随笔分类 - Oracle
Script Tips/DBA Skills
Linux 上设置Oracle DB开机自动启动
摘要:Linux : CentOS-5 Oracle: 10.2.0.1.0 --------------设置 Linux 上Oracle 自动启动 20080722-------------------------------- 1、首先在/etc/rc.d/init.d/目录下配置Oracle的服务文件。 su - root vi oracledb 将最后的附件脚本贴入 chmod 775 or...
阅读全文
Oracle的数据字典
摘要:Oracle的数据字典可分内部RDBMS(X$)表,数据字典表($结尾的对象),动态性能视图(V$)和数据字典视图(dba_类视图,user_类视图,all_类视图). 四个部分的关系是 X$ ---> V$ 视图--->V$_ 视图 --->V$ 同义词 X$ ---> GV$ 视图--->GV$_ 视图--->GV$ 同义词 X$和数据字典表(由sql.bsq创建) --->数据字典视图...
阅读全文
SCN和Checkpoint
摘要:SCN和Checkpoint SCN :system change number。作为数据库内部的逻辑时钟,用来标识数据库在某个确切时刻提交的版本,存在于控制文件、数据文件头、数据块、日志文件头、日志文件change vector。 数据文件头中包含该数据文件的checkpoint SCN。 Checkpoint :只是一个数据库事件,根本意义在于减少崩溃恢复时间(Crash Recovery...
阅读全文
rman备份中的%参数详解
摘要:format=string 文件路径和名称的格式串,其中可包含宏变量: %c copy ID %p backup piece ID %s backup set ID %e log sequence %h log thread ID %d database name %n database name(x填充到8个字符) %I DBID %f file ID %F DBID, day, month, ...
阅读全文
freelists and freelist groups
摘要:Normal 0 7.8 磅 0 2 false false false MicrosoftInternetExplorer4 MFL, PFL ,TFL master free list或者segment free list简称为MFL,在segment被创建的时候自动生成的,如果我们在创建segment时没有指定free...
阅读全文
freelist
摘要:freelist是一种单向链表,oracle用它来管理oracle某个对象中位于高水位线下的空闲块,换句话说就是,通过 freelist,oracle可以定位这个对象可以使用哪些存储块来接受数据。每个对象至少有一个freelist,当存储块被使用 时,freelist中也将会有放入和取出的操作。需要注意一点的是,只有在低水位下的块才有可能在freelist中被发现。高水位的块被用到的情况, 只能在...
阅读全文
手动建立数据库
摘要:手动建立数据库 2008-7-8 实例名称ORACLE_SID=mytest 数据库名称DB_NAME= mytest 1、修改oracle的.bash_profile文件 export ORACLE_BASE=/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 export ORACLE_SID=mytest export...
阅读全文
RMAN
摘要:http://www.boobooke.com/bbs/viewthread.php?tid=2862&extra=page%3D7 http://www.boobooke.com/bbs/viewthread.php?tid=2878&extra=page%3D3 http://www.boobooke.com/bbs/viewthread.php?tid=2879&extra=page%3D5...
阅读全文
shared pool
摘要:Shared pool shared pool可以分为库缓存(library cache)和数据字典缓存(dictionary cache)。Library cache存放了最近执行的SQL语句、存储过程、函数、解析树以及执行计划等。而dictionary cache则存放了在执行SQL语句过程中,所参照的数据字典的信息,包括SQL语句所涉及的表名、表的列、权限信息等。dictionary ...
阅读全文
rman 备份的维护
摘要:http://www.eygle.com/archives/2004/12/rman_crosscheck.html 如果手动删除archive log后,rman 会无法进行下去,此时可以使用crosscheck archivelog all。在rman目录和物力备份目的地不同步的情况中,我们可以使用crosscheck命令来校验控制文件或恢复目录中的rman信息内容是否与备份介质上的实际备份...
阅读全文
LogMiner Tool
摘要:1、介绍: dbms_logmnr是oracle在oracle8i所提供的新package。它主要用于分析log file文件(包括online redo log file,archived log file),将log file中的信息转存到v$logmnr_contents中,从而获取对oracle数据库操作的历史信息。它不仅可以分析oracle8i的log file,也可以分析oracl...
阅读全文
(转)数据块(Data Block)原理深入剖析
摘要:数据块(Data Block)原理深入剖析 什么是数据块(Data Block) 数据块(Oracle Data Blocks),本文简称为“块”,是Oracle最小的存储单位,Oracle数据存放在“块”中。一个块占用一定的磁盘空间。特别注意的是,这里的“块”是Oracle的“数据块”,不是操作系统的“块”。 Oracle每次请求数据的时候,都是以块为单位。也就是说,Oracle每次请求的数据是...
阅读全文
Oracle Performance consideration
摘要:Some performance considerations for temporary tablespaces: - Always use temporary tablespaces instead of permanent content tablespaces for sorting (no logging and uses one large sort segment to reduce...
阅读全文
(Alex note) Managing Tablespace & Data Files
摘要:Define the purpose of tablespaces and data files #数据库中的block是操作系统的2的n 次幂倍,如0, 2, 4, 8 .... #database 中的一个table 至少要有一个segment. # SYSTEM tablespce created with database , contains the data dictionary, c...
阅读全文
(Alex note) Maintaining online redo log files
摘要:Explain the purpose of online redo log files Record all changes made to data Provide a recovery mechanism at least two groups required online redo log file group : identical copies of online redo lo...
阅读全文
(Alex note) Maintaining the control file
摘要:uses of the control file a. binary file b. define current state of physical database d. 只要data file 和redo log file 不丢,control file 还是有可能恢复的 ---------------------------------- cd dbs ls -al strings spf...
阅读全文
Desc most of all data dictionary
摘要:详细字典内容如下: ALL_CATALOG All tables, views, synonyms, sequences accessible to the user ALL_COL_COMMENTS Comments on columns of accessible tables and views ALL_COL_GRANTS_MADE Grants on columns for w...
阅读全文
(Alex note) Using Data Dictionary and Dynamic Performace View
摘要:Data dictionary (read-only / in system tablespace / owned by sys / maintained by Oracle / Accessed with select ) #当执行DDL语句的时候Oracle 自动会对数据字典进行维护. #DD view is the static view , not means absolutely sta...
阅读全文
undo segment
摘要:在 undo segment中,Insert是记录rowid,update 记录被更改数据的前镜像,delete 记录整行数据。因此delete产生的undo最多。 select segment_name,tablespace_name,status from dba_rollback_segs; select xidusn,xidslot,xidsqn,ubablk,ubafil from v...
阅读全文
(Alex note) Create a oracle database
摘要:A.List the prerequistites necessarey for database creation 1)确定数据库类型(OLTP or OLAP) 2)规划数据库架构, 如datafile, logfile 等存放磁盘, tablespace, 性能安全 (可以参考Oracle 建议的OFA:Optimal Felxible Arch) 用DBCA创建后的目录结构如下: orad...
阅读全文
浙公网安备 33010602011771号