Here you can find the detailed instruction on how to export data from SQL Server database to Oracle database in Exportizer software.

Below, it is shown how to export data from GUI or command line.

Export Conditions

In most cases, to export data from SQL Server to Oracle, the following conditions are required:

  • We recommend to use Exportizer Enterprise and FD interface when working with SQL Server and Oracle databases. FD engine does not require ODBC drivers and exports data much faster. But if you prefer to use ODBC for both databases, Exportizer Pro can be used.
  • SQL Server client must be installed and its architecture (32-bit or 64-bit) must match Exportizer architecture.
  • Oracle client must be installed and its architecture (32-bit or 64-bit) must match Exportizer architecture.
  • All other involved components, e.g. ODBC drivers (if you use ODBC on source or target side), OLE DB providers etc. must also match Exportizer architecture.

Note: If your operating system is 64-bit, you can install both 32-bit and 64-bit versions of the Exportizer software and use them independently.

Configuring SQL Server to Oracle Migration

If you are exporting data via GUI:

  1. Launch Exportizer Pro or Exportizer Enterprise.
  2. Register your source SQL Server database by choosing File | Connect / Register... menu. You have several ways to register it.
  3. Register your target Oracle database. You can register it by several ways. Note: You can register the target database from the Export dialog during the exporting.

Export Steps (GUI)

  1. Open the registered SQL Server database.
  2. Choose a table or tables to export or write and execute your SQL query or queries. Please note that exporting multiple datasets at a time is available in Exportizer Enterprise only.
  3. Click Export button .
  4. Switch to the Database tab and select your registered Oracle database as a target database. If you did not register it yet, click '...' button to the right to register it.
  5. Specify export parameters. Some notes:
    • Turn on the Memory saving mode option and its related options. In case of exporting problems, if you suspect that they can be caused by these options, try different combinations of them. If exported data or column names on any side can contain Unicode characters, set the corresponding stream Encoding, e.g. UTF-8.
    • Specify a Table name, i.e. name of the target table. For multi-table exporting, you can leave it empty, otherwise, the data will be exported to one destination table.
    • Both SQL Server and Oracle support optional table descriptions (comments). Please note that in SQL Server, the application uses MS_Description extended property for this. You can either type a description for the target table(s) or copy it from the source (if any) by one click. Note that descriptions are applied during the table creation only; they are ignored when the export mode (see below) is appending, updating, or deleting records in existing target table.
    • Choose the needed Export mode. To learn about all possible modes, read detailed description for Database target format. For multi-table exporting, this mode will be applied to the most of the tables, and you can override it for specific tables at the next step. For example, it can be Replace+Insert for the most of tables, and Update or Append+Update for others etc.
    • A few words about Commit interval parameter. The bigger its value, the faster your exporting process. But too big value may cause memory and other issues. Therefore, if you build a regularly executed task, try to play with it (starting from lower values) to find the optimal value before porting the solution to your production environment.
    Exporting Data to Oracle Database
  6. Click Next.

    For multi-table exporting, specify the source-to-target table mappings, otherwise check the source-to-target field mappings.

    In field or table mappings, you create the correspondence between the source objects (tables and/or fields) and target objects.

    In field mappings, in addition to source table fields, you can also use calculated fields specified by formulas.

    It is possible to define full specifications for target columns here, i.e. rename target columns, choose their types, specify NOT NULL constraints, default values, primary key flags, descriptions (comments) etc. These specifications will be applied when the target table needs to be created or overwritten.

    Customizing Target Oracle Table
  7. Click Next to proceed to export logs and error handling options or click Export to start the export process immediately.

Exporting SQL Server to Oracle from Command Line

Command Line Example

Here is how to export a group of SQL Server tables to Oracle:

exptizer.exe /silent /export /ExportType=DATABASE /ExportMode=REPLACE+INSERT /CommitInterval=500 /SrcDBInterface=FD /SrcDBKind=DSN "/SrcDBDriver=SQL Server" "/SrcServer=localhost\SQLEXPRESS" /SrcDBUserName=sa /SrcDBPassword=sa_password /TrgDBInterface=FD /TrgDBKind=DSN /TrgDBDriver=ORACLE /TrgOSAuthentication=Yes /TrgAuthenticationMode=Normal /TrgVendorHomepath=C:\app\John\product\12.1.0\client_1 /TrgDB=cloud_prod "/TableMappingsFile=c:\DWH\Export\SQL-Server-To-Oracle-Table-Mappings.xml" /LogFile=C:\DWH\Export\Log\export.log /AppendLog

Note: You can add other parameters to the command lines above in accordance with the documentation.

Action File Example

The command line above can be transformed to an action file, which is much more comfortable to work with. You can run action files either form the command line or from Exportizer GUI. The action file contains all the command line parameters (except /silent switch), one parameter per line, and allows comments:

/export 
/ExportType=DATABASE 
/ExportMode=REPLACE+INSERT ;Target tables recreated when exist
;/ExportMode=APPEND ;Incoming records are appended to target tables
/CommitInterval=500 ;Issue COMMIT after exporting every 500 records
/SrcDBInterface=FD 
/SrcDBKind=DSN 
/SrcDBDriver=SQL Server 
/SrcServer=localhost\SQLEXPRESS ;IP address or server URL
/SrcDBUserName=sa 
/SrcDBPassword=sa_password 
/TrgDBInterface=FD 
/TrgDBKind=DSN 
/TrgDBDriver=ORACLE 
/TrgOSAuthentication=Yes 
/TrgAuthenticationMode=Normal 
/TrgVendorHomepath=C:\app\John\product\12.1.0\client_1 
/TrgDB=cloud_prod ;a name from tnsnames.ora file 
/TableMappingsFile=c:\DWH\Export\SQL-Server-To-Oracle-Table-Mappings.xml ;a file with table source-to-target table mappings 
/LogFile=C:\DWH\Export\Log\export.log ;a file for writing logs to 
/AppendLog ;keep previous logs and add new logs to the end of the log file

See also

 Opening SQL Server Databases

 Opening Oracle Databases

 Command Line Usage