oracle & sql server comparison 2

61
ORACLE & SQL Server Comparison

Upload: mohsen-b

Post on 19-May-2015

7.226 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Oracle & sql server comparison 2

ORACLE & SQL Server Comparison

Page 2: Oracle & sql server comparison 2

Contents

Performance Information IntegrationHigh AvailabilityAutomatic Storage ManagementOracle 11g Top Features

Page 3: Oracle & sql server comparison 2

Performance

Concurrency ModelIndexingPartitioningParallel ExecutionClustering

Page 4: Oracle & sql server comparison 2

Oracle Database 10g

SQL Server 2005

Multi Version read Consistency

Always enabled Not by default. Must be enabled

Non-escalating row-level locking

Yes Locks escalate

Concurrency Model:In multi-user environments, concurrency control ensures that data updates made by one user do not adversely affect those made by other users. Main differences of Implementation:

Page 5: Oracle & sql server comparison 2

Indexing:Indexes are database structures that are created to provide faster path to data. Using indexes can dramatically reduce disk I/O operations, thus increasing the performance of data retrieval.

The differences in the indexing

Type of index Oracle SQL S

B-tree Indexes Yes Yes

B-tree Cluster Indexes Clusters are an optional method of storing table data. A cluster is a group of tables that share the same data blocks because they share common columns and are often used together.

Yes No

Hash Cluster Indexes Yes No

Reverse Key Indexes There is an option to create index entries as reversed, which is called reverse key indexes. Oracle stores the index entries as their bytes reversed.

Yes No

Mohsen
For example, the EMP and DEPT table share the DEPTNO column. When you cluster the EMP and DEPT tables, Oracle physically stores all rows for each department from both the EMP and DEPT tables in the same data blocks. Because clusters store related rows of different tables together in the same data blocks, properly used clusters offers these benefits: * Disk I/O is reduced for joins of clustered tables. * Access time improves for joins of clustered tables. * In a cluster, a cluster key value is the value of the cluster key columns for a particular row. Each cluster key value is stored only once each in the cluster and the cluster index, no matter how many rows of different tables contain the value. Therefore, less storage is required to store related table and index data in a cluster than is necessary in nonclustered table format.
Mohsen
Hashing is an optional way of storing table data to improve the performance of data retrieval. To use hashing, create a hash cluster and load tables into the cluster. Oracle physically stores the rows of a table in a hash cluster and retrieves them according to the results of a hash function.Oracle uses a hash function to generate a distribution of numeric values, called hash values, which are based on specific cluster key values. The key of a hash cluster, like the key of an index cluster, can be a single column or composite key (multiple column key). To find or store a row in a hash cluster, Oracle applies the hash function to the row's cluster key value. The resulting hash value corresponds to a data block in the cluster, which Oracle then reads or writes on behalf of the issued statement.
Mohsen
The advantages of reverse key indexes are1. Reverse Key indexes can reduce buffer busy waits by eliminating hot leaf blocks.2. Reverse key indexes can reduce spareseness of leaf blocks ( and will avoid the need of an index rebuild )
Page 6: Oracle & sql server comparison 2

Bitmap Indexes Bitmap indexes are stored as an array of zero-and-one values, with one entry for each row.  Bitmaps are created by doing a full-table scan of the indexed table, and they are very slow for updates.  Here are tips on using bitmap indexes

Yes No

Bitmap Join Indexes It’s possible to create a bitmap join index, which is a bitmap index for the join of two or more tables. In a bitmap join index, the bitmap for the table to be indexed is built for values coming from the joined tables. In a data warehousing environment, the join condition is an equi-inner join between the primary key column or columns of the dimension tables and the foreign key column or columns in the fact table.

Yes No

Function-based Indexes

Function-based indexes facilitate queries that qualify a value returned by a function or expression. The value of the function or expression is precomputed and stored in the index

Yes No

Indexing(Cont….)

Mohsen
Advantages:1.Bitmap Indexes have a highly compressed structure, making them fast to read2.Compressed indexes, represent a trade-off between CPU usage and disk space usage.
Mohsen
A bitmap join index can improve the performance by an order of magnitude. By storing the result of a join, the join can be avoided completely for SQL statements using a bitmap join index. Furthermore, since it is most likely to have a much smaller number of distinct values for a bitmap join index compared to a regular bitmap index on the join column, the bitmaps compress better, yielding to less space consumption than a regular bitmap join index on the join column.Bitmap join indexes are much more efficient in storage than materialized join views, an alternative for materializing joins in advance. This is because the materialized join views do not compress the rowids of the fact tables.
Page 7: Oracle & sql server comparison 2

