1. jay rajan
  2. PowerBuilder
  3. Friday, 23 November 2018 07:23 AM UTC

please help me

 

"db process is dead or not enable" this error is accure after some time when my mdi application is running in powerbuilder

please help me 

it is most important for me

 

thanks

Sivaprakash BKR Accepted Answer Pending Moderation
  1. Friday, 23 November 2018 11:57 AM UTC
  2. PowerBuilder
  3. # 1

Hello,

If this happens, after a certain amount of idle time, write a code to keep it active.  Say in the mdi window, in the timer event, you could write a sql to retrieve some data.  

Hope it helps.

Happiness Always
BKR Sivaprakash

 

Comment
  1. jay rajan
  2. Monday, 26 November 2018 07:04 AM UTC


HI



Thanks for reply



but i don't know that this error taken how much time



means this error is accure after 15-25 min when i not using application or some time it happen after some different time



but exact time is needed in timer event
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 23 November 2018 16:32 PM UTC
  2. PowerBuilder
  3. # 2

Hi Jay;

   FYI: I have a "Heart Beat" feature in the STD Framework that you could adopt. Its along the lines that Sivaprakash mentioned but goes much further in its implementation.

  If you are interested, please download the example OrderEntry application and then do a keyword search on word "Heartbeat" to get a roadmap on where to look at the code-line for this feature. Its a similar approach that the EAServer App Server used to use and totally configurable.

HTH

Regards ... Chris

Comment
  1. jay rajan
  2. Monday, 26 November 2018 14:13 PM UTC
sorry function not found yet

please sir help me
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 26 November 2018 15:28 PM UTC
---------- Search: Searching Target OES_Native for 'Heartbeat' (10:27:07 AM)

---------- 30 Matches Found On "Heartbeat":

OES_Main.pbl(ns_sqlca_orderentry).ns_sqlca_orderentry: boolean ib_heartbeat_required = true

STD_FC_PB_Base.pbl(ns_sqlca_master).ns_sqlca_master: Boolean ib_heartbeat_skip // Heart beat SW

STD_FC_PB_Base.pbl(ns_sqlca_master).ns_sqlca_master: ns_timing_master io_timer // Heartbeat Timer class

STD_FC_PB_Base.pbl(ns_sqlca_master).ns_sqlca_master: Boolean ib_heartbeat_required = FALSE // Heart Beat SW

STD_FC_PB_Base.pbl(ns_sqlca_master).ns_sqlca_master: String is_heartbeat_sql = "Select 1 as HeartBeat" // Heart beat SQL

STD_FC_PB_Base.pbl(ns_sqlca_master).ns_sqlca_master: Long il_heartbeat_time = 60 // Heart beat time

STD_FC_PB_Base.pbl(ns_sqlca_master).ns_sqlca_master: public subroutine of_set_heartbeat_time (long ai_time)

STD_FC_PB_Base.pbl(ns_sqlca_master).ns_sqlca_master: public function integer of_set_heartbeat (boolean ab_heartbeat)

STD_FC_PB_Base.pbl(ns_sqlca_master)oe_heart_beat.0010: Note : Heartbeat is skipped if any App's SQL have been processed before the HB timer event fires!

STD_FC_PB_Base.pbl(ns_sqlca_master)oe_heart_beat.0027: IF ib_heartbeat_skip = TRUE THEN // Skip ON?

STD_FC_PB_Base.pbl(ns_sqlca_master)oe_heart_beat.0028: ib_heartbeat_skip = FALSE // YES=>Skip OFF

STD_FC_PB_Base.pbl(ns_sqlca_master)oe_heart_beat.0030: EXECUTE Immediate :is_heartbeat_sql; // NO=>Run HB SQL

