ORACLE Common SQL (for personal use, update)

Source: Internet
Author: User

/************************************************************************************************************** ************

* 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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.