Domain Indexes DOMAIN indexes are built against an index type. An index type encapsulates a set of routines that manage access to a domain. This encapsulation allows efficient search and retrieval functions for complex domains such as text, spatial, image, and OLAP data. All of this encapsulation is specified using the Oracle Data Cartridge Interface for indexes (ODCIIndex).

Yes No

Index –organized tables

Yes Yes(Clustered Indexes)

Indexing(Cont….)

Page 8: Oracle & sql server comparison 2

Partitioning:Partitioning allows large database structures to be decomposed into smaller and more manageable pieces

The differences partitioning

Partitioning Option

Oracle Database 10g

SQL Server 2005

Range Yes Yes

Hash Yes No

List Yes Yes

Composite Yes No

Local Indexes Yes Yes

Global Indexes Yes Yes

Maximum number of partitions per table

1024K (more than 1 million)

1000

Mohsen
Hash partitioning enables easy partitioning of data that does not lend itself to range or list partitioning.It does this with a simple syntax and is easy to implement. It is a better choice than range partitioning when: * You do not know beforehand how much data maps into a given range * The sizes of range partitions would differ quite substantially or would be difficult to balance manually * Range partitioning would cause the data to be undesirably clustered * Performance features such as parallel DML, partition pruning, and partition-wise joins are important
Page 9: Oracle & sql server comparison 2

Parallel Execution:Parallel execution of SQL operations can vastly improve the performance for operations involving large volumes of data

The differences in parallel executionOracle will execute INSERT, UPDATE, DELETE, and MERGE statements in parallelWith SQL Server 2005 INSERT, UPDATE ,DELETE statements are executed serially (MERGE is not supported)

Page 10: Oracle & sql server comparison 2

Clustering:Clusters are groups of independent servers, or nodes , connected via private network, that work collaboratively as a single system. Clusters allow application s to scale beyond the limits imposed by single node systems when processing loads exceed the capacity of large individual servers

Node

Private Interconnect

Clusterwareon each node

Publicnetwork

Publicnetwork

Publicnetwork

Publicnetwork

Page 11: Oracle & sql server comparison 2

Clustering(Cont..)

Only oracle provides real support for clustered configuration: With Real application Clusters , full and transparent can be obtained by simply adding new nodes as the demand increases.SQL Server 2000 & 2005 does not support this type of clustering

Oracle Database 10g

SQL Server 2005

Scalability Yes No

Application to real-world pre-packaged applications

Yes No

Processing Capacity Unlimited Limited

Page 12: Oracle & sql server comparison 2

Information Integration

FederationReplicationMessage Queuing

Page 13: Oracle & sql server comparison 2

Federation:Federation provides on-demand access to distributed data, providing a single global view of the data and virtualizing the data’s physical location. Data can be in homogeneous or heterogeneous data stores. Any single piece of data is stored in a single location, and updates and queries are made in real time.

Homogeneous FederationSupported by both by different manner

Heterogeneous Federation

Oracle Database 10g SQL Server 2005

Sybase Oracle

DB2 DB2

DRDA Exchange

SQL Server Access

Informix Excel

Teradata ODBC

Ingres

IMS

VSAM

ADABAS

RMS

RDB

ODBC

Page 14: Oracle & sql server comparison 2

Federation (Cont…)

Replication

Oracle Database 10g SQL Server 2005

Server-To-Server Oracle Stream •It can instantiate a replica using Data Pump, an Rman backup and transportable tablespace•Oracle Streams captures DML and DDL changes from active redo log , downstream, write a copy of the log directly•Message routing used for subscription rules to configure the routing of change records. It can use of default apply process, user-defined apply process or another application. Each database can act as a hub and spoke•Supports full update anywhere operation. It includes power full conflict detection to detect changes made to the replica while an update was in flight. It also includes optional conflict resolution routines.

Transactional Replication •predominately a publisher-subscriber product with very limited support for update at the replica•It can use snapshot capability or a backup to instantiate a replica•SQL Server Transaction Replication also captures DML and DDL changes from the online redo log and capture process must run on the source database•Message routing with one direction , from publisher to subscriber. There is no support for hub/spoke•It designed for one way replication from source to a replica. It has no conflict detection.

