Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Convert SQL server to Oracle?

I have a SQL server database (Tables, Views, SP...). I need to convert this database to Oracle 10g. How can I do it?

like image 805
Gold Avatar asked Mar 29 '09 05:03

Gold


People also ask

How do I transfer data from SQL to Oracle?

Right click on any database/table, then click on "copy to oracle" there and choose the right user[database] at "Destination Connection Name " where you want to copy your tables. You can also change some properties there. Click "OK" and that's it.

Is SQL Server better than Oracle?

Oracle supports many “Schemas” with the instance, whereas SQL server offers “Schemas” within each user database. Oracle allows database, full, file-level, incremental & differential backups, on the other hand, SQL server allows full, partial, and incremental backups.

Is SQL same for Oracle and SQL Server?

The main difference between the two languages is how they handle variables, stored procedures, and built-in functions. PL/SQL in Oracle can group procedures into packages, which cannot be done in MS SQL Server." While PL/SQL is more complex and has more' capabilities,' T-SQL is simpler and easier to use.

Can SQL Server connect to other servers like Oracle?

Yes, you can do it. You can use Linked Servers feature on SQL Server (plus an Oracle OLE DB Provider) to configure access to an Oracle database and do both queries and DML from SQL Server.


2 Answers

Transferring the data will be easy; SQL Server integration services can do that, or Oracle's SQL Developer.

However, views and stored procedures are different between Oracle and SQL Server. SQL Server uses T-SQL, Oracle uses PL/SQL. These are not very compatible and I don't know a tool can automatically convert between the two. If your database relies on specific T-SQL features, you will need a developer to do the conversion.

like image 80
Andomar Avatar answered Sep 20 '22 18:09

Andomar


Get the jTDS jdbc driver from sourceforge.

Add it to Oracle SQL Developer.

Tools > Migration > Migrate

enter image description here

Create a migration repository in your new Oracle database.

Create a new migration project.

Point it to your SQL Server database.

Convert it - mind the data types.

Migrate the data:

  1. online row-by-row inserts over JDBC. Fine for SMALL/test boxes.
  2. offline - use micrsosoft's unload utility to pull the sql server down to flat files. SQL Developer will create SQL*Loader scripts to put them over into Oracle.
  3. If you have GoldenGate licensed, use that to move the data over and to synch changes from one system to the other in case you need to keep both up and going.

Start looking at the migrated T-SQL procs and functions. SQL Developer will leave comments for code blocks it wasn't able to translate...but you will need to TEST and VERIFY every single translation. Customers can see upwards to 80-90% translation rates for their T-SQL, but it could be as low as 50%...it just depends on the nature of your code.

The entire process is described here.

I wrote a white paper, with Sybase ASE as the example source platform, here. The process is identical for SQL Server. It has step-by-step guidance with screenshots.

If you have an Oracle account manager, reach out for help. We have specialists that deal exclusively with migrations such as yours. They have lots of practical advice and can recommend 3rd party partners if you lack the expertise.

like image 25
thatjeffsmith Avatar answered Sep 19 '22 18:09

thatjeffsmith