PrimeBase ODBC Importer

The PrimeBase ODBC importer is a tool that you can use to import the schema and data from any ODBC compliant database into PrimeBase. The objective of the importer is to give users a quick and simple way to get their data into PrimeBase.

 

When you start the importer you will be presented with a screen that looks like this:

Select importer action:
----------------------------------------------------------------------
1 Create a new PrimeBase ODBC data source.
2 Select Export/Import data sources.
3 Close Export/Import data sources.
4 Import Database schema.
5 Import data
6 Quit.
----------------------------------------------------------------------
Select an item from the list:

Create a new PrimeBase ODBC data source. :

This selection will prompt you for information to create a PrimeBase ODBC data source.

If you already have an ODBC data source set up for the PrimeBase server into which you want the data imported then you do not need to create a new one. Before using this option you must know :

If the PrimeBase server is installed on the same machine as the importer tool and you haven’t changed the server’s name or administrative user’s information, then you can create a PrimeBase data source by just using the defaults.

 

Select Export/Import data sources.:

This selection will present you with 2 lists, both containing the known ODBC data sources. From the first list choose the ODBC data source from which the data is to be imported from,. From the second list choose a PrimeBase ODBC data source into which the data is to be imported. In both cases you will be asked for a user and password.

Close Export/Import data sources.:

This selection closes the connection to the data sources.

Import Database schema.:

This selection will present you with a list of tables that are in the source database but not in the destination database. You can choose one or more from the list. If you want to import everything in the list choose the last entry. If you want to selectively choose the tables to import, select the tables that you want by number one at a time and then enter 0 (zero) to end your selections.

After you have selected the tables who’s schema you want imported, the importer will start the import process. If there is an error while importing, an error message will be displayed and, unless it is an unrecoverable error, you will be ask if you want to continue or not. A couple of common recoverable errors that might occur are import tables which do not contain a primary key in which case the importer will assume the first column in the table to be the primary key and objects with non ODBC compliant names. ODBC compliant names must start with a letter and be followed by zero or more letters, digits or ‘_’ characters. Letters can be upper or lower case but must be from the English alphabet. If a non compliant name is found the importer will convert it to a compliant name by replacing any illegal leading characters with an ‘x’ and any internal illegal characters with an ‘_’.

Note: The database schema that the importer creates is a simplified version of the source's table schema, i.e. no primary key will have been specified and all columns will accept NULL values. In addition no indexes will have been created. This is done so as to improve the chances of the data being imported into the tables with out errors. It has been observed that often ODBC drivers will report that columns do not accept NULL only to discover during the data import that the columns contain NULLs. For this reason it is best that the data be imported into the table first and then use the PrimeBase administrator to add the required restrictions, keys, and indexes later.

 

Import data:

This selection will present you with a list of tables which are in both the source and destination database and have not yet been imported in the current session. Choose one or more of the tables to import data from in the same manner as selecting tables to import the schema from.

After you have made your selections the data will be imported for all the tables that you have selected. If there is an error while importing, an error message will be displayed and, unless it is an unrecoverable error, you will be ask if you want to continue or not. Depending on the error the record on which it occurred may not be imported.

Quit.:

Disconnect from any data sources and quit the application

 

Tested ODBC drivers:

The importer "should" work with all ODBC drivers that have core and level 1 support. Currently it has been successfully used with the following ODBC drivers:

Windows:

Macintosh:

Notes:

Oracle: Several bugs have been noted in the Oracle ODBC

If anyone has any experiences, good or bad, with other ODBC drivers we would be interested in hearing about them and adding them to this document for the benefit of other users. And of course if you find any thing that you think is a bug in the PrimeBase ODBC importer or a place where things could be improved, we would be interested in hearing about that also. Send your comments to Support@PrimeBase.net, be sure to mention the platform and ODBC driver version used.