Page 15: Oracle & sql server comparison 2

Replication(Cont)

Mass Deployment and Disconnected Replication

Remote Materialized Views •Automatically provides transactional consistency•Capture changes to data using triggers•Support subsetting/filtering•General Conflict resolution method•No schema impact by default

Merge Replication•Is not transactionally consistent •Capture Changes to data using triggers•Support subsetting/filtering•11 conflict resolution method•Required modification of the schema to include a GUID column to avoid schema impact

Message Queuing Oracle Advanced Queuing : oracle’s database integrated message queuing solution. It’s benefits:

• single transactional model• Data model• Security model

Benefits of integrated Message Queuing in Database•Free and integrated•Faster Development•Improve Reliability•Automatic Auditing and Tracking•Improved Performance•Simplified Platform Management

MSMQ: Part of windows and not integrated in database

Service Broker: integrated in database engine

Benefits of integrated Message Queuing in Database•Free and integrated•Faster Development•Improve Reliability•Automatic Auditing and Tracking•Improved Performance•Simplified Platform Management

Page 16: Oracle & sql server comparison 2

Messaging Queuing

Message Queuing Oracle Advanced Queuing : oracle’s database integrated message queuing solution. It’s benefits:

• single transactional model

• Data model• Security model

Benefits of integrated Message Queuing in Database•Free and integrated•Faster Development•Improve Reliability•Automatic Auditing and Tracking•Improved Performance•Simplified Platform Management

MSMQ: Part of windows and not integrated in database

Service Broker: integrated in database engine

Benefits of integrated Message Queuing in Database•Free and integrated•Faster Development•Improve Reliability•Automatic Auditing and Tracking•Improved Performance•Simplified Platform Management

Page 17: Oracle & sql server comparison 2

Message Queuing Comparison •Addressability: allows a sender who puts a message in a queue to specify a list of recipients.

• Point-to-Point Queues• Multi-Consumer Queues

•Publish and Subscribe: • Supports a publish and

subscribe method of operation

•Automatic Change Capture:• Automatically detect DML

and DDL changes to a database.

•Message Ordering• Messages in a queue will be

read and dequeued in a certain order. It supports below ordering:

• Enqueue-time• Priority• Commit-time• Combination of all

ordering

•Point-to-Point Queues

•Does not provide support for publish and subscribe operations

•Has no automatic change capture

•Supports first sent, first read ordering

Messaging Queuing (Cont)

Page 18: Oracle & sql server comparison 2

Messaging Queuing (Cont)

Message Queuing Comparison •Buffered Queues: this gives users the option of trading off reliability for performance (eliminating Disk I/O)•Notification: Means the application can retrieve the message when convenient, and does not need to continually check or wait for new message

• Support notification

•Delay and Expiration: support to enqueuing a message with a delay or an expiration

• Streams AQ supports this feature

•It has no comparable feature

•Does not support notifications

•Service Broker has no Similar feature

Page 19: Oracle & sql server comparison 2

High Availabiligy

Unplanned DowntimeSystem FailuresData Failures

Disaster Recovery Human Errors

Planned Downtime (Maintenance)System ChangesData Changes

Page 20: Oracle & sql server comparison 2

Integrated High Availability features of Oracle Database

System Failures

Data Failures

System Changes

Data Changes

UnplannedDowntime

PlannedDowntime

Real Application Clusters

ASMFlashback

RMAN & Oracle Secure Backup

Data GuardStreams

Online ReconfigurationRolling Upgrades

Online Redefinition

Ora

cle

MA

A B

est P

ractic

es

Page 21: Oracle & sql server comparison 2

System Failures: Are the result of hardware failures, power failures, and operating system or server crashes.

Addressing System Failures Oracle

SQL Server

Active-active clustering Yes No

Transparent application scalability Yes No

Dynamic addition/removal of nodes with no effects on data distribution

Yes No

Integrated clusterware that supports all major OS Yes No

Automatic workload management that enables enterprise grid

Yes No

Page 22: Oracle & sql server comparison 2

Data Failures: It is vital to design a solution to protect against, and recover from, data and media failure.

Database ReplaySQL Performance AnalyzerPartitioningTransparent Tablespace EncryptionFlashback Data ArchiveSQL Plan ManagementPrivate StatisticsMore ConcurrencyResult Cache

Addressing Data Failures Oracle

SQL Server

