Sql Server, Oracle, db2等比較
之前看到過這篇文章,那時候沒有blog就沒有存下來,等到有一天一朋友問我這個問題時我只是說了個大概,今天看到了貼出來,看看了.[@more@]1.选择一个好的数据库是非常重要的。 2.如何选择一个好的数据库 开放性: SQL Server 只能在windows 上运行,没有丝毫的开放性,操作系统的系统的稳定对数据库是十分重要的。Windows9X系列产品是偏重于桌面应用,NT server只适合中小型企业。而且windows平台的可靠性,安全性和伸缩性是非常有限的。它不象unix那样久经考验,尤其是在处理大数据量的关键业务时. Oracle 能
Tuning Recovery Manager
做個紀錄[@more@]Tuning Recovery ManagerThe primary goal of RMAN tuning is to create an adequate flow of data between disk and storage device. Tuning RMAN backup and restore operations involves the following tasks discussed in this chapter:Tuning Recovery Manager: Overview RMAN Tuning Concepts Improving RMAN Backup Performance Tuning Recovery Manager: OverviewRMAN backup and restore operations have the following distinct components:Reading or writing input data Processing data by validating block
9i新特性缩小非计划当机时间
偶然发现的自认为对我有点帮助的文章,贴出来了![@more@]9i新特性之四缩小非计划当机时间 了解哪些参数控制了数据库实例崩溃的修复时间,并且知道9i数据库如何做实例崩溃恢复是这篇文章的目的,主要参考9i new feather,加入自己的理解,可能理解得不好,请大家指正。另外基础性的东西往往有些枯燥大家自己根据兴趣选择吧! 概论 非正常当机时间对业务的影响非常大。oracle9i增加了很多减少当机时间的特性。 ----快速recovery。 ----减少任何故障对最终用户的影响。 ------------------------------------------------
exp /imp的一点小结
最近又體會了一下exp /imp 記得剛開始接觸exp / imp時大概知道它可以用來做backup其他就不知道了,後來慢慢知道了exp / imp 可以用在DB升級,DB搬移及DB重整,如果搬移OR 重整的DB的資料量很大的話exp /imp肯定需要很長的時間了,從見到exp /imp到現在已經好長好長時間了,所以做點小小的小結,做個紀錄. 待續...[@more@]exp /imp參數解釋(可以通過c:>exp help=y OR c:>imp help=y) 關鍵字 說明 (預設值) 關鍵字 說明 (預設值) -------------------------------------------------------------------------- USERID 使用者名稱/密碼 FULL
学习笔记十二managing indexes
•List the different types of indexes and their uses •Reorganize indexes •Monitor the usage of an index [@more@]--managing indexesindex---independent physical structure是一个独立的物理结构 ---poniter(可以认为是一些指针)---相当于书的目录(book catalog) ---最终指向表数据point to table data--靠指向rowid指向data ---speed query/overload data update ---OLTP:less indexes ---OLAP: more indexes如果系统面向于读的则索引可以多建几个。如果系统面向于写的则索引就要少建几个
Tuning Considerations When Import Is Slow
There is very little consolidated information on how to speed up import when it is unbearably slow. Obviously import will take whatever time it needs to complete, but there are some things that can be done to shorten the time it will take.[@more@]System Level Changes -------------------- - Create and use one large rollback segment, take all other rollback segments offline. One rollback segment approximately 50% of the size of the lar
学习笔记十一(managing tables)
对rowid 及字符的长度有了理解 ,creat temporary table都听完了[@more@]---storing user data1.regular table2.partitioned table(为了提高系统的访问效率)3. index-organized table (regular table and partition table 每个段里面的数据是随机存放的没有按照特定的顺序存放,为了方便数据的查询,我们希望物理数据的存放就按照索引顺序进行物理的存放)4.cluster 多张表占用一个段,这些表是因为其中间相同的栏位而联系起来的/---oracle data types1.user defined (用户定义的)2. built in(内建的)A.Scalar 标量数据类型CHAR(N),NCHAR(
补充:手工管理回滚段
手工管理回滚段[@more@]手工管理回滚段sql>show parameter undo;undo_management可见是否为手工or 自动手工回滚段需要考虑的问题有:建多少私有回滚段,公有回滚段及回滚段建立的路径等。这些东西已经不像auto管理的一样有系统自动建立sql>show parameter transactions;可见transaction值41 表示这个系统里面准备支持41个并发事务transaction_per_rollback_segment值5 表示每个回滚段支持5个并发事务例如:该例中可见该系统所需要的回滚段数目为8个---实现手工管理回滚段需要设定的参数:1.transactions2.transaction_per_rollback_seg
学习笔记十(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
ORACLE 面试问题
ORACLE 面试问题[@more@]1. 解释冷备份和热备份的不同点以及各自的优点 解答:热备份针对归档模式的数据库,在数据库仍旧处于工作状态时进行备份。而冷备份指在数据库关闭后,进行备份,适用于所有模式的数据库。热备份的优点在于当备份时,数据库仍旧可以被使用并且可以将数据库恢复到任意一个时间点。冷备份的优点在于它的备份和恢复操作相当简单,并且由于冷备份的数据库可以工作在非归档模式下,数据库性能会比归档模式稍好。(因为不必将archive log写入硬盘) 2. 你必须利用备份恢复数据库,但是你没
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解