Reputation: 309
I need to set specific query connection timeout in oracle pro*c. For example in java, the queryobj.settimeout(timeoutvalue); will set that specific timeoutvalue to the query(say select/insert/delete/update) and if the query takes more time than the specific value, .
Similarly i need to implement for pro*c queries. Please help.
Upvotes: 0
Views: 770
Reputation: 16399
I believe you need to alter the user profile.
EXEC SQL
ALTER PROFILE CTPROFILE2
LIMIT
SESSIONS_PER_USER Unlimited
CPU_PER_SESSION 2000
CPU_PER_CALL Unlimited
CONNECT_TIME 2
IDLE_TIME 30
LOGICAL_READS_PER_SESSION Unlimited
LOGICAL_READS_PER_CALL Unlimited
COMPOSITE_LIMIT Unlimited
PRIVATE_SGA Unlimited
FAILED_LOGIN_ATTEMPTS Unlimited
PASSWORD_LIFE_TIME Unlimited
PASSWORD_REUSE_TIME Unlimited
PASSWORD_REUSE_MAX Unlimited
PASSWORD_LOCK_TIME Unlimited
PASSWORD_GRACE_TIME Unlimited
PASSWORD_VERIFY_FUNCTION NULL
;
The above shows most of the settings, check your documentation for exactly what you want. I am guessing you want to limit cpu. I picked 2000 out of thin air. This ALTER statement assumes the profile already exists.
Upvotes: 2