Built-in database failure detection, analysis, and repair(Using DRA)

Yes No

Automated disk backup management Yes No

Incrementally updated backup strategy Yes No

Parallelize backup within a single file Yes No

Unused block compression during full backup Yes No

Automatic data file creation during recovery Yes No

Automatic restore failover to next available backup during recovery

Yes No

Restore Preview Yes No

Trail Recovery Yes No

Encrypt backups as they are created Yes No

Clone database directly over the network, without intermediary storage

Yes No

Page 23: Oracle & sql server comparison 2

Disaster Recovery: Oracle Data Guard is a high availability and data protection capability optimized for the oracle database implemented from oracle 7 at 1992. Microsoft Database Mirroring has similar goals as Data Guard for increasing database availability and providing disaster protection, though there are many differences in its capabilities with Data Guard.

Page 24: Oracle & sql server comparison 2

Disaster Recovery(Cont)

Disaster Recovery Data Guard

Database Mirroring

Utilize standby for real-time query and reporting while also used for DR

Yes No

Boost primary performance by moving work to standby Yes No

Utilize standby for QA and other R/W activity while also used for DR

Yes No

Offload fast incremental backups to standby database Yes No

Fast detection and recovery from lost writes corruption Yes No

Multiple standby for non-stop protection after failover Yes No

Zero data loss for all planned transitions from standby to primary role for ASYNC standby databases

Yes No

High performance log gap resolution for best protection Yes No

Complete database Protection Yes No

Page 25: Oracle & sql server comparison 2

Disaster Recovery(Cont)

Disaster Recovery Data Guard

Database Mirroring

No performance impact while creating standby databases Yes No

Standby apply process failure does not impact primary database or transmission of changes

Yes No

Automatic failover for ASYNC configurations Yes No

Observer/Witness does not require a database instance Yes No

High performance log gap resolution for best protection Yes No

Page 26: Oracle & sql server comparison 2

Human Errors: Data failures can result from human error , which may be due to accidents or event sabotage.

Human Errors Oracle

SQL Server

Retrieve data from the pat using SQL queries Yes No

Support Recycle Bin Yes No

Examine and back out changes to the database at transaction level

Yes No

View changes across row versions Yes No

Mine logs and audit changes using a SQL interface Yes No

Flexible tablespace point-in-time recovery Yes No

Flashback a table to a point in time in the past Yes No

Flashback the database to prior point in time without restoring a backup

Yes No

Page 27: Oracle & sql server comparison 2

System Maintenance: As business needs change, system changes may also be required.

System Maintenance Oracle SQL Server

Add a node to a cluster online Yes No

Add or drop disks online Yes No

Online Patching Yes No

Flexible rolling database upgrade Yes No

Page 28: Oracle & sql server comparison 2

Data Maintenance: As business requirements and processes change, the underlying data has to be maintained and transformed to suit the new environment, and done in such a way that there are minimal or no disruptions to the buesiness.

Data Maintenance Oracle SQL Server

Online add, drop, exchange, move partitions Yes No

Online reorganization of individual tables, including relocating table to different tablespace

Yes No

Online reorganization of individual table partitions Yes No

Extensive online table redefinition capabilities, including data transformations

Yes No

Fast online add column, with default value Yes No

Online rename and merge columns Yes No

Invisible indexes Yes No

Online add/modify constraint, add column, index create/rebuild do not require exclusive lock

Yes No

DDL Operations wait for user-specified time, if underlying resource is busy

Page 29: Oracle & sql server comparison 2

Automatic Storage Management (ASM): ASM is a volume manager and a file system for Oracle database files that supports single-instance Oracle Database and Oracle Real Application Clusters (Oracle RAC) configurations. ASM is Oracle's recommended storage management solution that provides an alternative to conventional volume managers, file systems, and raw devices.

Features & Capabilities

Mirroring

Striping Striping

Failgroup1 Failgroup2

ASM Diskgroup

Page 30: Oracle & sql server comparison 2

Files, Extents, and Failure Groups

Files and extent pointers

Fail groups and ASM mirroring

Page 31: Oracle & sql server comparison 2

ASM and Oracle Managed FilesASM DatabaseASM ComponentsDisk Group RedundancyPerformanceUtilities

Features & Capabilities

Page 32: Oracle & sql server comparison 2

ASM extends the power of Oracle Managed FilesCreates and manages Files automatically

