Dbexport/dbimport/schema question?
Posted in 2008
Topics: Migration, Import/Export & Data Conversion, Versions, Editions & End-of-Life
Hi everyone. I hope you don't mind another basic question.
Here it is...when you use dbexport to create an export of a IDS 9.4 (or
basically any version I guess) it generates the DATABASE.sql file that
contains the statements to recreate the database. The you can easily recreate
the database on the same or another server by simply executing the
DATABASE.sql command file along with the exported tables.
Now my question....Where is the CREATE DATABASE statement? In other words,
what is telling Informix to create the database? In the DATABASE.sql command
file there is only a comment that says {create database ....} I know, probably
a stupid question.
When you use dbschema to generate the sql statements you must specifically
execute a CREATE database ... before executing the dbschema - generated *.sql
file...so why is dbimport different?
Thanks, Will
Review the dbimport syntax. You specify the name of the database and its
logging mode on the command line.
You can always change the name of the script and of the .exp directory to
another database name.
Take care.
Clifton M. Bean
Informix DBA / AIX System Admin
Currency Technics & Metrics
Phone: (972) 812-1411 x244
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of WILL
LANDSTROM
Sent: Thursday, April 10, 2008 10:16 AM
To: ids@iiug.org
Subject: Dbexport/dbimport/schema question? [11829]
Hi everyone. I hope you don't mind another basic question.
Here it is...when you use dbexport to create an export of a IDS 9.4 (or
basically any version I guess) it generates the DATABASE.sql file that
contains the statements to recreate the database. The you can easily
recreate
the database on the same or another server by simply executing the
DATABASE.sql command file along with the exported tables.
Now my question....Where is the CREATE DATABASE statement? In other words,
what is telling Informix to create the database? In the DATABASE.sql command
file there is only a comment that says {create database ....} I know,
probably
a stupid question.
When you use dbschema to generate the sql statements you must specifically
execute a CREATE database ... before executing the dbschema - generated
*.sql
file...so why is dbimport different?
Thanks, Will
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
See you at the IIUG Informix 2008 Conference
The Power Conference for Informix Professionals
April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
http://www.iiug.org/conf
Registration Now Open!!
Hi Will
I may be Clifton didn't realize that you're not expert in Informix.
When you execute a dbexport the first thing you think is performa dbimport.
If you run a dbimport <databasename> (take a look of the sintax - all options
of dbimport), you mention a database name and is that who create a new
database (if you'll run dbimport in the same instance, remember you should
drop a 'old' database if the name must be the same). If you want to create a
new database (change the db name), then , you have to rename the direcotory
<db>.exp and also inside this directory the <db>.sql file. I mean: the
<db>.sql file, the <db>.exp directory and the db mentioned in the dbimport
command must have the same name , and if it is in Unix/Linux the capital
letters must be equal.
Best regards.
Roberto FERRONATO
> To: ids@iiug.org
> From: cbean@ctm.com
> Subject: RE: Dbexport/dbimport/schema question? [11830]
> Date: Thu, 10 Apr 2008 11:23:14 -0400
>
> Review the dbimport syntax. You specify the name of the database and its
> logging mode on the command line.
>
> You can always change the name of the script and of the .exp directory to
> another database name.
>
> Take care.
>
> Clifton M. Bean
> Informix DBA / AIX System Admin
> Currency Technics & Metrics
>
> Phone: (972) 812-1411 x244
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of WILL
> LANDSTROM
> Sent: Thursday, April 10, 2008 10:16 AM
> To: ids@iiug.org
> Subject: Dbexport/dbimport/schema question? [11829]
>
> Hi everyone. I hope you don't mind another basic question.
> Here it is...when you use dbexport to create an export of a IDS 9.4 (or
> basically any version I guess) it generates the DATABASE.sql file that
> contains the statements to recreate the database. The you can easily
> recreate
> the database on the same or another server by simply executing the
> DATABASE.sql command file along with the exported tables.
>
> Now my question....Where is the CREATE DATABASE statement? In other words,
> what is telling Informix to create the database? In the DATABASE.sql command
>
> file there is only a comment that says {create database ....} I know,
> probably
> a stupid question.
>
> When you use dbschema to generate the sql statements you must specifically
> execute a CREATE database ... before executing the dbschema - generated
> *.sql
> file...so why is dbimport different?
> Thanks, Will
>
> ****************************************************************************
> ***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
> See you at the IIUG Informix 2008 Conference
> The Power Conference for Informix Professionals
> April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
> http://www.iiug.org/conf
> Registration Now Open!!
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
> See you at the IIUG Informix 2008 Conference
> The Power Conference for Informix Professionals
> April 27 - 30, 2008 Marriott Overland Park (Kansas City), Kansas
> http://www.iiug.org/conf
> Registration Now Open!!
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
The dbexport utility unloads a database into text files and creates a schema
file. You can use the schema file with dbimport to re-create the database
schema in another IBM Informix environment. You can edit the schema file to
modify the database that dbimport creates.
dbimport will take the database name you passed to the command line to create
your database internally. Then it starts parsing and executing the *.sql file.