Need help in how to maintain database connection alive
My python script is connecting to Oracle DB and is calling a stored procedure( this procedure will deletes data from table).The time taken for deletion of records from the table is taking more than 2 hrs.
After that python script is not executing the next set of commands, it is getting hanged in calling the procedure
please help how to fix this
My code:
Please help if this a session time out?
My python script is connecting to Oracle DB and is calling a stored procedure( this procedure will deletes data from table).The time taken for deletion of records from the table is taking more than 2 hrs.
After that python script is not executing the next set of commands, it is getting hanged in calling the procedure
please help how to fix this
My code:
import cx_Oracle conn_str = "username/password@host:port/service" d_dbh = cx_Oracle.connect(conn_str) d_cursor = d_dbh.cursor() d_cursor.execute(procedure_name) d_cursor.execute("select count(1) from table_name) delete_count = d_cursor.fetchone()[0] print(delete_count)As per the logs, the python script is hanged at calling that procedure. verified the logs from database end the records got deleted from table after 2hrs. but after 2hr the python script did not execute the next select statements.
Please help if this a session time out?
Larz60+ write Jan-16-2024, 11:14 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Code modified for you this time. Please use BBCode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Code modified for you this time. Please use BBCode tags on future posts.