Understands different Oracle file typesOffers built-in data mirroring and striping CapabilitiesAutomatically balances I/O load across disk group(s)Functionally like as LVM

ASM and Oracle Managed Files

Page 33: Oracle & sql server comparison 2

When ASM is enabled, Oracle automatically creates a small database for storing ASM-related meta-dataThe default database name is “+ASM”

The default RAC instances are “+ASMn”, where n is the node number

The ASM database may be managed with srvctl commandsNormally auto-managed by Oracle

ASM Database

Page 34: Oracle & sql server comparison 2

Disk GroupsOracle may provide disk mirroring (optional)Oracle will stripe files across all available disksUsing ASM striping across a group of hardware striped LUNs can be beneficial to performance

Disks assigned to ASM Disk groups become ASM DisksFiles written on ASM disks become ASM files

Files are named with an Oracle-defined formatFile name aliases may be defined for convenienceA hierarchical directory structure may be defined for file aliases

ASM Components

Page 35: Oracle & sql server comparison 2

ASM Components(Cont…)

Templates may be used to associate file attributes such as redundancy and striping with ASM files

ASM is implemented through an ASM instance that runs as a service on each node

Page 36: Oracle & sql server comparison 2

ASM Disk Groups may be defined with different levels of redundancy NORMAL redundancy indicates that Oracle will create

a software mirror for each disk HIGH redundancy indicates that Oracle will create two

mirror disks per data disk Disk mirrors may be segregated into different

locations by designating Failure Groups EXTERNAL redundancy indicates that Oracle will not

create any software mirrors. Hardware mirrors (if any) will be used instead External redundancy is recommended for any

system with a highly available storage array

Disk Group Redundancy

Page 37: Oracle & sql server comparison 2

ASM performance is sensitive to the number of disk spindles utilized

Just like traditional storage, the number of IOs/second that can be sustained is directly proportional to the number of disks in the disk group

Always use External Redundancy if you are using RAID-capable storage hardware

Multiple RAID 1 disks can be utilized in a Disk GroupASM will provide the disk striping

Another option is to use multiple four disk RAID 10 groups as the building block for ASM Disk Groups

ASM will stripe on top of the hardware stripe, creating a stripe “plaid”, very desirable for OLTP and random I/O performance

Performance

Page 38: Oracle & sql server comparison 2

ACMCMDSQLPLUSOEM

Utilities

Page 39: Oracle & sql server comparison 2

Oracle DataGuard: An application-transparent high-performance low-impact asymmetrical online reliable Redo or SQL level background standby database transaction exchange utility capable of reporting, switchover and Failover.

Data Guard helps you protect your Data.Takes your data and automatically puts it elsewhereMakes it available for Failover in case of failure.

The other capabilities are pure bonus.Switchover for MaintenanceReportingOff-loading QueriesBackups

Page 40: Oracle & sql server comparison 2

Data Guard Pyramid D

a t a

G u

a r

d

Physical and Logical Standby Databases

Production / Primary Databases

Broker and CLI

EM Data Guard Manager

Page 41: Oracle & sql server comparison 2

High Level

Data Guard comprises of two partsREDO APPLY (DR)

Maintains a physical, block for block copy of the Production (also called Primary) database.

SQL APPLY (Reporting)Maintains a logical, transaction for transaction copy of the Production database.

Page 42: Oracle & sql server comparison 2

Data Guard Redo Apply: Best for DR

Physical Standby Database is a block-for-block copy of the primary database Uses the database recovery functionality to apply changes Can be opened in read-only mode for reporting/queries Can also perform backup, offloading production database The best solution for DR

Data Guard Broker

PrimaryDatabase

Physical StandbyDatabase

OptionalDelay

Sync or Async Redo Shipping

Network

Redo Apply

DIGITAL DATA STORAGE

Backup

Page 43: Oracle & sql server comparison 2

Data Guard SQL Apply

Logical Standby Database is an open, independent, active database Contains the same logical information (rows) as the production database Physical organization and structure can be very different Can host multiple schemas

Can be queried for reports while logs are being applied via SQL Can create additional indexes and materialized views for better query performance Not all Data Types supported (See the manual for a list)

Optional Delay

AdditionalIndexes &

Materialized Views

Sync or Async Redo Shipping

Network

ContinuouslyOpen for Reports

Transform Redo to SQL and Apply

Data Guard BrokerPrimary

Database Logical StandbyDatabase

