Dbexport and Informix Sequence
Posted in 2016
Topics: Server Administration, Security, Permissions & Auditing, Data Types & Schema Design, Migration, Import/Export & Data Conversion
Im running IDS 12.10.FC6 on SLES 11 SP 4.
Over the weekend, I used dbexport to copy a production database in order to
refresh a test/dev database instance. One of our developers had created an
Informix sequence
(https://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_
sqs_0495.htm) and dbexport hung during the export when it got to this
sequence. It appears that the sequence was created in dbaccess and was owned
by the developer, not owned by informix. The sequence uses a serial8 data type:
Column name Type Nulls
seqserial8 serial8 no
I was able to get dbexport to complete by using -no-data-tables= to exclude
this sequence. The dbexport file then contained the following:
create sequence "dkatpa".homefile_seq increment by 1 start with 1 maxvalue
9223372036854775807 minvalue 1 cache 20 order;
alter sequence "dkatpa".homefile_seq restart with 744;
revoke all on "dkatpa".homefile_seq from "public" as "dkatpa";
grant select on "dkatpa".homefile_seq to "public" as "dkatpa";
My questions are:
- Is dbexport incompatible with a sequence?
- Did dbexport hang because of the sequence, because of the serial8 datatype,
or because the sequence wasn't owned by informix? (I do show 2 or 3 tables,
out of 2500+ total, that aren't owned by informix and those did not create any
problems)
- If we maintain the sequence in our database, and possibly create others, is
using -no-data-tables= the best way to get the dbexport to complete? In other
words, do I just need to check systables for tabtype="Q" and exclude the
tabname with -no-data-tables= as part of the dbexport?
Sounds like a dbexport bug. Open a PMR.
At least until you get a patch, if you want, my dbexport replacement
utility, myexport, handles this correctly. You can download the package
myexport from the IIUG Software Repository. Also get my utils2_ak package
(the latest release is on my website at: www.askdbmgt.com/my-utilities).
Art
Art S. Kagel, President and Principal Consultant
ASK Database Management
www.askdbmgt.com
Blog: http://informix-myview.blogspot.com/
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on the IIUG, nor any other organization with which I am
associated either explicitly, implicitly, or by inference. Neither do
those opinions reflect those of other individuals affiliated with any
entity with which I am affiliated nor those of the entities themselves.
On Mon, Jun 27, 2016 at 2:38 PM, Rubinstein, James <JRUBIN@midwestern.edu>
wrote:
> Im running IDS 12.10.FC6 on SLES 11 SP 4.
>
> Over the weekend, I used dbexport to copy a production database in order to
> refresh a test/dev database instance. One of our developers had created an
> Informix sequence
> (
>
https://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_s
qs_0495.htm
> )
> and dbexport hung during the export when it got to this sequence. It
> appears
> that the sequence was created in dbaccess and was owned by the developer,
> not
> owned by informix. The sequence uses a serial8 data type:
>
> Column name Type Nulls
>
> seqserial8 serial8 no
>
> I was able to get dbexport to complete by using -no-data-tables= to exclude
> this sequence. The dbexport file then contained the following:
>
> create sequence "dkatpa".homefile_seq increment by 1 start with 1 maxvalue
> 9223372036854775807 minvalue 1 cache 20 order;
> alter sequence "dkatpa".homefile_seq restart with 744;
>
> revoke all on "dkatpa".homefile_seq from "public" as "dkatpa";>
> grant select on "dkatpa".homefile_seq to "public" as "dkatpa";>
> My questions are:
>
> - Is dbexport incompatible with a sequence?
> - Did dbexport hang because of the sequence, because of the serial8
> datatype,
> or because the sequence wasn't owned by informix? (I do show 2 or 3 tables,
> out of 2500+ total, that aren't owned by informix and those did not create
> any
> problems)
> - If we maintain the sequence in our database, and possibly create others,
> is
> using -no-data-tables= the best way to get the dbexport to complete? In
> other
> words, do I just need to check systables for tabtype="Q" and exclude the
> tabname with -no-data-tables= as part of the dbexport?
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001a11448a044b9c3405364739a4