Why do I receive the error "Io Exception: Connection refused" with Oracle 10g and the Database Toolbox 3.1.1 (R2006a) ?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am using the Query Builder from the Database Toolbox 3.1.1 (R2006a) to connect to my Oracle 10g database. Using the arguments as specified in the documentation, I get a dialog box with the following error:
Io Exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=169869568)(ERF=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
If I use the DATABASE function with the following syntax:
conn = database('databasename','username','password','driver','databaseurl');
I get the following message in the database object, and the database is not opened:
Io Exception: The Network Adapter could not establish the connection
Respuesta aceptada
MathWorks Support Team
el 27 de Jun. de 2009
The issue is related to the incorrect usage of the DATABASE function. The DATABASE function expects the 'databasename' parameter to be the same as the SID parameter at the end of the 'databaseurl'. If the two are not the same, the 'databasename' is appended to the string in the 'databaseurl'.
In the Query Builder, the database 'Name' should be the same as the suffix after the port number in the database 'URL'
The correct syntax for the DATABASE function with Oracle 10g and the Thin Client JDBC drivers is
conn = database('databasename','username','password','oracle.jdbc.driver.OracleDriver',jdbc:oracle:thin:@IP_ADDRESS_OF_DATABASE_SERVER:1521:databasename');
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Connect to Database Programmatically en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!