What's the meaning of: "java.sql.SQLRecoverableException: I/O-Error: Unknown host specified" if TNS-alias specified - oracle

Using Oracle JDBC driver with TNS-alias instead of host:port:SID a'la
jdbc:oracle:thin:#TNS_ALIAS
you may get this error message
java.sql.SQLRecoverableException: I/O-Error: Unknown host specified
while calling
java.sql.DriverManager.getConnection
But there is no problem with the hostname specified by TNS-alias.

Sadly this error message does not point to the real reason:
The error occurs if driver cannot find the tnsnames.ora config file.
Solution
You have to ensure that system-property "oracle.net.tns_admin" is set before connecting and points to the directory containing the tnsnames.ora.

Related

JDBC EZConnect URL: Invalid number format for port number when specifying Protocol

When specifying a JDBC EZConnect URL to include the Protocol, for example:
jdbc:oracle:thin:#tcps://example1.com:1522/my_service_name
jdbc:oracle:thin:#tcp://example1.com:1522/my_service_name
I am getting the error "Status : Failure - Test Failed: IO Error: Invalid number format for port number"
I am following the example page XXX of the Oracle 19c JDBC Developers Guide (http://ora-srv.wlv.ac.uk/oracle19c_doc/jjdbc/jdbc-developers-guide.pdf)
Does anyone have any input into why this error is occurring ?
Thanks
Andrew

Reg: database is not starting up an error

getting below error while starting the database:-
startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/mis/PARAMETERFILE/spfile.276.967375255'
ORA-17503: ksfdopn:10 Failed to open file +DATA/mis/PARAMETERFILE/spfile.276.967375255
ORA-04031: unable to allocate 56 bytes of shared memory ("shared pool","unknown object","KKSSP^24","kglseshtSegs")
Your database cannot find the SPFILE (newer init.ora) within ASM with the actual system parameters or has no permissions to access it.
Either your Grid Infrastructure stack or the dbs/spfile.ora is pointing to the wrong file.
To find out what the grid infrastructure stack is using, run "srvctl" which should display the parameterfile name the database should be using
srvctl config database -d <dbname>
...
Spfile: +DATA/<dbname>/PARAMETERFILE/spfile.269.1066152225
...
Then check (as the grid user), if the file indeed is not visible (by using asmcmd):
asmcmd
ASMCMD> ls +DATA/<dbname>/PARAMETERFILE/
spfile.269.1066152225
If the name is different, then you got the issue... (and you have to point to the correct file).
If the name is correct, then it could be wrong permissions on the oracle executable(s) (check My Oracle Support):
RAC Database Can't Start: ORA-01565, ORA-17503: ksfdopn:10 Failed to open file +DATA/BPBL/spfileBPBL.ora (Doc ID 2316088.1)

Greenplum connector giving hostname resolution error in ibm Datas stage

GreenPlum Connection error:
Greenplum_Connector_1,0: The following SQL statement failed: INSERT INTO GPCC_ET_20200903233319813_84175_0 select * from table .
The statement reported the following reason: [SQLCODE=HY000][Native=56,966,976] [IBM(DataDirect OEM)][ODBC Greenplum Wire Protocol driver][Greenplum]ERROR: could not translate host name "hostname_of_machine", port "8001" to address: Name or service not known (cdbutil.c:819)
(seg5 192.168.111.240:6005 pid=38339) (cdbdisp.c:254)(File cdbdisp.c; Line 254; Routine cdbdisp_finishCommand; )
(CC_GPCommon::checkThreadStatusThrow, file CC_GPCommon.cpp, line 808)
As Jon mentioned, "hostname_of_machine" needs to be updated to the real hostname

Vertica admintools error

when I try to connect to database from admintools I am getting following error:
Error: Unable to connect to database
Hint: Username or password could be invalid
I have found in the logs following error:
Apr 20 08:08:29 [24291] [vsql.connect spawn] Exception: Error! pty.fork() failed: out of pty devices
Do you know what is the problem?
Your node might be down
Check logs at
/opt/vertica/log
or at
/opt/vertica/config/admintools.conf
check restart policy section is right
[Database:mydb] host = 11.11.11.11
restartpolicy = ksafe

Trying to Connect Vertica DB with Weblogic 10.3

Working on Linux Redhat
I have two below jars
1>vertica-jdbc-5.1.1.jar
2>vertica-jdk5-6.1.1-0.jar
Steps that i followed:
1 copied the jars to $WL_HOME/server/lib
2 I set the path of the jars to Linux Path like below
export WL_HOME=/usr/local/WL_Server10.3/sever
PATH= ${WL_HOME}/lib:${PATH}
3 I modified ${WL_HOME}/common/bin/commEnv.sh
Added my jars entry like below
# set up WebLogic Server's class path
WEBLOGIC_CLASSPATH="${JAVA_HOME}/lib/tools.
jar${CLASSPATHSEP}${WL_HOME}/server/lib/weblogic_sp.
jar${CLASSPATHSEP}${WL_HOME}/server/lib/weblogic.
jar${CLASSPATHSEP}${FEATURES_DIR}/weblogic.server.modules_13.1.1.0.
jar${CLASSPATHSEP}${WL_HOME}/server/lib/webservices.
jar${CLASSPATHSEP}${ANT_HOME}/lib/ant-all.
jar${CLASSPATHSEP}${ANT_CONTRIB}/lib/ant-contrib.jar
${CLASSPATHSEP}${WL_HOME}/server/lib/vertica-jdbc-5.1.1.jar
${CLASSPATHSEP}${WL_HOME}/server/lib/vertica-jdk5-6.1.1-0.jar"
export WEBLOGIC_CLASSPATH
//I also tried the below steps googling,................. Optional Step
4> Modified ${WL_HOME}/server/lib/jdbcdrivers.xml
Added required parameter
i didnt get what to fill in the URLClassPathName value so i ignored it.
5>I restarted the Weblogic server and logged into the admin console
6> I added new JDBC Data Source
While Testing the Connection i am getting below Error:
Message icon - Error An error occurred during activation of changes, please see the log for details.
Message icon - Error weblogic.application.ModuleException:
Message icon - Error weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: [Vertica][JDBC](10100) Connection Refused: (11640) Required Connection Key(s): user; (11480) Optional Connection Key(s): autocommit, connsettings, directbatchinsert, logintimeout, loglevel, lognamespace, logpath, readonly, resultbuffersize, sessionlabel, ssl, threepartnaming, transactionisolation
It would be great if someone can help me with the steps to connect Vertica Database to the Weblogic 10.3
What connection settings are you providing in:
"6> Added new JDBC Data Source
7>Followed the steps"
The error says you're missing specificying a user:
[Vertica][JDBC](10100) Connection Refused:
(11640) Required Connection Key(s): user;
(11480) Optional Connection Key(s): autocommit, connsettings, directbatchinsert, logintimeout, loglevel, lognamespace, logpath, readonly, resultbuffersize, sessionlabel, ssl, threepartnaming, transactionisolation

Resources