Conexão jdbc usando service

1 resposta
ateubh

Estou tentando abrir uma conexão jdbc com o banco de dados oracle, mas aqui no serviço não é utilizado SID e sim SERVICE. Alguém sabe como devo alterar a string de conexão?

1 Resposta

Andre_Fonseca

Oi,

Veja se isso resolve…

What is a service connect string?

Oracle is replacing the SID mechanism for identifying databases with a new services approach. This has been available in the database since 8.1.7. JDBC supports services in the connect URL. We strongly encourage everyone to transition from SIDs to services as quickly as possible as SIDs will be cease to be supported in one of the next few releases of the database.

The basic format of a service URL is:

jdbc:oracle:thin:[/]@//[:]/
jdbc:oracle:oci:[/]@//[:]/

Examples:

jdbc:oracle:thin:@//myserver.com/customer_db
jdbc:oracle:oci:scott/tiger@//myserver.com:5521/customer_db

For more info see the JDBC User Guide.

http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#05_10

Criado 5 de agosto de 2008
Ultima resposta 5 de ago. de 2008
Respostas 1
Participantes 2