c# - Terminate query execute in oracle database -


i have asp.net page allow users run select queries on oracle data base. result shown on web page data table.

some time users may enter queries impact badly on db due long , deep query execution.

is there possibility mention time out each query run on db . if query runs longer specified time execution must stop on database.

you can solve problem on application or db side:

application side: sqlquerytimeout can set sqlquerytimeout statements on driver, or individually commandtimeout command. if query takes longer trap invoked , exception whcih can handle.

the second possibility set timeout oracle-user. if web-application connects database via shared user (as should be) can use alter user set user profile enforce max cpu limit, in effect time-limit on sql statments issued user.

the beauty of second solution database enforces rule, don't have worry application code might miss line...


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -