Learning Note: SQL Server VS Oracle–Database architecture

本文对比了SQL Server与Oracle数据库管理系统的关键特性,包括数据块与段管理、表空间与系统数据库的区别、系统级信息的存储方式以及进程列表与服务器配置的不同。
  http://www.sqlpanda.com/2013/07/learning-note-sql-server-vs.html

This is my learning note base on the “SQL Server Essentials for Oracle DBAs Jump Start” .

 

DATA BLOCK/EXTEND AND SEGMENT

image: http://lh5.ggpht.com/-FxEKn7CCNd0/UetkOxZ6igI/AAAAAAAAIns/YbXbA67epJw/image_thumb%25255B1%25255D.png?imgmax=800

image

 

  • Oracle use Extend allocation map to track extend. Extend is continually blocks. Each Extend is always part of one segment. The object is created on the segment.
  • MSSQL use GAM/SGAM to track the page usages. The objects can be uniform extend or in mix extend depends on the object size. Trace 1118 turn on would force the SQL server always use uniform extend.
  • SQL Server is always 8K per page and 64K per extend ( 8 pages X 8K), Oracle has various block size hence has various extend size. Oracle can also has uniform extend size and other various extend size base on how  “Extend management” setting within the table space. ( see here).

 

TABLESPACES AND SYSTEM DATABASES

Because there is always one database per oracle instances so most of the system database mapping to Oracle is tablespace.

  • Model DB: Because there is no need to create the separate user db in the Oracle. The close thing to the SQL Server model db is “database Template” which we can use to define the characteristic of database and we can use it to create the database on another instance.
  • Tempdb: Oracle can have multiple temporary table space. SQL server’s tempdb is shared among entire servers. If we turn on the RCSI for the SQL Server database, the version store is also store in the Tempdb versus Oracle store the version in the UNDO tablespace.  DBA_TEMP_FILES list the temporary table space files. For SQL Server, sp_helpdb tempdb.
  • Log file: SQL Server log files are split internally as multiple VLFs and contain both UNDO and REDO logs. ( Except the tempdb log files , it only has UNDO). Oracle log files only has REDO. UNDO log store in the UNDO table space. In SQL Server, each database has its own log files and the log file within the same db are used sequentially. In Oracle, the log files are being divided as log group, each groups can have multiple log files.

image: http://lh5.ggpht.com/-DT_hl9I-kxw/UetkPk67AxI/AAAAAAAAIoA/8cKNDm94F8s/image_thumb1.png?imgmax=800

image

 

 

SYSTEM LEVEL INFORMATION

Oracle store the system level information in the SYSTEM tablespace under the schema SYS.

SQL Server store in the master database.

 OracleSQL Server Master database
UsersDBA_USERSsyslogins
ObjectsDBA_OBJECTSsys.objects
TablesDBA_TABLESsys.tables
DataFilesDBA_DATAFILESsys.databases

 

In SQL Server, we can use sp_help to find out the basic information of the object. In Oracle, we use DESC . See here .

v$datafiles and V$logfile are the system level view which allow as to see the information within oracle even the database is not open.

LIST ALL PROCESS

Oracle: v$sessoins

MSSQL: sys.dm_exec_requests or sp_who2

 

SERVER CONFIGURATION

For SQL Server, a lot of configuration values are defined as advance, therefore , we have to

EXEC sp_configure 'show advanced option', '0';
reconfigure

 

In SQL Server 2008R2, the basic configuration option is 16. All options including advance are 70.

For Oracle, show parameter would display all the options. there are many advance options but most of time, we don’t really need to change it unless it is asked by Oracle support.

 

 OracleMSSQL
List all parametersshow parametersp_configure
List single parametershow parameter Xsp_configure ‘X’
list parameter with keyword matchshow paramter XXXN/A

 

Oracle:  please refer here for detail.

alter system set PARAMETER = XX scope=[MEMORY|SPFILE|BOTH]

 

MSSQL :See here for configuration option.

sp_configure 'XXX'.value;
reconfigure;


Read more at http://www.sqlpanda.com/2013/07/learning-note-sql-server-vs.html#Ocyxh20sYbvww0jA.99

转载于:https://www.cnblogs.com/zengkefu/p/6984890.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值