Problems with Oracle 8 and 9
Problems with Oracle 8 and 9
am 14.02.2006 12:34:16 von juancarg
Hi.
This is the first time I send a message to the list, and I don't know
if this is the correct method. If not, forgive me.
In my company, we have a database in Oracle 8 and another one in Oracle 9.
When we installed the DBI module, the ORACLE_HOME that we used was
the corresponding to the 9 version. Now, I need to access to the
database in 8 version, But, I can't.
My question is, it's possible to access to two databases of different versions?
Excuse me if my english is not very well.
Thanks in advance for any answer.
Re: Problems with Oracle 8 and 9
am 14.02.2006 12:59:40 von scoles
Might be a problem with you TNSNAMES.ORA files or something like that. If
your DBD is reading from one there should be no problem reading another
even a different version it is just a matter of changing you connection
string
for eample
$db = DBI->connect('dbi:Oracle:','tester80@tpgoracle8.tpg','tester 80', {
AutoCommit => 0 } );
connects me to 8i.
while
$db = DBI->connect('dbi:Oracle:','tester90@tpgoracle9.tpg','tester 90', {
AutoCommit => 0 } );
gets me connected to 9i
in my TNSNAMES.ORA the entreis look like this
tpgoracle8.tpg =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = 000.000.000.000)
(PORT = 8080)
)
)
(CONNECT_DATA = (SERVICE_NAME = tpg1oracle8)
)
)
and
tpgoracle9.tpg =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = 000.000.000.000)
(PORT = 8080)
)
)
(CONNECT_DATA = (SERVICE_NAME = tpg1oracle9)
)
)
"Juan Carlos García" wrote in message
news:7.0.1.0.0.20060214123342.0196b0d8@anaya.es...
> Hi.
> This is the first time I send a message to the list, and I don't know
> if this is the correct method. If not, forgive me.
>
> In my company, we have a database in Oracle 8 and another one in Oracle 9.
> When we installed the DBI module, the ORACLE_HOME that we used was
> the corresponding to the 9 version. Now, I need to access to the
> database in 8 version, But, I can't.
>
> My question is, it's possible to access to two databases of different
versions?
>
> Excuse me if my english is not very well.
>
> Thanks in advance for any answer.
>
>
Re: Problems with Oracle 8 and 9
am 14.02.2006 18:05:49 von Alexander
Oracle 8 and 9 are usually backward and forward compatible, i.e. you can
use an Oracle 8 client (like DBD::Oracle) to connect to both Oracle 8
and 9, and you can use an Oracle 9 client to do exactly the same. (This
is not true for Oracle 10.)
So you should use the working Oracle 9 setup, don't mess with
ORACLE_HOME, and simply add the Oracle 8 Database to the text file
$ORACLE_HOME/network/admin/TNSNAMES.ORA. There is some kind of assistent
program to do this, but editing the file manually is very simple. Ask
your local Oracle admin for assistence. After that, you should test the
connection with SQLplus or similar tools, then with Perl and DBI.
If you still have problems, please post a more detailed message: What
exactly is the problem? Hanging application? Timeout? Error Messages? "I
can't" is not enough to find the problem. (Think of a doctor. If the
patient only tells the doctor "I'm sick, cure me", how shall the doctor
know what to do?)
Alexander
Juan Carlos García wrote:
> Hi.
> This is the first time I send a message to the list, and I don't know
> if this is the correct method. If not, forgive me.
>
> In my company, we have a database in Oracle 8 and another one in
> Oracle 9.
> When we installed the DBI module, the ORACLE_HOME that we used was the
> corresponding to the 9 version. Now, I need to access to the database
> in 8 version, But, I can't.
>
> My question is, it's possible to access to two databases of different
> versions?
>
> Excuse me if my english is not very well.
>
> Thanks in advance for any answer.
>
--
Alexander Foken
mailto:alexander@foken.de http://www.foken.de/alexander/
Re: Problems with Oracle 8 and 9
am 17.02.2006 09:52:29 von juancarg
At 12:34 14/02/2006, you wrote:
Thanks to all for yours answers.
I could connect with the batabase because the problem isn't with it,
but with the SYNONYMS.
If I connect from a Oracle 9 database and trie to use a synonym that
connects with a Oracle 8 DB I can't. I always obtain this error:
DBD::Oracle::st execute failed: ORA-03113: end-of-file on
communication channel (DBD ERROR: OCIStmtExecute) [for Statement
"SELECT * FROM pw_aleatorios_productos"] at ./conexion_base_datos.pl line 47.
Any idea.
Thanks.
Re: Problems with Oracle 8 and 9
am 17.02.2006 13:06:33 von scoles
You might want to try to get the meta data table_info() and see what
DBD:Oracle
thinks the table is. It could be a simple as your connection may not having
the correct rights to see it.
try something like this
my $tables = $dbh->table_info();
while (my ($qual,$owner,$name,$type,$remark) = $tables ->fetchrow_array())
{
foreach ($qual,$owner,$name,$type,$remark)
{
4_ = "N/A" unless defined $_;
}
printf "$qual,$owner,$name,$type,$remark)
}
SYNONYMS
"Juan Carlos García" wrote in message
news:7.0.1.0.0.20060217093830.019940d0@anaya.es...
> At 12:34 14/02/2006, you wrote:
> Thanks to all for yours answers.
>
> I could connect with the batabase because the problem isn't with it,
> but with the SYNONYMS.
> If I connect from a Oracle 9 database and trie to use a synonym that
> connects with a Oracle 8 DB I can't. I always obtain this error:
>
> DBD::Oracle::st execute failed: ORA-03113: end-of-file on
> communication channel (DBD ERROR: OCIStmtExecute) [for Statement
> "SELECT * FROM pw_aleatorios_productos"] at ./conexion_base_datos.pl line
47.
>
> Any idea.
>
> Thanks.
>
Re: Problems with Oracle 8 and 9
am 17.02.2006 13:45:36 von Alexander
It seems the Oracle 8 DB has been restarted or disconnected from the
LAN. (Tell your Oracle admin to) restart the Oracle 9 DB and your
conection works again.
If anyone has a better solution, please let me know. I know this special
problem from a very similar setup and the only workaround we know is a
restart of the database containing the synonym. It has nothing to do
with Perl or DBI, it also affects completely unrelated applications.
Alexander
Juan Carlos García wrote:
> At 12:34 14/02/2006, you wrote:
> Thanks to all for yours answers.
>
> I could connect with the batabase because the problem isn't with it,
> but with the SYNONYMS.
> If I connect from a Oracle 9 database and trie to use a synonym that
> connects with a Oracle 8 DB I can't. I always obtain this error:
>
> DBD::Oracle::st execute failed: ORA-03113: end-of-file on
> communication channel (DBD ERROR: OCIStmtExecute) [for Statement
> "SELECT * FROM pw_aleatorios_productos"] at ./conexion_base_datos.pl
> line 47.
>
> Any idea.
>
> Thanks.
--
Alexander Foken
mailto:alexander@foken.de http://www.foken.de/alexander/
RE: Problems with Oracle 8 and 9
am 17.02.2006 16:48:20 von Ron.Reidy
Yes. Look into your alert log and any trace files that could be =
generated.
-----Original Message-----
From: Juan Carlos Garc=EDa [mailto:juancarg@anaya.es]=20
Sent: Friday, February 17, 2006 1:52 AM
To: dbi-users@perl.org
Subject: Re: Problems with Oracle 8 and 9
At 12:34 14/02/2006, you wrote:
Thanks to all for yours answers.
I could connect with the batabase because the problem isn't with it,=20
but with the SYNONYMS.
If I connect from a Oracle 9 database and trie to use a synonym that=20
connects with a Oracle 8 DB I can't. I always obtain this error:
DBD::Oracle::st execute failed: ORA-03113: end-of-file on=20
communication channel (DBD ERROR: OCIStmtExecute) [for Statement=20
"SELECT * FROM pw_aleatorios_productos"] at ./conexion_base_datos.pl =
line 47.
Any idea.
Thanks.
This electronic message transmission is a PRIVATE communication which =
contains
information which may be confidential or privileged. The information is =
intended=20
to be for the use of the individual or entity named above. If you are =
not the=20
intended recipient, please be aware that any disclosure, copying, =
distribution=20
or use of the contents of this information is prohibited. Please notify =
the
sender of the delivery error by replying to this message, or notify us =
by
telephone (877-633-2436, ext. 0), and then delete it from your system.