Oracle & sql server comparison 2

8,293 views
8,130 views

Published on

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
8,293
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
453
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Oracle & sql server comparison 2

  1. 1. ORACLE & SQL Server Comparison<br />
  2. 2. <ul><li>Contents
  3. 3. Performance
  4. 4. Information Integration
  5. 5. High Availability
  6. 6. Automatic Storage Management
  7. 7. Oracle 11g Top Features</li></li></ul><li><ul><li>Performance
  8. 8. Concurrency Model
  9. 9. Indexing
  10. 10. Partitioning
  11. 11. Parallel Execution
  12. 12. Clustering</li></li></ul><li><ul><li>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.
  13. 13. Main differences of Implementation:</li></li></ul><li><ul><li>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.
  14. 14. The differences in the indexing</li></li></ul><li>Indexing(Cont….)<br />
  15. 15. Indexing(Cont….)<br />
  16. 16. <ul><li>Partitioning:Partitioning allows large database structures to be decomposed into smaller and more manageable pieces
  17. 17. The differences partitioning</li></li></ul><li><ul><li>Parallel Execution:Parallel execution of SQL operations can vastly improve the performance for operations involving large volumes of data
  18. 18. The differences in parallel execution
  19. 19. Oracle will execute INSERT, UPDATE, DELETE, and MERGE statements in parallel
  20. 20. With SQL Server 2005 INSERT, UPDATE ,DELETE statements are executed serially (MERGE is not supported)</li></li></ul><li><ul><li>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</li></ul>Private Interconnect<br />Node<br />Publicnetwork<br />Publicnetwork<br />Publicnetwork<br />Publicnetwork<br />Clusterwareon each node<br />
  21. 21. Clustering(Cont..)<br /><ul><li>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.
  22. 22. SQL Server 2000 & 2005 does not support this type of clustering</li></li></ul><li><ul><li>Information Integration
  23. 23. Federation
  24. 24. Replication
  25. 25. Message Queuing</li></li></ul><li><ul><li>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.
  26. 26. Homogeneous Federation
  27. 27. Supported by both by different manner
  28. 28. Heterogeneous Federation</li></li></ul><li>Federation (Cont…)<br /><ul><li>Replication</li></li></ul><li>Replication(Cont)<br />
  29. 29. <ul><li>Messaging Queuing</li></li></ul><li>Messaging Queuing (Cont)<br />
  30. 30. Messaging Queuing (Cont)<br />
  31. 31. <ul><li>High Availabiligy
  32. 32. Unplanned Downtime
  33. 33. System Failures
  34. 34. Data Failures
  35. 35. Disaster Recovery
  36. 36. Human Errors
  37. 37. Planned Downtime (Maintenance)
  38. 38. System Changes
  39. 39. Data Changes</li></li></ul><li>System Failures<br />Real Application Clusters<br />ASMFlashbackRMAN & Oracle Secure BackupData GuardStreams<br /> Data Failures<br />System Changes<br />Online ReconfigurationRolling Upgrades<br />Data Changes<br />Online Redefinition<br /><ul><li>Integrated High Availability features of Oracle Database</li></ul>UnplannedDowntime<br />Oracle MAA Best Practices<br />PlannedDowntime<br />
  40. 40. <ul><li>System Failures: Are the result of hardware failures, power failures, and operating system or server crashes.</li></li></ul><li><ul><li>Data Failures: It is vital to design a solution to protect against, and recover from, data and media failure.
  41. 41. Database Replay
  42. 42. SQL Performance Analyzer
  43. 43. Partitioning
  44. 44. Transparent Tablespace Encryption
  45. 45. Flashback Data Archive
  46. 46. SQL Plan Management
  47. 47. Private Statistics
  48. 48. More Concurrency
  49. 49. Result Cache</li></li></ul><li><ul><li>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.</li></li></ul><li>Disaster Recovery(Cont)<br />
  50. 50. Disaster Recovery(Cont)<br />
  51. 51. <ul><li>Human Errors: Data failures can result from human error , which may be due to accidents or event sabotage.</li></li></ul><li><ul><li>System Maintenance: As business needs change, system changes may also be required.</li></li></ul><li><ul><li>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.</li></li></ul><li><ul><li>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.
  52. 52. Features & Capabilities</li></ul>ASM Diskgroup<br />Mirroring<br />Striping<br />Striping<br />Failgroup1<br />Failgroup2<br />
  53. 53. Files, Extents, and Failure Groups<br />Files and extent <br />pointers<br />Fail groups and ASM mirroring<br />
  54. 54. <ul><li>Features & Capabilities
  55. 55. ASM and Oracle Managed Files
  56. 56. ASM Database
  57. 57. ASM Components
  58. 58. Disk Group Redundancy
  59. 59. Performance
  60. 60. Utilities</li></li></ul><li><ul><li>ASM and Oracle Managed Files
  61. 61. ASM extends the power of Oracle Managed Files
  62. 62. Creates and manages Files automatically
  63. 63. Understands different Oracle file types
  64. 64. Offers built-in data mirroring and striping Capabilities
  65. 65. Automatically balances I/O load across disk group(s)
  66. 66. Functionally like as LVM</li></li></ul><li><ul><li>ASM Database
  67. 67. When ASM is enabled, Oracle automatically creates a small database for storing ASM-related meta-data
  68. 68. The default database name is “+ASM”
  69. 69. The default RAC instances are “+ASMn”, where n is the node number
  70. 70. The ASM database may be managed with srvctl commands
  71. 71. Normally auto-managed by Oracle</li></li></ul><li><ul><li>ASM Components
  72. 72. Disk Groups
  73. 73. Oracle may provide disk mirroring (optional)
  74. 74. Oracle will stripe files across all available disks
  75. 75. Using ASM striping across a group of hardware striped LUNs can be beneficial to performance
  76. 76. Disks assigned to ASM Disk groups become ASM Disks
  77. 77. Files written on ASM disks become ASM files
  78. 78. Files are named with an Oracle-defined format
  79. 79. File name aliases may be defined for convenience
  80. 80. A hierarchical directory structure may be defined for file aliases</li></li></ul><li>ASM Components(Cont…)<br /><ul><li>Templates may be used to associate file attributes such as redundancy and striping with ASM files
  81. 81. ASM is implemented through an ASM instance that runs as a service on each node</li></li></ul><li><ul><li>Disk Group Redundancy
  82. 82. ASM Disk Groups may be defined with different levels of redundancy
  83. 83. NORMAL redundancy indicates that Oracle will create a software mirror for each disk
  84. 84. HIGH redundancy indicates that Oracle will create two mirror disks per data disk
  85. 85. Disk mirrors may be segregated into different locations by designating Failure Groups
  86. 86. EXTERNAL redundancy indicates that Oracle will not create any software mirrors. Hardware mirrors (if any) will be used instead
  87. 87. External redundancy is recommended for any system with a highly available storage array</li></li></ul><li><ul><li>Performance
  88. 88. ASM performance is sensitive to the number of disk spindles utilized
  89. 89. 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
  90. 90. Always use External Redundancy if you are using RAID-capable storage hardware
  91. 91. Multiple RAID 1 disks can be utilized in a Disk Group
  92. 92. ASM will provide the disk striping
  93. 93. Another option is to use multiple four disk RAID 10 groups as the building block for ASM Disk Groups
  94. 94. ASM will stripe on top of the hardware stripe, creating a stripe “plaid”, very desirable for OLTP and random I/O performance</li></li></ul><li><ul><li>Utilities
  95. 95. ACMCMD
  96. 96. SQLPLUS
  97. 97. OEM</li></li></ul><li><ul><li>Oracle DataGuard: </li></ul>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.<br /><ul><li>Data Guard helps you protect your Data.
  98. 98. Takes your data and automatically puts it elsewhere
  99. 99. Makes it available for Failover in case of failure.
  100. 100. The other capabilities are pure bonus.
  101. 101. Switchover for Maintenance
  102. 102. Reporting
  103. 103. Off-loading Queries
  104. 104. Backups</li></li></ul><li>Data Guard Pyramid<br />EM Data Guard Manager <br />Broker and CLI<br /> D a t a G u a r d<br />Production / Primary Databases<br />Physical and Logical Standby Databases<br />
  105. 105. <ul><li>High Level
  106. 106. Data Guard comprises of two parts
  107. 107. REDO APPLY (DR)
  108. 108. Maintains a physical, block for block copy of the Production (also called Primary) database.
  109. 109. SQL APPLY (Reporting)
  110. 110. Maintains a logical, transaction for transaction copy of the Production database.</li></li></ul><li><ul><li>Data Guard Redo Apply: Best for DR</li></ul>Data Guard Broker<br />Physical Standby<br />Database<br />Primary<br />Database<br />Optional<br />Delay<br />Backup<br />Network<br />Redo Apply<br />Sync or Async <br />Redo Shipping<br /><ul><li>Physical Standby Database is a block-for-block copy of the primary database
  111. 111. Uses the database recovery functionality to apply changes
  112. 112. Can be opened in read-only mode for reporting/queries
  113. 113. Can also perform backup, offloading production database
  114. 114. The best solution for DR</li></li></ul><li><ul><li>Data Guard SQL Apply</li></ul>Additional<br />Indexes & <br />Materialized Views<br />Data Guard Broker<br />Primary<br />Database<br />Logical Standby<br />Database<br />Optional <br />Delay<br />ContinuouslyOpen for Reports<br />Network<br />Sync or Async <br />Redo Shipping<br />Transform Redo <br />to SQL and Apply<br /><ul><li>Logical Standby Database is an open, independent, active database
  115. 115. Contains the same logical information (rows) as the production database
  116. 116. Physical organization and structure can be very different
  117. 117. Can host multiple schemas
  118. 118. Can be queried for reports while logs are being applied via SQL
  119. 119. Can create additional indexes and materialized views for better query performance
  120. 120. Not all Data Types supported (See the manual for a list)</li></li></ul><li>Reporting<br />Backups<br />Tape<br />Standby<br />Database<br /><ul><li>Standby Databases Are Not Idle</li></ul>Standby <br />Server<br />Standby database can be used to <br />offload the primary database, increasing the ROI<br />
  121. 121. Standby Site<br />Primary Site<br />Standby<br />Database<br />Production<br />Database<br />Optional Delayed Apply<br /><ul><li>Protection from Human Errors and Data Corruptions
  122. 122. 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
  123. 123. The apply process also revalidates the log records to prevent application of any log corruptions</li></li></ul><li><ul><li>Oracle 11g Top Features:
  124. 124. Database Replay
  125. 125. SQL Performance Analyzer
  126. 126. Partitioning
  127. 127. Transparent Tablespace Encryption
  128. 128. Flashback Data Archive
  129. 129. SQL Plan Management
  130. 130. Private Statistics
  131. 131. More Concurrency
  132. 132. Result Cache</li></li></ul><li><ul><li>Database Replay</li></ul>Capture directory<br />Shadow capture file<br />Shadow<br />Shadow<br />Shadow<br />Shadow<br />Shadow capture file<br />Recording infrastructure<br />Shadow capture file<br />Database stack<br />Shadow capture file<br />Background<br />Background<br />Databasebackup<br />Productiondatabase<br />
  133. 133. 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:<br /><ul><li>Database Upgrade
  134. 134. Database Patch Installation
  135. 135. RAC related changes(adding nodes, interconnect changes, …)
  136. 136. OS platform changes and upgrades
  137. 137. Hardware changes</li></li></ul><li><ul><li>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.</li></ul>Client<br />Client<br />Client<br /> DB<br />Test<br />Production<br />Storage<br /> DB<br />Storage<br />Capture SQL<br />Execute SQL<br />Make Change<br />Execute SQL<br />Compare Perf<br />
  138. 138. SQL Performance Analyzer EM Support:<br />
  139. 139. <ul><li>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.</li></li></ul><li><ul><li>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.
  140. 140. Supported Encryption Algorithm
  141. 141. 3DES168
  142. 142. AES128
  143. 143. AES192
  144. 144. AES256</li></li></ul><li><ul><li>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.
  145. 145. Supported Encryption Algorithm
  146. 146. 3DES168
  147. 147. AES128
  148. 148. AES192
  149. 149. AES256</li></li></ul><li><ul><li>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. </li></ul>Select * from orders AS OF ‘Midnight 31-Dec-2004’<br />ORDERS<br />Archive<br />Tables<br />Changes<br />User Tablespaces<br />Flashback Data Archive<br />Oracle Database<br />
  150. 150. Flashback Data Archive(Cont)<br /><ul><li>Define a flash back and add a table to that:
  151. 151. Create flashback archive far1 tablespace ts_far1 quota 1g retention 1 year;
  152. 152. Alter table test flashback archive far1;
  153. 153. By adding table test to flashback archive, whenever the table is changed, the past image will be stored in the flash recovery area.
  154. 154. Flashback Data Archive advantage over triggers:
  155. 155. 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.
  156. 156. It’s possible to continue using the queries for flashback queries and limitation related to undo segments has been rectified.</li></li></ul><li><ul><li>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.
  157. 157. To enable this feature we should set below parameter to TRUE:
  158. 158. Optimizer_capture_sql_paln_baselines</li></li></ul><li><ul><li>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.</li></li></ul><li><ul><li>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.
  159. 159. In Oracle Database 11g there are two major enhancement to improve concurrencies like these:
  160. 160. You can add a column to the table event when another transaction holds row locks on the table
  161. 161. You can instruct the session to executing the DDL to wait for some specified time in seconds.
  162. 162. Alter session set ddl_lock_timeout=30;</li></li></ul><li>1<br />2<br />3<br /><ul><li>Result CacheWith SQL Query Result Cache the results of a query are stored in the SGA , and then can be used in subsequent queries.
  163. 163. To use of this feature:
  164. 164. Set the result_cache_max_size </li></ul>SQLQuery Result Cache<br />SELECT …<br />SELECT …<br />Session 1<br />Session 2<br />
  165. 165. 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.<br />

×