I created a database link to Hive following the article
How To Query Hive and Impala from Oracle using ODBC Heterogeneous Gateway.
select count(*) from customers#HIVEDSN;
isql works fine, but in SQL*Plus I get an error:
ERROR at line 1:
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[
Here is the trace log:
--------------------------------------------
Entered hgopoer at 2017/05/19-03:08:29
hgopoer, line 240: got native error 10210 and sqlstate H; message follows...
[
Exiting hgopoer, rc=0 at 2017/05/19-03:08:29
hgolgon, line 202: calling SQLSetConnectAttr got sqlstate H
Exiting hgolgon, rc=28500 at 2017/05/19-03:08:29 with error ptr FILE:hgolgon.c LINE:202 ID:Connection Attribute: TRACE
hostmstr: 0: HOA After hoalgon
RPC Calling nscontrol(0), rc=0
Related
I am using DBMS_FILE_TRANSFER.PUT_FILE() on a local Oracle Express instance to transfer a local file to a remote AWS RDS Oracle instance, but I am receiving the following error:
ERROR at line 1:
ORA-02019: connection description for remote database not found
ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 60
ORA-06512: at "SYS.DBMS_FILE_TRANSFER", line 168
ORA-06512: at line 2
I receive this error while executing the following SQL script:
BEGIN
DBMS_FILE_TRANSFER.PUT_FILE(
'DATA_PUMP_DIR',
'some_file.txt',
'DATA_PUMP_DIR',
'some_file.txt',
'MY_DATABASE_LINK'
);
END;
/
MY_DATABASE_LINK is a public database link located in my local Oracle Express instance:
CREATE PUBLIC DATABASE LINK MY_DATABASE_LINK CONNECT TO example_schema IDENTIFIED BY "example_user" USING '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=example_host_info)(PORT=1521))(CONNECT_DATA=(SID=example_sid)))';
I'm fairly confident that the connection string behind the database link is correct, but I'm not sure how to be 100% sure.
The ORA-02019: connection description for remote database not found error does not make sense because the connection description is defined by the database link. It is not present in tnsnames.ora, and I am confident that it doesn't have to be for DBMS_FILE_TRANSFER.PUT_FILE() to work.
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
I'm using strimzi Kafka operator to work with a Confluent Cluster to achieve an Oracle2Kafka type KafkaConnector with JdbcSourceConnector from confluent.
The KafkaConnector spec
# connector
connection.url: jdbc:oracle:thin:#HOST:PORT/SERVICE
connection.user: USER
connection.password: PASS
dialect.name: OracleDatabaseDialect
topic.prefix: test-topic-
mode: bulk
db.timezone: Europe/Madrid
table.whitelist: TEST_TABLE
But I get the following error in the strimzi-cluster-operator logs.
io.strimzi.operator.cluster.operator.assembly.ConnectRestException: PUT /connectors/confluent-cluster-int-20200706-02/config returned 400 (Bad Request): Connector configuration is invalid and contains the following 2 error(s):
Invalid value java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 43
for configuration Couldn't open connection to jdbc:oracle:thin:#***:1534/***
Invalid value java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 43
for configuration Couldn't open connection to jdbc:oracle:thin:#***:1534/***
You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`
at io.strimzi.operator.cluster.operator.assembly.KafkaConnectApiImpl.lambda$null$2(KafkaConnectApi.java:208) ~[io.strimzi.cluster-operator-0.18.0.jar:0.18.0]
If I modify the source I get a much specific stacktrace
2020-07-14 09:33:46,636 ERROR SQLException (io.confluent.connect.jdbc.source.JdbcSourceConnectorConfig) [qtp742672280-21]
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 43
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:456)
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:451)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:1123)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:552)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:553)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:269)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:501)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1292)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1025)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:747)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:793)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:57)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:747)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:562)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at io.confluent.connect.jdbc.dialect.GenericDatabaseDialect.getConnection(GenericDatabaseDialect.java:223)
at io.confluent.connect.jdbc.source.JdbcSourceConnectorConfig$TableRecommender.validValues(JdbcSourceConnectorConfig.java:606)
at io.confluent.connect.jdbc.source.JdbcSourceConnectorConfig$CachingRecommender.validValues(JdbcSourceConnectorConfig.java:653)
at org.apache.kafka.common.config.ConfigDef.validate(ConfigDef.java:607)
at org.apache.kafka.common.config.ConfigDef.validate(ConfigDef.java:622)
at org.apache.kafka.common.config.ConfigDef.validate(ConfigDef.java:530)
at org.apache.kafka.common.config.ConfigDef.validateAll(ConfigDef.java:513)
at org.apache.kafka.common.config.ConfigDef.validate(ConfigDef.java:495)
at org.apache.kafka.connect.connector.Connector.validate(Connector.java:135)
Some things I already checked
KafkaConnect image is a self-made one with the required addons for the JdbcSourceConnector with an OracleDriver
Dockerfile
FROM strimzi/kafka:0.18.0-kafka-2.5.0
USER root:root
COPY ./kafka-connect-jdbc-5.4.0.jar /opt/kafka/plugins/
COPY ./ojdbc6.jar /opt/kafka/libs/
USER 1001
KafkaConnect resource is deployed successfully, as KafkaConnect topics are being populated on confluent cluster (connect-cluster-configs, connect-cluster-configs, ...)
Oracle driver seems to be successfully loaded. If I add a typo in the credentials or connection chain the error is self-explanatory and makes sense. I also tried other versions of oracle drivers.
Back in time (4 months ago), this same config was working (both on a local strimzi-deployed-cluster and confluent). Now the local cluster works fine, but confluent one fails with the described error.
Tried several upgraded latest versions of strimzi operator and kafka-jdbc-connector
(edit) As suggested in strimzi slack, tried the PUT /connector-plugins/JdbcSourceConnector/config/validate rest endpoint of KafkaConnect and got same 2 errors, in the whitelist and blacklist fields
result
"value": {
"name": "table.blacklist",
"value": "",
"recommended_values": [],
"errors": ["Invalid value java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1\nORA-06502: PL/SQL: numeric or value error: character string buffer too small\nORA-06512: at line 43\n for configuration Couldn't open connection to jdbc:oracle:thin:#***:1534/***"],
"visible": true
}
(edit) I've tried to leave whitelist field empty and error is the same. The database seems not have been changed and the connection chain works fine from source code spring-data access.
I'm out of ideas, any hint is welcome x)
I don't know tools you use, but - the error you got means this:
SQL> declare
2 l_var varchar2(1); -- note length, only 1 character
3 begin
4 l_var := 'Littlefoot'; -- I'm little, but can't fit
5 end;
6 /
declare
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 4
SQL>
What to do?
SQL> declare
2 l_var varchar2(20); -- is that enough?
3 begin
4 l_var := 'Littlefoot';
5 end;
6 /
PL/SQL procedure successfully completed. --> Yes, it is!
SQL>
Therefore, check the sizes in your code.
I work with SQL Developer and I want to debug a package procedure.
I run the debug some times and these are the different values of host and port
CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '10.50.10.117', '62378' )
CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '10.50.10.117', '62388' )
These are the sql developer preferences
I added the line
AddVMOption -DDatabaseDebuggerDisableJDWP=true
in the file sqldeveloper.conf
I have a question: is it mandatory to open the port 4000?
The error is
Connecting to the database Copernico Produccion 1.
Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '10.50.10.117', '62378' )
ORA-30683: failure establishing connection to debugger
ORA-12535: TNS:operation timed out
I am able to connect to database
Trying to use impdp to do a data refresh on an Oracle 12c database:
Receive the following error after invoking the impdp from the command line:
ORA-39006: internal error
ORA-39065: unexpected master process exception in DISPATCH
ORA-00942: table or view does exist
ORA-06512: at "SYS.KUPU$UTILITIES_INT", line 1579
ORA-06512: at "SYS.KUPM$MCP", line 2710
ORA-39097: Data Pump encountered unexpected error -942
I found a post that made reference to GSM objects not being available, but there was no confirmation or response to this.
All the GSM schemas have been removed from the database I am working in.