PHP 5.3 erro ao conectar Oracle

907 views
Skip to first unread message

Marcos Carraro

unread,
Mar 4, 2013, 6:45:19 AM3/4/13
to tche...@googlegroups.com

Bmm Dia,

Alguém ja teve esse erro ao tentar conectar no servidor oracle?


ORA-24408: could not generate unique server group name

O servidor é remoto, pelo TOAD eu consigo me conectar perfeitamente.

oci8

OCI8 Supportenabled
Version1.4.9
Revision$Id: e2241cffb72c940cb2ca267b7a6a0ce436de7e5e $
Active Persistent Connections0
Active Connections0
Oracle Run-time Client Library Version11.2.0.3.0
Oracle Instant Client Version11.2
Temporary Lob supportenabled
Collections supportenabled

Directive Local ValueMaster Value
oci8.connection_classno value no value
oci8.default_prefetch 100100
oci8.eventsOff Off
oci8.max_persistent -1-1
oci8.old_oci_close_semanticsOff Off
oci8.persistent_timeout -1-1
oci8.ping_interval60 60
oci8.privileged_connect OffOff
oci8.statement_cache_size20 20



Conexão.

$usuario = "UAUARIOXY";
$senha = "SENHADDR";
$host = "192.168.1.101";
$db = "SISTEMA_DB";

$tns = "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = $host)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME=$db)))";
if ($c = @oci_connect($usuario, $senha, $tns)) {
    echo "Successfully connected to Oracle.";
    oci_close($c);
} else {
    $err = oci_error();
    $error = $err['message'] . "\n\n";
    print $error;
}


--
Att
Marcos Carraro

Felipe Lima

unread,
Mar 4, 2013, 6:58:11 AM3/4/13
to tche...@googlegroups.com
Você colocou o nome no /etc/hosts?!?! Para o Oracle, isso é obrigatório.....

192.168.1.101       nome.dominio nome

"The 11g instant client requires a /etc/hosts file entry for your hostname pointing to 127.0.0.1. The normal "localhost" entry is not sufficient on it's own.

Assuming your host name is foomachine, there are two places you'll need to check:

In /etc/hosts, make sure you have any entry like - add it if it's not there:

127.0.0.1   foomachine

And also make sure the /etc/sysconfig/network file also has HOSTNAME=foomachine

That should do the trick."

http://stackoverflow.com/questions/10484231/ora-24408-could-not-generate-unique-server-group-name



2013/3/4 Marcos Carraro <marcos.g...@gmail.com>

--
Mensagem enviada para <http://groups.google.com/group/tchelinux>.
Regras de Conduta para o grupo: <http://tchelinux.org/regras>.
 
---
Você está recebendo esta mensagem porque se inscreveu no grupo "TcheLinux" dos Grupos do Google.
Para cancelar a inscrição neste grupo e parar de receber seus e-mails, envie um e-mail para tchelinux+...@googlegroups.com.
Para obter mais opções, acesse https://groups.google.com/groups/opt_out.
 
 



--
Att.
Felipe Lima
Linux User #511589
Oracle Enterprise Linux Certified

Marcos Carraro

unread,
Mar 4, 2013, 8:18:40 AM3/4/13
to tche...@googlegroups.com
Sim, fiz esta inclusão.

 cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.101   oracledb.domain.com.br       oracledb

Porém o problema continua
--
Att
Marcos Carraro


2013/3/4 Felipe Lima <feli...@gmail.com>

Felipe Lima

unread,
Mar 4, 2013, 8:32:31 AM3/4/13
to tche...@googlegroups.com
No link que te passei, o pessoal fala que deve trocar o localhost para o nome da máquina também. Creio que não custa testar....

Pelo que li, isso deve funcionar. Mas o pessoal fala bastante sobre incompatibilidade, tendo que fazer downgrade do 11 para o 10.

Marcos Carraro

unread,
Mar 4, 2013, 9:03:08 AM3/4/13
to tche...@googlegroups.com
Buenas,

Felipe não teria muito nexo, eu apontar o ip do meu oracledb para localhost.

Vou fazer o downgrade para a versão 10 do client.

ABraços

Marcos Carraro

unread,
Mar 4, 2013, 11:34:14 AM3/4/13
to tche...@googlegroups.com
Buenas Seu Felipe,

Problema resolvido, fiz downgrade de versão do client.

Felipe Lima

unread,
Mar 4, 2013, 11:50:25 AM3/4/13
to tche...@googlegroups.com
Isso ae!!! Parabéns!!

Abraços.


2013/3/4 Marcos Carraro <marcos.g...@gmail.com>
Reply all
Reply to author
Forward
0 new messages