Quick way to delete data from Informix
Posted in 1999
Topics: General Discussion
Hello, I want to clean all the data from a database (IDS7.3) but I want to keep all the table schemas not to be deleted. Is there anyone know a low cost, quick way to do this? I know ORACLE has a low cost "TRUNCATE TABLE" that can be used for this purpose, I do not know if INFORMIX also provide similiar or even better solution. Any idea will be greatly appreciated.
Hi!
Use dbschema to create schema file of the database.
Drop database.
Create database using the schema.
HTH
Michael
Harry Sheng wrote:
> Hello,
>
> I want to clean all the data from a database (IDS7.3)
> but I want to keep all the table schemas not to be deleted.
>
> Is there anyone know a low cost, quick way to do this?
> I know ORACLE has a low cost "TRUNCATE TABLE"
> that can be used for this purpose, I do not know if INFORMIX
> also provide similiar or even better solution.
>
> Any idea will be greatly appreciated.
Harry Sheng wrote:
> Hello,
>
> I want to clean all the data from a database (IDS7.3)
> but I want to keep all the table schemas not to be deleted.
>
> Is there anyone know a low cost, quick way to do this?
> I know ORACLE has a low cost "TRUNCATE TABLE"
> that can be used for this purpose, I do not know if INFORMIX
> also provide similiar or even better solution.
>
> Any idea will be greatly appreciated.
create a schema file of the database using dbschema, then drop the
database, follow by craeting the database using the schema file you had
created.
--
Compliments of QueriX
--------------------------------------------------------------------------------------------------
QueriX 4GL Compilers are Informix 4GL Compatible. Some features are:
True Windows GUI Clients. ActiveX support. HTML Report Generation.
More rigorous error handling. Connection to other RDBMS such as Oracle.
Connection to all versions of Informix 4GL with no need to change
compiler.
For more details visit: http://www.querix.com/
---------------------------------------------------------------------------------------------------
In article <3828438F.381DC519@sqlcanada.com>,
Michael Krzepkowski <michaelk@sqlcanada.com> wrote:
> Hi!
>
> Use dbschema to create schema file of the database.
>
> Drop database.
>
> Create database using the schema.>
> HTH
>
> Michael
>
> Harry Sheng wrote:
>
> > Hello,
> >
> > I want to clean all the data from a database (IDS7.3)
> > but I want to keep all the table schemas not to be deleted.
> >
> > Is there anyone know a low cost, quick way to do this?
> > I know ORACLE has a low cost "TRUNCATE TABLE"
> > that can be used for this purpose, I do not know if INFORMIX
> > also provide similiar or even better solution.
> >
> > Any idea will be greatly appreciated.
>
>
Couldn't you also do a alter table add fragment..., then alter table
detach fragment (original fragment) to ..., then drop the detached
fragment.
Not that this would be much (if any) faster...
--
# unrm /
ksh: unrm: not found
# man cpio
Sent via Deja.com http://www.deja.com/
Before you buy.
The suggestions to use dbschema are the only way to do this quickly.
However, let me add a caviat. Remember when recreating the database to
set the logging mode and location (dbspace) of the newly created database
and when you make the schema either use dbschema with the -ss option or
use myschema.ec instead otherwise all your tables will follow the database
into the same dbspace and there will be no fragmentation expressions in
the schema file.
Art S. Kagel
Harry Sheng wrote:
>
> Hello,
>
> I want to clean all the data from a database (IDS7.3)
> but I want to keep all the table schemas not to be deleted.
>
> Is there anyone know a low cost, quick way to do this?
> I know ORACLE has a low cost "TRUNCATE TABLE"
> that can be used for this purpose, I do not know if INFORMIX
> also provide similiar or even better solution.
>
> Any idea will be greatly appreciated.