Skip to main content

Oracle vs. Microsoft SQL Server

Many Similarities, But Different?

RDBMSs:


There are allot of different relational database management systems (RDBMS) out there. You may have heard about Microsoft Access, Sybase, and MySQL but the two most famous and widely used are MS SQL Server and Oracle. Although there are many common things between the two RDBMSs there are also a number of key differences.  In this blog, I will take a look at several in peculiar, in the areas of their command language, how they manage transaction control and their management of database objects.

LANGUAGE:


Perhaps the foremost obvious distinction between the 2 RDBMS is the language they use. Though each systems use a version of Structured Query Language, or SQL, MS SQL Server uses Transact SQL, or T-SQL, which is an extension of SQL originally developed by Sybase and used by Microsoft. Oracle, meanwhile, uses PL/SQL, or Procedural Language/SQL. Both are different "flavors" or dialects of SQL and both languages have different syntax and capabilities. The main difference between the 2 languages is how they handle variables, stored procedures, and built-in functions. PL/SQL in Oracle can also group procedures together into packages, which can not be done in MS SQL Server. In my opinion, PL/SQL is complex and probably more powerful, whereas T-SQL is much more simple and easier to use.

Transaction Control


Another one among the foremost variations between Oracle and MS SQL is transaction control. For the aim of this article, a transaction can be defined as a block of operations or task that ought to be treated as one entity. For example, a set of SQL queries altering records that every one should be updated at the same time, where (for example) a failure to update one record among the group should conclude none of the records being updated. As a default manner, MS SQL Server will execute and commit every command or task individually, and it will be difficult or maybe not possible to roll back the changes if any errors are encountered along the way. To properly group statements, the "BEGIN TRANSACTION" command is used to declare the start of a transaction and either a COMMIT statement is used at the end. This COMMIT statement will write the modified data to disk and end the transaction. During the transaction, the ROLLBACK command will reject any changes made within the transaction block. When properly used with error handling the ROLLBACK permits for a few degree of safety against data corruption. When a COMMIT is issued, it's not possible to roll back any further than the COMMIT command.

Within Oracle, on the other hand, each new database connection is considered as a new transaction. As queries are executed and commands are issued, changes are made solely in memory and nothing is committed until an explicit COMMIT command is given (with a few exceptions to DDL commands, which include "implicit" commits, and are committed immediately). After the COMMIT the next command issued primarily starts a new transaction, and the process begins again. This provides much better flexibility and assists for error control as well, as no changes are committed to disk unless or until the DBA explicitly issues the command to do so.


Organization of Database Objects


The last distinction i would like to talk about is how the RDBMS organizes database objects. MS SQL Server organizes all objects, like tables, views, and procedures, by database names. Users are assigned to a login that is granted access to a specific database and its objects. Also, in SQL Server each database has a private, unshared disk file on the server. In Oracle, all the database objects are shared among all schemas and users. Although it's all shared, each user can be restricted to certain schemas and tables via roles and permissions.


To conclude, both Oracle and Microsoft SQL Server are powerful RDBMS choices. Though there are a number of differences in how they work "under the hood", they can both be used in roughly the same ways. Neither is objectively higher than the other, however some situations help to make recommendations on how to improve, upgrade, or maintain your key mission-critical infrastructure. 
So the above differences will help you know the answer of your question of how one is so renowned and the other one is still on the way to progression. 



Comments

Popular posts from this blog

Oracle Database 19c Step by Step Installation On Oracle Linux 7.6

This post describes the installation of Oracle Database 19c 64-bit on Oracle Linux 7.6  x86-64 bit. The Linux server needs a minimum of 3G swap and secure Linux set to permissive. An example of this type of Linux installation can be seen here . Download Software Download the Oracle software from oracle edelivery . Oracle Installation Prerequisites Automatic Setup Use the "oracle-database-preinstall-19c" package to perform all your prerequisite setup. # yum install -y oracle-database-preinstall-19c If you are using RHEL7 or CentOS7, you can pick up the PRM from the OL7 repository and install it. It will pull the dependencies from your normal repositories. # yum install -y https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm Hosts File Set a fully qualified name for the server in the "/etc/hosts" file. < IP-address > < fully-qualified-machine-name > < machin...

How to Delete Old Trace & Dump files with ADRCI

The ADRCI command interpreter has multiple features:- Create a package with incident or problem information for Oracle Support Analyze diagnostic data within the Automatic Diagnostic Repository (ADR) Run health checks In this post, we'll be concentrating on deleting the old diagnostic files with ADRCI. Set your environment and run the ADRCI utility: $ adrci Use the following command to list the ADR homes: adrci> show home ADR Homes: diag/rdbms/db11g/DB11G diag/tnslsnr/sol10/listener Choose the ADR home from the list above: adrci> set home diag/rdbms/db11g/DB11G Check the current retention policy: adrci> show control Check the following columns in the output: LONGP_POLICY:- It is set to 365 days by default. It is responsible for Incidents and Health Monitor warnings. SHORTP_POLICY:- It is set to 30 days by default. It manages the trace and core dump files. Use the following commands to change the retention policy: Specify the time in hours: 10 Days = 240 ...

Oracle Database 12C Error Codes, Solutions and Suggestions from ORA-19700 to ORA-20000

Oracle 12C Error Codes, Solutions and Suggestions from ORA 19700 to ORA 20000 ORA-19700: device type exceeds maximum length of string Cause:  The device type indicated is invalid. Action:  Supply a correct device type and retry the allocation. ORA-19701: device name exceeds maximum length of  string Cause:  The device name indicated is invalid. Action:  Supply a correct device name and retry the allocation. ORA-19702: device parameter exceeds maximum length of  string ORA-19703: device command string exceeds maximum length of  string Cause:  The device command string exceeds maximum length. Action:  Correct the command and retry the operation. ORA-19704: file name exceeds maximum length of  string Cause:  The specified file name, which was a parameter to a copy, backup, or restore operation, exceeds the maximum file name length for this operating system. Action:  Retry the operation with a s...