STD_FC_PB_Base.pbl(ns_sqlca_master)oe_heart_beat.0032: go_ac.of_write_log ( 'Heartbeat SQL fired: "' + is_heartbeat_sql + &

STD_FC_PB_Base.pbl(ns_sqlca_master).of_disconnect.0027: IF ib_heartbeat_required = TRUE THEN // Heart beat required?

STD_FC_PB_Base.pbl(ns_sqlca_master).of_connect.0009: Behaviour : Starts the Heartbeat timer if HB feature is ON

STD_FC_PB_Base.pbl(ns_sqlca_master).of_connect.0050: IF ib_heartbeat_required = TRUE THEN // Heart beat Required?

STD_FC_PB_Base.pbl(ns_sqlca_master).of_connect.0053: io_timer.start( il_heartbeat_time ) // YES=>Start Timer

STD_FC_PB_Base.pbl(ns_sqlca_master).of_connect.0057: io_timer.start( il_heartbeat_time ) // Start Timer

STD_FC_PB_Base.pbl(ns_sqlca_master).of_connect.0060: go_ac.of_write_log ( "Database heartbeat feature disbaled. " + &

STD_FC_PB_Base.pbl(ns_sqlca_master).of_connect.0062: ib_heartbeat_required = FALSE // Turn HB OFF

STD_FC_PB_Base.pbl(ns_sqlca_master).of_set_heartbeat_time.0002: Method : of_set_heartbeat_time (Function)

STD_FC_PB_Base.pbl(ns_sqlca_master).of_set_heartbeat_time.0008: Description : Method used to change the Heartbeat timer.

STD_FC_PB_Base.pbl(ns_sqlca_master).of_set_heartbeat_time.0028: il_heartbeat_time = ai_time // Set new time interval

STD_FC_PB_Base.pbl(ns_sqlca_master).of_set_heartbeat.0002: Method : of_set_heartbeat_state (Function)

STD_FC_PB_Base.pbl(ns_sqlca_master).of_set_heartbeat.0008: Description : Called by the APP to enable or disable the Heartbeat feature

STD_FC_PB_Base.pbl(ns_sqlca_master).of_set_heartbeat.0012: Argument(s) : boolean ab_heartbeat

STD_FC_PB_Base.pbl(ns_sqlca_master).of_set_heartbeat.0030: ib_heartbeat_required = ab_heartbeat // YES=>Set HB required

STD_FC_PB_Base.pbl(ns_sqlca_master).of_set_heartbeat.0033: ib_heartbeat_required = FALSE // No=> Disable

STD_FC_PB_Base.pbl(ns_sqlca_master)sqlpreview.0030: IF ib_heartbeat_required = TRUE THEN // Heart beat ON?

STD_FC_PB_Base.pbl(ns_sqlca_master)sqlpreview.0031: ib_heartbeat_skip = TRUE // YES=>Set "skip" mode

---------- Done 30 Matches Found On "Heartbeat":

---------- Finished Searching Target OES_Native for 'Heartbeat' (10:27:07 AM)

  1. Helpful
There are no comments made yet.
jay rajan Accepted Answer Pending Moderation
  1. Monday, 26 November 2018 06:20 AM UTC
  2. PowerBuilder
  3. # 3

HI

Thanks for reply

but i don't know that this error taken how much time

means this error is accure after 15-25 min when i not using application or some time it happen after some different time

but exact time is needed in timer event 

Comment
There are no comments made yet.
Michael Hartnett Accepted Answer Pending Moderation
  1. Monday, 26 November 2018 08:33 AM UTC
  2. PowerBuilder
  3. # 4

Hi Jay,

We had similar issues over the years with MDI applications being run from Network Fileshares and accessing DBs.

Make sure that the client PC does not go into a sleep mode when idle.  This used to shutoff the network activity and killed the DB connection for the applications.  It tended to happen when users left their PC idle during lunch hour.

When users "woke-up" their PCs again the DB connection was dead and the applications would throw errors until they closed and reopened to establish a new connection.

The simplest solution was to disable the auto sleep feature in the PCs powersaving settings, which clients preferred, but as Chris mentions you could use a Hearbeat function to ping the DB server or to mimic some Client PC activity during idle time.  Just make sure the Heartbeat triggers at shorter intervals than the Power Saving settings.

Michael

Comment
  1. jay rajan
  2. Monday, 26 November 2018 14:15 PM UTC
hi sir

thanks for your reply

i want to know that it is guaranted that if system auto sleep is turn off permanently then no is error accure
  1. Helpful
  1. Michael Hartnett
  2. Monday, 26 November 2018 14:50 PM UTC
Hi Jay,

Not sure about a Guarantee??

I have just offered advice on what has worked for our environment in the past. It may or may not help you, but the only way you will know is to try it yourself.

  1. Helpful
  1. jay rajan
  2. Tuesday, 27 November 2018 06:21 AM UTC
thanks you so much sir

successfully done

thanks alot



  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.