/************************************************************************************************************** ************
* Basic Common *
*************************************************************************************************************** ***********/
--Killing process
Alter system kill session ' sid,serial#, ';
/************************************************************************************************************** ************
* Licensing-related *
*************************************************************************************************************** ***********/
--Grant a user all Table query permissions
Grant Select any table to XXX;
----Grant all stored procedure permissions to a user
Grant execute any procedure to xxx;
/************************************************************************************************************** ************
* Job-related *
*************************************************************************************************************** ***********/
--View all job
SELECT * from Dba_jobs;
--View all the jobs being executed
SELECT * from Dba_jobs_running;
--View the process of the job being executed
Select B.sid,b.serial#,c.spid
From dba_jobs_running a,v$session b,v$process C
where A.sid = B.sid and b.paddr = c.addr;
--stop job, can only stop the job of their own users, first stop job and then kill the process
DECLARE
Begin
Dbms_job. Broken (183,true);
--dbms_job.remove (183);
--dbms_scheduler.stop_job (' 183 ', force=>true);
End
ORACLE Common SQL (for personal use, update)