Jonathan,
I like the second option but I am a bit unsure on opening the second connection part.
Can you expound on that area?
Thanks,
Craig
>>> Jonathan Leffler <[EMAIL PROTECTED]> 12/05/01 01:18AM >>>
Craig Sharp wrote:
>I am trying to use DBD::Informix to query a remote database.
>
>I am connected to a local database and then issuing a remote sql query:
>
>select * from perf_info@roushprod:archive_info
>
>roushprod is in the sqlhosts file. The statement works correctly outside of the
>DBD/DBI functions.
>
>When I try to run the statement from perl, I get the following error:
>
>DBD::Informix::db prepare failed: SQL: -569: Cannot reference an external database
>with logging. at test.old line 18.
>
>How can I correct this problem?
>
The problem is that your current database is unlogged but the remote
database is logged, and you can't do remote access like that when the
logging modes of the databases are different. The same would apply in
DB-Access.
You have several choices:
* Fix the logging mode of one or the other database. This is a bit
radical and apt to upset applications that work.
* Use a second connection ($db2 =
DBI->connect("dbi:Informix:perfinfo@roushprod", ...)). Just beware of
shared memory connections; you can only have one of those open at any
given time in any given process.
* Close the first connection and reopen it pointing to the new database.
Either of the latter two can work depending on what else you need to do;
the middle option (second connection) is usually the best.
>
>Thanks,
>
>Craig A. Sharp
>Unix Systems Administrator
>DNS Administrator
>Roush Industries
>Office: 734-779-7282
>Cell: 734-231-6769
>Fax: 734-779-7807
>[EMAIL PROTECTED]
>====================================================
>I have not lost my mind, it's backed up on tape somewhere!
>====================================================
>
--
Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED])
Guardian of DBD::Informix 1.00.PC1 -- see http://www.cpan.org/
#include <disclaimer.h>
_______________________________________________
Perl-Unix-Users mailing list. To unsubscribe go to
http://listserv.ActiveState.com/mailman/subscribe/perl-unix-users