Here\'s an example of the sort of query I would like to prevent from running on my server:
begin
While True
LOOP
dbms_output.put_line(\'tst\');
EN
You can't prevent people from writing procedural PL/SQL code against your server. Depending on the exact nature of the problem you're trying to solve, however, you may have other options. Two options that spring to mind...
You can create a profile associated with the database user that enforces various resource limits. So you can limit the amount of CPU a single call can consume or the number of reads it can do. That lets you automatically kill sessions that do something like coding an infinite loop. Note that the RESOURCE_LIMIT
initialization parameter needs to be set to TRUE in order for Oracle to enforce resource limits in profiles.
You can use Oracle Resource Manager to prioritize access to resources to reduce the risk that a developer's mistake will take all the resources available on the server and starve the important production processes.