Page 44: Oracle & sql server comparison 2

Standby Databases Are Not Idle

Standby database can be used to offload the primary database, increasing the ROI

Standby Server

StandbyDatabase

Reporting

BackupsTape

Page 45: Oracle & sql server comparison 2

Protection from Human Errors and Data Corruptions

The application of changes received from the primary can be delayed at standby to allow for the detection of user errors and prevent standby to be affected

The apply process also revalidates the log records to prevent application of any log corruptions

Primary Site

StandbyDatabase

Standby Site

ProductionDatabase

Optional Delayed Apply

Page 46: Oracle & sql server comparison 2

Oracle 11g Top Features:

Database ReplaySQL Performance AnalyzerPartitioningTransparent Tablespace EncryptionFlashback Data ArchiveSQL Plan ManagementPrivate StatisticsMore ConcurrencyResult Cache

Page 47: Oracle & sql server comparison 2

Database Replay

Database stack

Productiondatabase

Databasebackup

Capture directory

Recording infrastructure

Shadow Shadow Shadow ShadowShadow capture file

Shadow capture file

Shadow capture file

Shadow capture fileBackground Background

Page 48: Oracle & sql server comparison 2

Database Replay(Cont) Oracle Database Replay addresses the issues associated with environmental changes by providing the ability to test the impact of those changes on a test system. Thus, you can gauge the impacts of these changes before you move them to production. The testing takes a sample workload that you record during a given period of time and “replays” it on your test system. Important workload attributes such as concurrency and transactional dependencies are maintained to make the testing as real-world as possible. What kinds of changes might you test? Such changes include:

Database UpgradeDatabase Patch InstallationRAC related changes(adding nodes, interconnect changes, …)OS platform changes and upgradesHardware changes

Page 49: Oracle & sql server comparison 2

SQL Performance Analyzer: It’s very similar to Database Replay; but with some important differences. SPA doesn’t record anything; you can capture the SQL statements from the SQL Tuning Sets or the library cache, or you can write your own SQL statements. Once it gets a number of SQL statements, it replays them against the database after changing some parameter you specify.

DB

DB

Capture SQL

Execute SQL

Make Chang

e

Execute SQL

Compare Perf

Storage

Storage

Production Test

Client Client Client

Page 50: Oracle & sql server comparison 2

SQL Performance Analyzer EM Support:

Page 51: Oracle & sql server comparison 2

Partitioning:Several New partitioning features introduced in Oracle Database 11g provide IT organization with simplicity in managing their partitioned objects while increasing their ability to scale and perform. Below is a matrix of all partition types.

Range List Hash

Range YES YES YES

List YES YES YES

Interval YES YES YES

Page 52: Oracle & sql server comparison 2

Transparent Tablespace Encryption: Oracle Database 10g introduced Transparent Data Encryption (TDE), allowing you to encrypt data within specific columns of a table. Oracle Database 11g enhances Transparent Data Encryption by providing for the encryption of all contents of a given Tablespace. Any permanent Tablespace can be encrypted. Undo and temporary tablespaces cannot be encrypted; however, all blocks and data created in these Tablespace types will be encrypted if they originate from an encrypted Tablespace. Additionally the redo log stream will be encrypted.

Supported Encryption Algorithm3DES168AES128AES192AES256

Page 53: Oracle & sql server comparison 2

Transparent Tablespace Encryption: Oracle Database 10g introduced Transparent Data Encryption (TDE), allowing you to encrypt data within specific columns of a table. Oracle Database 11g enhances Transparent Data Encryption by providing for the encryption of all contents of a given Tablespace. Any permanent Tablespace can be encrypted. Undo and temporary tablespaces cannot be encrypted; however, all blocks and data created in these Tablespace types will be encrypted if they originate from an encrypted Tablespace. Additionally the redo log stream will be encrypted.

Supported Encryption Algorithm3DES168AES128AES192AES256

Page 54: Oracle & sql server comparison 2

Flashback Data Archive:

In Oracle 9i flashback transactions has been introduced. When data is updated the past image of the block is stored in undo segments, even if the data is committed. But mentioned data came from undo segments and undo data is not kept forever it is flushed if it’s not needed and there is a demand for space from a new transactions. Oracle 11g a new feature called Flashback Data Archive introduced.

ORDERS

User Tablespaces

Flashback Data Archive

ArchiveTables

Oracle Database

Changes

