1. MARKOVIC Marko
  2. PowerBuilder
  3. Thursday, 12 May 2022 13:26 PM UTC

Hi all,

here is the situation: 

Oracle DBs, PB 2017 or PB 2021, Win 10 64 Bit.
On our main window we had tabs with tabpages. On tabpages are some datawindows with SELECTs over DBLinks and in selectionchanged event of tabpages Embedded SQLs over DBLinks.

Behaviour during a maintenance period of one database: The period was overriched and for some unexplained reasons our application couldn't start again and hung on these SELECTs over DBLinks.

At this maintenance moment when we comment these SELECTs over DBLinks, the application run again.

As I remeber well, on construct the datawindows and maybe embedded SQL are checked, is that right? How can I explain what happened since the DbLinks are not responding, a Timeout maybe, when yes how long? How can it be better handled to avoid a hang of the application?

Hope that I exposed the situation and problem good. Need explainations, hints or better implementations guidelines?

 

Thanks in advance.

Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 12 May 2022 13:48 PM UTC
  2. PowerBuilder
  3. # 1

I don't understand wat is a " SELECTs over DBLinks".

Meanwhile, several things can lock up the app, including table locks - which we just happened to start experiencing with established code when we moved to PostgreSQL from Oracle. I've no idea if this will apply to you, but in the case of our PG database everything is controlled at a session level. This means that if session 1 reads table A and does not do a COMMIT, then session 1 has table A locked and will not allow any other session to read table A.

Stupid, isn't it? Even if the activity was an update, the changes should be queued up for eventual update. Our old Oracle databases worked in that manner.

Eventually the PG DBAs did something that made that go away for READs, but it's still active for UPDATEs.

Again....no idea if this is what you are experiencing, but its worth checking. ESPECIALLY if all you are doing on startup is to READ data from a table.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 12 May 2022 14:14 PM UTC
  2. PowerBuilder
  3. # 2

Hi, Markovic -

I'm not Oracle savvy, but I did a little searching on the web and from what I can see, this looks to be an issue with how Oracle DBLink works, not a PB problem.

Reading a post that explains at a high level how DBLink works (https://logicalread.com/oracle-database-links-mc06/#.Yn0O0ejMKUk), the article says at one point:

When used, a database link actually logs in as a user in the remote database and the database link remains open for your session until you either log out of your session or execute the ALTER SESSION CLOSE DATABASE LINK command.

My suggestion to you is to look for advice about your issue on Oracle forums to see if there are "best practices" on how to manage the situation you are experiencing.

Best regards, John

Comment
  1. Roland Smith
  2. Thursday, 12 May 2022 14:48 PM UTC
SQL Server has a similar feature. You are right, it seems likely to be a problem with the database server.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.