Oracle query libraries already have stored procedures, create timed refresh views, role permission passes, create sequence triggers

Source: Internet
Author: User

SELECT * from v$access O WHERE o.type like ' procedure% '

Create materialized views and refresh periodically
Create materialized view Mv_name Refresh Force on demand start with Sysdate next Sysdate + 1
Create materialized view Mv_name Refresh Force on demand start with Sysdate next To_date (Concat (To_char (sysdate + 1, ' DD -mm-yyyy '), ' 22:00:00 '), ' dd-mm-yyyy hh24:mi:ss ')

GRANT SELECT on < table name or view name > to < user name >
GRANT <select/insert....>on < table or view name > to < user name >

--Create a sequence
CREATE SEQUENCE SEQ_MSS_GC_DDPH
MINVALUE 1
MAXVALUE 999999999999999999999999999
START with 1
INCREMENT by 1
NOCACHE ORDER;

--Create a trigger
CREATE OR REPLACE TRIGGER TRIGGER_MSS_GC_DDPH before INSERT on MSS_GC_DDPH
For each ROW
When (NEW. Ddphid is NULL)
BEGIN
SELECT SEQ_MSS_GC_DDPH. Nextval into:new. Ddphid from DUAL;
END;

Oracle query libraries already have stored procedures, create timed refresh views, role permission passes, create sequence triggers

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.