Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2004
    Posts
    3

    Unanswered: Informix DBImport Help!

    In my environment I have two databases each in their own environment. I am trying load (a) to (b) and am having problems doing this. First off, the environments are not totally identical, the database chunks are not the same (b) has fewer chunks but is should still have enought space to hold database (a). I ran a dbexport on (a) and when I run a dbimport on (b) I get the following message.....

    *** create database
    330 - Cannot create or rename database.

    100 - ISAM error: duplicate value for a record with unique key.


    The environment where I am going still has the old database online (in onmonitor) is it possible to move one database to another environment? And if it is, why is this error coming up?

    I realize I have not given much information but I will be the first to admit I am a UNIX admin, not an informix admin.

    Any help would be apprcieated...

    K-

  2. #2
    Join Date
    Dec 2003
    Location
    North America
    Posts
    146
    Hi kdanjou,

    You cannot dbimport a database called "production" into a database called "test" if "test" already exists.

    dbimport is totally creating a new database, not insert data from another database into the existing database.

    You must drop the "test" database first and then you will be able to dbimport into "test".

    The SQL script generated by dbexport has all the information necessary to create a new database using dbimport.

    Good luck

    Mike

  3. #3
    Join Date
    Jul 2004
    Posts
    3

    Dropping database

    how do I go about dropping the database without losing the chunks of raw space that were created? Is that possible?

    Thanks,

    K-

  4. #4
    Join Date
    Dec 2003
    Location
    North America
    Posts
    146
    Hi kdanjou,

    Let's say you have an IDS instance called "work_one".

    work_one is made up of some dbspaces, some critical (rootdbs, physdbs, logdbs, and tempdbs) and some user defined (dbs1, dbs2, dbs3, etc ....).

    All these dbspaces are created using "chunks" of raw space and these chunks are created from logical volumes.

    The dbspace(s) contain the database tables and indexes.

    When you drop a database, you're removing the contents of some dbspaces, like dbs1 and dbs2, but the empty dbs1 and dbs2 dbspaces remain and are ready to receive the dbimport.

    Note: the SQL script generated by dbexport will have the source database dbspace(s) for indexes defined explicitly in the SQL script for each index. All these must be changed to the correct dbspace(s) that will be used for the target database.

    The dbspace for the target database tables is defined using dbimport from the command line.

  5. #5
    Join Date
    Jul 2004
    Posts
    3

    DB Import

    Thanks for that info, but then I have a question, what happens if both databases are named the same thing? Also, when I looked at the sql script (which is the database name) there is nothing in there listing what chuncks contain what information. I have a database named elitedbs and the chuncks under it are elitesec1-20 and none of those names are listed in the sql file.

  6. #6
    Join Date
    Dec 2003
    Location
    North America
    Posts
    146
    Hi kdanjou,

    Every database in an instance must have a unique name.

    If you want two databases with the same name, then you must put each database in a separate instance.

    Informix IDS concerns itself with dbspace names at the database level, it does not care about the chunks that make-up the dbspace at the "create database" level.

    If you have a dbspace that is made up of 10 chunks and you drop the database that exists in the dbspace, the dbspace still exists and is still made-up of the same 10 chunks.

    If you drop dbspaces, then you are performing an action that will affect chunks.

    Dropping a database is like erasing everything on a piece of paper, you still have the paper & you don't concern yourself where the paper came from.
    Last edited by mjldba; 07-09-04 at 10:12.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •