9.8 MDB
The MDB command enables the import of tables and data from MDB (Microsoft Access Database) files into an Oracle database schema.
You can run the MDB command in SQLcl using mdb
.
To view the help information for MDB, enter help mdb
.
The following two sub-commands are supported, enabling listing or copying data from a Microsoft Access database file.
List Data
Lists tables or saved queries (views) that exist in the specified MDB file and outputs the list.
Syntax
mdb list {OPTIONS}
Options
Option | Description |
---|---|
Required | |
-file|-fi <file> |
Path of the Microsoft Access database file. |
Optional | |
-tables|-tabs |
Only the tables that exist in the specified Microsoft Access file. |
-views|-vw |
Only the views or saved queries that are saved in the Microsoft Access database. |
Examples
List all tables and saved queries in an MDB file.
mdb list -file mdb_file.mdb
Copy Data
Copy tables or views from the Microsoft Access database to the Oracle Database.
Syntax
mdb copy {OPTIONS}
Options
Option | Description |
---|---|
Required | |
-file|-fi <file> |
Path of the Microsoft Access database file. |
Optional | |
-tables|-tabs |
Only the tables that exist in the specified Microsoft Access file. |
-views|-vw |
Only the views or saved queries that are saved in the Microsoft Access database. |
-prefix|-pr <prefix> |
Name to add before the table or view table names. |
-table|-tab <table> |
Copy a specific table from MDB file into Oracle Database. |
-mode|-mo <mode> {APPEND|REPLACE|SKIP|TRUNCATE}
(REPLACE) |
Specify the mode of operation for handling existing data in the
destination table. The available options are:
|
Examples
Copy all from MDB file to Oracle Database.
SQL> mdb copy -file mdb_file.mdb
Replace the existing target table by dropping it if it exists, then recreate it and add the data.
SQL> mdb copy -table employees -file mdb_file.mdb -mode replace