ORA-01017 while connecting with Zeos library - oracle

I'm doing and application in which I need to establish a connection with an Oracle database. I was already capable of doing that perfectly with a software using Qt and the QOCIDriver, which means I both have the correct data to connect (username, password, etc.), as well as that my computer is capable of doing this correctly (i.e., the Oracle Client is correctly installed, etc.).
But now, when I moved to do the same in my 'Borland C++ Builder 6 application', using the Zeos library, I couldn't, with the Oracle database returning the error ORA-01017.
I ask myself what could be happening of wrong... I did a research on the web regarding this error and I found out that this is a particular message for a multitude of possible errors, most of which I'm not in position to check and correct - the database is located in a remote, private-access computer -, while at the same time without any clue about which of them is more probably true. Since I have quite a little time to solve this problem, any help indicating the most probable solution would be very thanked :)
Notice that I use the Zeos library to perform connections with a MySQL database with success - which means I know how to correctly program the library to perform such connections as well that the files used by Zeos library to do the connection are not too much old, minimizing the probability of this being a problem related to file incompatibility. The problem is happening only and particularly with the Oracle database.
Thanks,
Momergil

Related

Does PreparedStatement.setFetchDirection() make a difference for an Oracle DB?

Does PreparedStatement.setFetchDirection(ResultSet.FETCH_FORWARD) make a difference for an Oracle DB?
I'm on project to upgrade the database and application server for the power facilities and line maintenance system of a large electrical utility company. We are testing the new set up now (Oracle 12c and JBoss 7).
Sometimes the queries to the db are taking minutes to get an answer. I've suggested doing PreparedStatement.setFetchSize(int rows), where rows being the number of rows of information the user wants to see on his screen. Many posters here in Stackoverflow and elsewhere have said setFetchSize() is important to getting the network connection optimized.
But I noticed the PreparedStatement also has setFetchDirection(). There's FETCH_FORWARD, FETCH_REVERSE and FETCH_UNKNOWN. I've seen this mentioned many times, but I've not seen anyone saying how much of a benefit it is.
If it helps to understand the situation - the power company services 30 million customers, with decades of records (from nuclear power plants down to utility poles). The users of the service will be maintenance crews, office staff, both from with the company and from subcontractors. So, the computer skills and patience of the users may not tolerate a 3 minute wait to find the locations of the transformers they need to repair.
Oracle says
"The JDBC 2.0 standard allows the ability to pre-specify the
direction, known as the fetch direction, for use in processing a
result set. This allows the JDBC driver to optimize its processing."
However Oracle also says "the Oracle JDBC drivers support only the forward preset value" ResultSet.FETCH_FORWARD
"The values ResultSet.FETCH_REVERSE and ResultSet.FETCH_UNKNOWN are
not supported."
So, my guess is that if you are using JDBC 2.0 standard drivers, then you can optimize fetch by saying setFetchDirection(ResultSet.FETCH_REVERSE) when wanting to find overdue maintenance work. But if you are using Oracle JDBC drivers you are out of luck.
(Downvote me if I'm wrong - I know that improves your geek creed.)

How to integrate Oracle and Kafka

I've been trying to find the most efficient/effective way capture change notifications in a single Oracle 11g R2 instance and deliver those events to an Apache Kafka queue, but I haven't been able to find any simple examples or tutorials along these lines.
I've seen some possibilities on the Oracle side (Streams, Change Data Capture,triggers (yuck), etc..), but I'm still not sure which would be best to pursue.
Here is a project utilizing MySQL and Kafka on GitHub called mypipe, I just haven't seen anything similar for Oracle. I'm not sure if it would be best to focus writing an Oracle package for this, or a layer similar to the mypipe project, etc. etc..
Any recommendations, suggestions or examples would be greatly appreciated. Thank you.
There is currently just one tool which is open source and has minimal impact on the database. This is OpenLogReplicator.
license is GPL - it is fully open source
it has very low impact on the source database - it requires no licensing options and just turning on supplemental logging on the source (like all other replication tools)
it is written completely in C++ - so it has very low latency and high throughput
it works completely in memory
it supports all Oracle database versions since 11.2.0.1 (11.2, 12.1, 12.2, 18, 19)
It reads binary format of Oracle Redo logs and sends them to Kafka. It can work on the database host, but you can also configure it to read the redo logs using sshfs from another host - with minimal load of the database.
disclaimer #1: I am the author of this solution
disclaimer #2: to other StackOverflow users: please do not delete this answer. This question has a lot of duplicates. But this is the first question and other duplicates should be redirected here and marked as duplicates. Not the other way. I have deleted all other answers from other questions and just leaving this answer as the primary answer.
I think one approach might be to utilize Oracle GoldenGate for Big Data (researching this myself), obviosuly its most likely a costly solution ($)?
https://blogs.oracle.com/dataintegration/entry/introducing_oracle_goldengate_for_big
Let me know if you got anywhere with this, good luck ...

Functions used to connect Oracle DB

We are trying to connect oracle db from loadrunner. Could you please help us in providing these details. we wanted the script to get the data from oracle DB before starting the execution. In our testing we are used different application and protocols used Web http/html, Tuxedo and CRM aplls.
You are headed down a path which will cause you harm. Build your data files ahead of time and include them with the scripts. I could tell you how to solve your problem technically, but doing so would the the technical equivalent of instructing you how to use a gun to rob a bank, ultimately a bad set of advice. Your question also exposes a lack of critical skills in client side architecture and communications. This gap will not serve you well as a performance tester.

Oracle instant client status

I saw some presentations about a very promising product "Oracle Instant Client".
Could you tell me what is the status of this product?
Is it really used?
How is the support from Oracle?
It seems to be kind of equivalent to the thin driver for Java. Is it really something as simple as unzip, modify 1 or 2 environment variables and run your client application?
http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html
http://www.dbatoolz.com/t/installing-oracle-instantclient-basic-and-instantclient-sqlplus-on-win32.html
Thanks & regards
Alexandre
Oracle Instant Client is still an Product needed to be installed, it just comes with less features i.e. SQL Plus.
You can add individual components per demand.
The Instant Client is about 60 MB in size, compare to an Full client about 600 MB up to 1 GB depends on features you add there on top.
For simple db connection of an Client App, Instant Client is fully capable to fulfil this. The Idea is / was to add some security, since advanced users could do an connection threat to your DB.
It seems to be kind of equivalent to the thin driver for Java. Is it really something as simple as unzip, modify 1 or 2 environment variables and run your client application?
Pretty much, though it depends what your client application is. And which bits you download. If you install all of the packages then it includes the JDBC drivers (thin and OCI), libraries for OCCI apps, SQL*Plus... well, you can see all that from the downloads list. It's a smaller, simpler version of the full client, and doesn't need to be installed, just unzipped, which makes it easier to distribute too.
If you have the full Server or Client software installed then there's not much benefit in having the instant client as well; unless you need different driver versions, or you want to remove execute permissions from the full Oracle binaries for some reason. But if you have a new box that needs to access a remote DB then it gives you everything you need, simply. (Not quite instantly, but not far off).
It's been around since 10g and is fully supported, but like everything else, only if you have a support contract. It's certinly still supported in the sense that there is a new version to go with Oracle 12c.
In some respects it's very much just for client use though. For example, we develop Pro*C modules that we have to compile with the full version, but then we can happily execute them on a server that only has the instant client, to access a remote DB. That's not an issue for Java though.

Using Direct Connect access to ArcGIS databases in standalone applications

I work in an enterprise designing, creating and maintening custom applications on the base of ESRI ArcGIS. Some customers use Direct Connect, to connect to databases stored on Oracle or MS SQLServer. I have a problem with a standalone application for several months now.
I have an application, written in Delphi. One of the first things I do, of course, is opening the workspace.
pWorkspaceFactory:= CoSdeWorkspaceFactory.Create as IWorkspaceFactory;
pWorkspaceFactory.OpenFromFile('D:\directconnect.sde', WndHandle, pWorkspace);
This works fine for all "normal" connects, in some cases of direct connect it works fine too. But it may happen that I get on a different database a stackoverflow when calling OpenFromFile. Raising the MaxStackSize in the project options of the delphi project made it work on some Direct Connect databases. But it doesn't work for all.
Does anybody know the correct way to handle Direct Connects in standalone applications, without ArcMap? Accessing the databases in ArcMap has never been a problem, I think ArcMap has a special handling for Direct Connects.
Thanks for all ideas and replies. May the answer be with you ;-)
Greetings
warheart
Thank you for your comment. I can't post more details about the exception at the moment, because I can't reproduce it on my testdatabases. It's only out in the wild the exception occurs. But I can say that it happens in a (for me) closed ESRI-Dll, i cannot see the call stack of the dlls methods (OpenFromFile is an ESRI-Method in an ESRI-Dll). I would like to post such things, but I can't.
Could it have something to do with the DC library you are using? There are separate libraries for each version of ArcGIS and each flavor of database.

Resources