Home » Developer & Programmer » Precompilers, OCI & OCCI » reconnect proc if disconnect (proc*c oracle 9.1.0 , windows 2000 )
reconnect proc if disconnect [message #530883] Fri, 11 November 2011 04:06 Go to next message
NEERAJ19
Messages: 11
Registered: September 2007
Junior Member
I am running a pro*c its working fine but my connection gets disconnect to my db server so i want to continue my proc if connection between my machine & server reestablish again weather it starts from start or from where it was stooped because of connection break
is there any way to do this ?

regards
Re: reconnect proc if disconnect [message #530888 is a reply to message #530883] Fri, 11 November 2011 04:22 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It is not clear, can you explain with more details what you want to achieve and you have.
Maybe with a little example.
For instance, the proc you mentioned is it a PL/SQL stored procedure or a Pro*C one?

Regards
Michel
Re: reconnect proc if disconnect [message #531133 is a reply to message #530888] Sun, 13 November 2011 23:52 Go to previous messageGo to next message
NEERAJ19
Messages: 11
Registered: September 2007
Junior Member
thxs to reply frd, atchually i run my proc from my machine & database is on another machine but my network b/w my machine & db server get disconnect and reconnect again after some time but in this disconnection my proc gets stop & don't run again whether network connect again.
so i want to continue my proc after disconnection when network is ok .
can i do this ?
Re: reconnect proc if disconnect [message #531136 is a reply to message #531133] Mon, 14 November 2011 00:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Michel Cadot wrote on Fri, 11 November 2011 11:22
It is not clear, can you explain with more details what you want to achieve and you have.
Maybe with a little example.
For instance, the proc you mentioned is it a PL/SQL stored procedure or a Pro*C one?

Regards
Michel

Re: reconnect proc if disconnect [message #531155 is a reply to message #531136] Mon, 14 November 2011 02:47 Go to previous messageGo to next message
NEERAJ19
Messages: 11
Registered: September 2007
Junior Member
its pro*c ,i run it from command prompt.
Re: reconnect proc if disconnect [message #531170 is a reply to message #531155] Mon, 14 November 2011 04:41 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Check the errors on each statement you execute, if it is a disconnection then reconnect and reexecute the statement.

Regards
Michel
Re: reconnect proc if disconnect [message #531283 is a reply to message #531170] Mon, 14 November 2011 23:16 Go to previous messageGo to next message
NEERAJ19
Messages: 11
Registered: September 2007
Junior Member
yes i know the error is only network break .but i cant be here all the time to re execute so is there any way that proc start again if it gets connection back.
Re: reconnect proc if disconnect [message #531299 is a reply to message #531283] Tue, 15 November 2011 01:19 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I mean, in your code do what I said.

Regards
Michel
Re: reconnect proc if disconnect [message #531411 is a reply to message #531299] Tue, 15 November 2011 23:00 Go to previous messageGo to next message
NEERAJ19
Messages: 11
Registered: September 2007
Junior Member
its very long . and network disconnection is not because of code its network prob. so we cant do in this i just want to run my proc itself when connection establish again
Re: reconnect proc if disconnect [message #531425 is a reply to message #531411] Wed, 16 November 2011 01:32 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
its very long

What is long?

Anyway, this is C coding and not an Oracle issue.

Regards
Michel
Previous Topic: OCIEnvcreate returns -1
Next Topic: Error inserting XML records > 4000 bytes
Goto Forum:
  


Current Time: Fri Mar 29 00:56:35 CDT 2024