Select * from orders AS OF ‘Midnight 31-Dec-2004’

Page 55: Oracle & sql server comparison 2

Define a flash back and add a table to that:Create flashback archive far1 tablespace ts_far1 quota 1g retention 1 year;Alter table test flashback archive far1;

By adding table test to flashback archive, whenever the table is changed, the past image will be stored in the flash recovery area.Flashback Data Archive advantage over triggers:

The process done by oracle software code and oracle internal process it self. So there is no trigger related performance impact , no context-switching or checking for dependencies.It’s possible to continue using the queries for flashback queries and limitation related to undo segments has been rectified.

Flashback Data Archive(Cont)

Page 56: Oracle & sql server comparison 2

SQL Plan Management:What is your biggest concern while collecting statistics on objects? Is it the fear of breaking something , and more specifically, breaking a perfect execution plan? In oracle 11g this problem resolved through a feature called SQL Plan Management (SPM). Whenever a new execution plan is calculated , it is base lined in a store called SQL Management Base. Once base lined, the SQL execution plan is attached to the query.

To enable this feature we should set below parameter to TRUE:

Optimizer_capture_sql_paln_baselines

Page 57: Oracle & sql server comparison 2

Private Statistics:Oracle 11g allows DBMS_STATS to gather stats in private area instead of storing in Data Dictionary. This way oracle Optimizer continue to work with stats collected in Data Dictionary until you are done in validating the new Stats collected in Private area. When Validating of statistics completed it can be published in Data Dictionary.

Page 58: Oracle & sql server comparison 2

More ConcurrencyAdd more columns or modify a column it can fail by below error: ORA-00054: resource busy and acquire with NOWAIT specified

Above error occur because table has been locked by some transactions, so the other sessions can’t get an exclusive lock on the table to execute the DDL statement.

In Oracle Database 11g there are two major enhancement to improve concurrencies like these:

You can add a column to the table event when another transaction holds row locks on the tableYou can instruct the session to executing the DDL to wait for some specified time in seconds.

Alter session set ddl_lock_timeout=30;

Page 59: Oracle & sql server comparison 2

Result CacheWith SQL Query Result Cache the results of a query are stored in the SGA , and then can be used in subsequent queries.

To use of this feature:Set the result_cache_max_size

SELECT …

SQLQuery Result Cache

SELECT …Session 1 Session 2

1

2 3

Page 60: Oracle & sql server comparison 2

Capture the Source Database The first step is to capture a "snapshot" of the Microsoft SQL Server database. This can be done in two ways.

1. Online Capture: This requires creating a connection in SQL Developer to a live Microsoft SQL Server database. Using JDBC, the Microsoft SQL Server database metadata can be accessed and the Capture Model created.

2. Offline Capture: This involves BCP scripts generated by SQL Developer to extract the Microsoft SQL Server database metadata to files. These files can then be "captured" by SQL Developer to create the Captured Model.

The second method is what you will perform in this tutorial. Using SQL Developers Offline Capture feature, the Microsoft SQL Server Northwind sample database has been extracted into offline data files. The SQLServer2005.ocp file generated by the Capture tool contains the database schema information for the Microsoft SQL Server Northwind Traders database. Oracle SQL Developer Migration Workbench uses this file as the basis for building a representation of the structure of the source Microsoft SQL Server database. This structure is called the Captured Model.

SQL Server Migration To Oracle: An Oracle database provides you with better scalability, reliability, increasedperformance, and better security than other third-party databases. For this reason,organizations migrate from their current database, such as Microsoft SQL Serverand Microsoft Access, to an Oracle database.

Page 61: Oracle & sql server comparison 2

Convert the Captured Database Oracle SQL Developer Migration Workbench uses the Captured Model to convert the captured objects to Oracle-format objects, building up a representation of the structure of the destination database. This structure is called the Converted Model.

Generate the Oracle Database Oracle SQL Developer Migration Workbench generates DDL statements to create the new Oracle database, based upon the Converted Model objects. Running the DDL statements will result in the creation of the objects in the Oracle database.

Migrate the Data The last step in the process is to migrate the data. You can do this in one of two ways.

1. Online Data Move: You can create a connection from within Oracle SQL Developer to your Microsoft SQL Server source database and migrate the data.

2. Offline Data Move: You can export the data from Microsoft SQL Server. SQL Developer</font> will create a series of BCP and sqlldr files that you can run from a batch file.