学习笔记十(managing undo data)
经过了疯狂的加班后,长长的休息,我想应该可以每天继续下听下去了managing undo data听完了,的确不错。[@more@]--10 managing undo data9i版本用undo 代替了roll back,sql>show parameter undo;可见undo 管理的形式---undo segment如果我们往table1里面update一笔资料,则被改变的新值放在该table里面而update 前的旧值放在undo segment,也就是undo segment 里面放的是被改变的这笔数据的旧值得镜像/---undo segments:purpose1.transaction rollback 对数据delete 只要还没有commit这个时候被改变的这个旧值放在undo segment里面,
Renaming and Relocating Datafiles
Renaming and Relocating Datafiles[@more@]Renaming and Relocating DatafilesThis section describes the various aspects of renaming and relocating datafiles, and includes the following topics: Renaming and Relocating Datafiles for a Single Tablespace Renaming and Relocating Datafiles for Multiple Tablespaces You can rename datafiles to change either their names or locations. Oracle provides options to make the following changes: Rename and relocate datafiles in a single offline tablespace (for exam
学习笔记九(storage structure and relationship)
storage structure and relationship [@more@]--9 storage structure and relationship---types of segments1.table:(常规表)表的数据是随机存放的,建一个表时如果不做特别声明则默认为常规表2.partition table:数据量很大的表从物理上分成几个小表,即几个分区,每个分区对应一个段,物理上可以认为是几张小表每个分区可以放在不同的段上,从逻辑上他们是一个完整的table,作用是为了优化大数据量的tableScalability and availability are major concerns when there is a table in a database with high concurrent usage. In
RMAN 调整[轉]
老早想看看這方面的東西結果找到了,就做個紀錄[@more@]RMAN 调整 Checklist:合适的Large_Pool_Size .需要给 RMAN 的 Large_Pool_Size 计算公式(9i):LARGE_POOL_SIZE = number_of_allocated_channels * (16MB+( 4 * size_of_tape_buffer))如果直接备份到磁带上,增加BLKSIZE到合适大小;尝试使用 BACKUP_TAPE_IO_SLAVES 初始化参数 若系统不支持异步 I/O(asynchronous I/O) ,需要备份到磁盘上考虑使用 DBWR_IO_SLAVES 初始化参数模拟异步 I/O 。系统支持异步 I/O,则可忽略此步骤。要小心涉及到异步 I/O 的 Bug。 考
学习笔记八(managing tablespaces and data files)
分了三天总算听完了,而且很多概念也是这样澄清的,的确蛮不错的 ------managing tablespaces and data files[@more@]--8 managing tablespaces and data files---database strorage hierarchydatabase ---tablespace ---logical areasegment--specific logical structure occupied space collection(某一个特定的存储结构所占用的space得集合) exp:table/index/temp/rollback虽然oracle里有很多很多数据对象如有函数,有视图,有存储过程,有表,有index,但是从段的角度来讲在数据库的环境里面可以
学习笔记七(writing basic sql select statements)
writing basic sql select statements[@more@] --1 writing basic sql select statements基于orcle 9i的标准查询语句:A.数据查询语句 即SELECT 语句B.DDL语句即,数据定义语句,包括数据对象的建立修改删除等的CommandC,数据操作语句,数据操作语句是在oracle环境里面实现对数据操作的command包括update,insert,deleteD. DCL Command 数据控制语句,用来实现用户的授权及取消E. TCL Command事务控制语句,包括commit,rollback,set point command---writing sql statements1.select 语句不区分大小写2.select 可以写到一行or 多行,但
oracle logmnr设定及使用
凌晨1点听完了。[@more@]logmnr(跟踪某人某时发生什么动作,等等纪录)日志挖掘1. set directory(日志的目录)(建立directory用来加一些log file 到directroy里面然后用logmnr对directory来分析而且directory里面记录的是log file 得位置等信息则对directroy地分析也就是对log fie 地分析)A.修改initfile 指定UTL_FILE_DIR=d:oracleadminsidCDUMP2.restartup db3.create directory file(execute dbms_logmnr_d.build)sql>desc dbms_logmnr提示error ora-24372无效的描述对象处理sql>start d:oracleora92rdbmsadmincatproc.sql(重
学习笔记六( maintaining redo log files)
凌晨1点听完了,呵呵![@more@]--7 maintaining redo log filesredo log files目的:redo log buffer 在内存里面纪录数据改变的动作,动作的类型,动作发生的时间,动作发生数据改变的新值旧值等等内容记录在redo log buffer 由logwriter写到redo log file 该file 在系统里面提供的作用是:recovery同时也可以做到给予介质错误的恢复,总之是数据改变的历史纪录。/using redo log filesredo log files record all changes made to data and provide a recovery mechanism from a system or media failure.1.redo log files are organized int
学习笔记五(maintaining the control file)
身体有点不舒服,可是还是很想听听课...maintaining the control file[@more@]--6maintaining the control filecontrol filethe control file is a binary file(二进制文件)that defines the current state of the physical database1.loss of the control file requires recovery2.is read at mount stage3.is required to operate(在任何情况下control file是可用的)4.is linked to a single database5.should be multiplexed6.maintains integrity of database (维护的是database 的完整性)7.sized initially by create database/con
学习笔记四(data dictonary contents and usage)
data dictonary contents and usage [@more@]--5 data dictonary contents and usagedata dictionary在创建database 的时候create database的过程中oracle会自动调用d:oracleora92rdbmsadminsql.bsq来创建该系统里面的基本表(数据字典表)同事创建了dynamic performance tables(动态性能表是内存表在database启动的时候产生,在database关闭的时候自动消失,记录的是database运行时的一些信息,性能优化时数据的来源就来自这)---data dictionary数据字典保存在table里面oracle 数据字典表是只读的而且是加密的不允许用户用dml command直接
学习笔记三(手工创建database)
手工创建database [@more@]--4 creat databaseON Unix oracle_base为oracle 安装的第一级的子目录oracleoracle_home 为oracle管理文件所在的路径oracleora92oracle_sid ora_nls33LD_library_path/手工创建1.decide on a unique instance and database name 2.choose a database character set 3.set the operating system veriables4.edit/create the initialization parameter file5.start the instance(nomount)6.exe create database command7.run scripts to generate the data dictionary and accomplish post creation steps解
学习笔记二
startup and shutdown dababase[@more@]startup a databasenomount:读初始参数文件,分配物理内存,启动instance 启动backgroud process,透过参数文件定位control file 等的路径,而且instance 启动的时候会去读写alterfile 如果alter file 不存在的话就自己建一个alter file Test删除alter file sql>shutdown immediate sql>startup nomount在bdump下可见生成了alterfile可以访问到的table1.sql>select * from v$instance;2.sql>select * from v$bgprocess;3 sql>select * from v$sga但是:select * from v$databas
学习笔记一
觉得有点眼高手低,很想系统的看看书OR 听听课,虽然很浅,可是这种学习还是有那么点需要。 [@more@]--1sqlplusw /nologset wrap offset linesize 200select * from v$bgprocess;查询所有可能使用到的process 并不是所有的后台进程都是必需的,其中paddr为00的则为可选的SQL>select * from v$bgprocess;SQL> l 1* select * from v$bgprocessSQL> a where paddr<>'00'; 1* select * from v$bgprocess where paddr<>'00'SQL> run 1* select * from v$bgprocess where paddr<>'00'dic
about rowid
對rowid的具體代表的意思不是很明白,所以找了找,找到了,貼出來以備後用.[@more@]本文讨论的是关于oracle从8i开始引进object的概念后的rowid,即扩展(extended)的rowid: 1. rowid的介绍 先对rowid有个感官认识: SQL> select ROWID from Bruce_test where rownum 0 - 25 (26) a-z 26 - 51 (26) 0-9 52 - 61 (10) +/ 62 - 63 (2) 共64位,明白这个后,就可以计算出10进制的编码值,计算公式如下: d * (b ^ p) 其中:b就是基数,这里就是64,p就是从右到左,已0开始的位置数 比如:上面
ORA-00600 [2662]错误解决过程来自coolyl
在pub上逛的时候看到了一篇关于ora-00600的经典的帖子copy下来,以利以后备用,记得两年前我也遇到同样的问题,可是解决的办法比较惨重装DB了...[@more@]数据库版本:7.3.2背景:客户那边数据库突然出现一个current日志文件坏了,导致数据库crash了,然后现场工程师使用_ALLOW_RESETLOGS_CORRUPTION = TRUE这个隐含参数,(是在INITFILE里面自己修改的)做了不完全恢复后强行将数据库打开。可是打开数据库后发现只能用internal用户连接进去,别的用户连接都报错,错误信息如下:ORA-00600: internal error code, arguments: [2662], [0],
undo tablespace
做個記號以後整理出來 幫我解決了一個不大不小的問題[@more@]http://blog.csdn.net/lunar2000/archive/2004/07/09/37637.aspx
資料庫搬移的體驗
本來以為可以比較快的完成這個工作,結果在我做的過程中也大大小小出現了點問題,所以才發現不是我想象的那麼快,不過還好這次我們有的是時間所以可以讓我慢慢來完成這項任務,正好在部門內要做一個報告,就以這次的體驗為主題講了講,本來從來都覺得我已經黑的夠意思了,沒想到做完報告竟然得到了主管的誇獎:我有很大進步.人啊,真的是很難說的,我付出了那麼多沒有一點肯定,就那麼一個簡單的報告就能讓他有不一樣的感覺,真是...言歸正傳,資料搬移的體驗見下了[@more@]1).需要搬移的Table 整理 2). NEW DB 跟OLD DB的Schema對比 3). Table 的搬
Clone DB的建立
以前只是聽過Clone DB因為學識的湵
ORA-1157错误解决手册[轉coolyl的]
因為我碰到了這個問題,而且在這篇文章里找到了答案所以紀錄下來,以備後用引起的原因:因为数据文件已经在被使用了从而导致数据库的后台进程不能找到相应的数据文件或者不能锁定相应的数据文件,这样数据库将禁止访问这些数据文件而其他的数据文件则没有影响。伴随这个错误操作系统将会提示是哪个数据文件不能被识别。[@more@]ORA-01157错误一般和ORA-01110错误一起出现,往往还有操作系统级别上的错误,例如ORA-07360,同时一个DBWR的trace文件会在background_dump_dest的目录下生成。例如,在Solaris的平台上,会有如下的错误信息显示:O
关于数据库名(db_name)、实例名(instance_name)、ORACLE_SID
关于数据库名(db_name)、实例名(instance_name)、ORACLE_SID 轉[@more@]关于数据库名(db_name)、实例名(instance_name)、ORACLE_SID 最近因看到论坛有人问起这方面的东西,将自己的理解加上查阅相关资料整理如下,如果不全或不当的地方,望指正并补全它。 数据库名(DB_NAME)、实例名(Instance_name)、以及操作系统环境变量(ORACLE_SID) 在ORACLE7、8数据库中只有数据库名(db_name)和数据库实例名(instance_name)。在ORACLE8i、9i中出现了新的参数,即数据库域名(db_domain)、服务名(service_name)、以及操作系统环境变量(OR