569 Cannot reference an external database with log
Posted in 2010
Topics: Migration, Import/Export & Data Conversion
on monthend we do a dbexport of the live database and do a dbimport of a demo
database to do testing on if we don't know how stuff works or are implementing
a new application for our erp system
when i do the dbimport i get the following message: 569 Cannot reference an
external database with logging
and when i check the database is there but not all table is restored
can someone assist me in fixing this issue
On Wed, Jun 30, 2010 at 22:30, LYNETTE OLIVIER <logizmax84@gmail.com> wrote:
> on monthend we do a dbexport of the live database and do a dbimport of a
> demo
> database to do testing on if we don't know how stuff works or are
> implementing
> a new application for our erp system
>
> when i do the dbimport i get the following message: 569 Cannot reference an
> external database with logging
>
> and when i check the database is there but not all table is restored
>
> can someone assist me in fixing this issue
>
>
It probably means that a stored procedure (or possibly a trigger) references
a table in a different database.
When the data is in the production database, it is logged; when you are
importing, you are not specifying that you want the imported database to be
logged.
Therefore, the reference to the other database fails - an unlogged database
cannot reference tables in a logged database, nor vice versa.
Fixes:
(1) Easy: create the imported database with logging.
(2) Hard: edit the export .sql file and remove the external references.
(3) Really hard: Use DGB to edit IDS (oninit) so that cross-database
references between different logging modes are allowed without breaking
reliability (or your licence terms).
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
NB: Please do not use this email for correspondence.
I don't necessarily read it every week, even.
--005045013dbfb20fe1048a4df015
*sigh*
pls ppl read 'Why Not Top Post'
and see my small addition below
dic_k
Jonathan Leffler schrieb:
> On Wed, Jun 30, 2010 at 22:30, LYNETTE OLIVIER <logizmax84@gmail.com> wrote:
>
>> on monthend we do a dbexport of the live database and do a dbimport of a
>> demo
>> database to do testing on if we don't know how stuff works or are
>> implementing
>> a new application for our erp system
>>
>> when i do the dbimport i get the following message: 569 Cannot reference an
>> external database with logging
>>
>> and when i check the database is there but not all table is restored
>>
>> can someone assist me in fixing this issue
>>
>>
>
> It probably means that a stored procedure (or possibly a trigger) references
> a table in a different database.
>
> When the data is in the production database, it is logged; when you are
> importing, you are not specifying that you want the imported database to be
> logged.
>
> Therefore, the reference to the other database fails - an unlogged database
> cannot reference tables in a logged database, nor vice versa.
>
> Fixes:
> (1) Easy: create the imported database with logging.
(1A) Easy & FAST: use ontape utility to change log mode to buffered logging
[ ontape -B <database> ] or unbuffered logging [ ontape -U <database> ]
on your imported DB. But still it is a very good idea to know what this
external database might be, or even if that beast is PROD or not and maybe
needs a copy also.
> (2) Hard: edit the export .sql file and remove the external references.
> (3) Really hard: Use DGB to edit IDS (oninit) so that cross-database
> references between different logging modes are allowed without breaking
> reliability (or your licence terms).
>
--
Richard Kofler
SOLID STATE EDV
Dienstleistungen GmbH
Vienna/Austria/Europe
Look through the schema in the dbexport directory. Probably near the last
table that was created in the script there is a trigger or something that is
referencing another database. On production that database has logging, on
your dev/test machine it is unlogged.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, 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 Thu, Jul 1, 2010 at 1:30 AM, LYNETTE OLIVIER <logizmax84@gmail.com>wrote:
> on monthend we do a dbexport of the live database and do a dbimport of a
> demo
> database to do testing on if we don't know how stuff works or are
> implementing
> a new application for our erp system
>
> when i do the dbimport i get the following message: 569 Cannot reference an
> external database with logging
>
> and when i check the database is there but not all table is restored
>
> can someone assist me in fixing this issue
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0016e6407cc46cf035048a516be4