[Ingres] Importing/ Exporting data

Last update on June 16, 2009 08:54 AM by jak58
Published by netty5

[Ingres] Importing/ Exporting data






Ingres allows you to export data from an Ingres installation to another (it is a platform independent procedure).
unloaddb

copydb

The main difference between these two commands, lies in the parameters defining them:

unloaddb regroups all the basic objects (including sources of tools for front end type ABF, OpenROAD or Report Writer, the Replicator catalogs

copydb regroups objects that it will invoke.

Making use of these commands


copydb


Example
copydb mydatabase mytable


This command will generate 2 files: copy.in and copy.out as long as the table myTable and mydatabase exists

These files contain a series of SQL commands:

copy.out:
unloading data: COPY TABLE ... INTO ...

copy.in:
Creation of the table: CREATE TABLE ...
Structure of the table: MODIFY ...
Reloading data: COPY TABLE ... FROM ...
Creation of the indexes:CREATE INDEX ...


Using these files:

To retrieve data:
sql mydatabase < copy.out 


To reload data:
sql mydatabase < copy.in

unloaddb


Example
unloaddb mydatabase 


4 files will be generated: copy.in, copy.out, reload.ing and unload.ing (or reload.bat and unload.bat under Windows)

Just like the copydb command, copy.in anf copy.out files contain the SQL commands necessary for the unloading of data , creation of objects (tables, indexes, rules, procedures, views)and reloading data. The main difference is the unloaddb that can generate programs to call these files containing SQL code.

Notes


To make a portable copy from an OS to another use the-c option (available for each of these 2 commands) that will allow you to generate export/import data in an ASCII format.

The following variables are not exhaustive:
II_DATE_FORMAT: date format
II_DECIMAL: decimal separator
II_MONEY_PREC:precision money data type
II_MONEY_FORMAT: money data format type (currency)
II_NULL_STRING: text used to represent null value
These variables must be identical between the source and the target machine.

Declare the same locations: same number, names, and types. The directories may be different

Extend the target database to the same locations as the source database: using infodb command, database check the locations of both, use accessdb or extenddb to extend a base.

Capture the result (stdout) of a file, and look for any line beginning with E_. This indicates an error that Ingres needs to analyze.

If a reload or copy.in fails, it may be due to the fact that the objects you are trying to create, exist already.
Best answers for « Importing/ Exporting data » in :
Microsoft Office Outlook - How to Import & Export your e-mai Show Microsoft Office Outlook - How to Import & Export your e-mails? Issue Solution Issue You are buying a new PC/Laptop or Re-installing windows as you are having some problems with windows but you want to keep all your e-mails on...
[Oracle] Optimize the performance of the Import/ Export Show[Oracle] Optimize the performance of the Import/ Export Optimizing the performance of the Import/Export Make use of "commit = y" Adjust the buffer size needed to « BUFFER=…. » Note that its recommended that you disable the triggers,...
Save/Import your Messenger contacts ShowSave/Import your Messenger contacts Save the list of contacts Import contact list Always make a backup of your contact list, it’s very useful when creating a new account Messenger, or in case of crash account (yes! This can happen)....
Firefox 3 Bookmark Manager ShowFirefox 3 Bookmark Manager Compared to Firefox 2, Firefox 3 uses a new manager for bookmarks. Bookmarks are no more stored in the bookmarks.html file (in the directory of your Firefox profile), but in a SQLite database...
Download GANTT Project ShowGanttProject is a free project management tool allowing to realize GANTT diagrams to plan a project and manage the resources. GanttProject is a complete tool proposing import / export features towards Microsoft Project, as well as export functions...
Data transmission - Cabling ShowCabling types Several physical data-transmission media are available to connect together the various devices on a network. One possibility is to use cables. There are many types of cables, but the most common are: Coaxial cable Double twisted...
Data transmission - Introduction ShowData representation The purpose of a network is to transmit information from one computer to another. To do this, you first have to decide how to encode the data to be sent, in other words its computer representation. This will differ according to...
Data transmission - The physical connection ShowWhat is a transmission channel? A transmission line is a connection between two machines. The term transmitter generally refers to the machine that sends the data while receiver refers to the one receiving the data. The machines can sometimes be...