Oracle Database 19c Related Various SQL Codes
SELECT * FROM all_users;
USERNAME USER_ID CREATED
------------------------------ ---------- ----------
XS$NULL 2147483638 29.05.2014
MIKE 71 30.03.2018
SCOTT 66 03.03.2018
APEX_040000 47 29.05.2014 --> this
APEX_PUBLIC_USER 45 29.05.2014
Oracle DROP USER
Oracle DROP USER
DROP USER TEST [CASCADE];
CREATE USER TEST IDENTIFIED BY test1234;
DROP USER test;
Uses Oracle Drop User to delete a user who has a schema object
CREATE USER bar
IDENTIFIED BY abcd1234
QUOTA 5m ON users;
GRANT
CREATE SESSION,
CREATE TABLE
TO bar;
Delete workspace in runtime development environment
SYSTEM_DRIVE:\ sqlplus /nolog
connect sys as sysdba
ALTER SESSION SET CURRENT_SCHEMA = test
BEGIN
APEX_INSTANCE_ADMIN.REMOVE_WORKSPACE(WORKSPACE_NAME, DROP_USER, DROP_TABLESPACE)
END;
ALTER SESSION SET CURRENT_SCHEMA = APEX_040000;
CREATE TABLE ws_to_purge AS
SELECT c.security_group_id, c.company_name, c.admin_email, c.request_date,
SYSDATE last_updated_on, 'Y' ok_to_delete
FROM wwv_flow_provision_company c
WHERE
c.request_date <= to_date('20040628','YYYYMMDD') AND
( not exists
(SELECT NULL /* Activity Log */
FROM wwv_flow_activity_log l
WHERE l.security_group_id = c.security_group_id
AND l.time_stamp > to_date('20040610','YYYYMMDD'))
)
AND NOT EXISTS
(SELECT NULL /* workspace applications */
FROM wwv_flows f
WHERE f.security_group_id = c.security_group_id
AND f.last_updated_on > to_date('20040610','YYYYMMDD'))
AND NOT EXISTS
(SELECT NULL /* Pages */
FROM wwv_flow_steps s
WHERE s.security_group_id = c.security_group_id
AND s.last_updated_on > to_date('20040610','YYYYMMDD'))
AND NOT EXISTS
(SELECT NULL /* Regions */
FROM wwv_flow_page_plugs p
WHERE p.security_group_id = c.security_group_id
AND p.last_updated_on > to_date('20040610','YYYYMMDD'))
AND NOT EXISTS
(SELECT NULL /* Items */
FROM wwv_flow_step_items i
WHERE i.security_group_id = c.security_group_id
AND i.last_updated_on > to_date('20040610','YYYYMMDD'))
AND NOT EXISTS
(SELECT NULL /* Templates */
FROM wwv_flow_templates t
WHERE t.security_group_id = c.security_group_id
AND t.last_updated_on > to_date('20040610','YYYYMMDD'))
AND NOT EXISTS
(SELECT NULL /* Files uploaded */
FROM wwv_flow_file_objects$ o
WHERE o.security_group_id = c.security_group_id
AND o.created_on > to_date('20040610','YYYYMMDD'))
AND NOT EXISTS
(SELECT NULL /* SQL Workshop history */
FROM wwv_flow_sw_sql_cmds s
WHERE s.security_group_id = c.security_group_id
AND s.created_on > to_date('20040610','YYYYMMDD'));
SELECT s.schema
FROM ws_to_purge ws,
wwv_flow_company_schemas s
WHERE s.security_group_id = ws.security_group_id
AND ws.ok_to_delete = 'Y';
BEGIN
FOR c1 IN (SELECT security_group_id
FROM ws_to_purge
WHERE ok_to_delete = 'Y')
LOOP
WWV_FLOW_PROVISIONING.TERMINATE_SERVICE_BY_SGID(c1.security_group_id);
END LOOP;
END;
🔗 Demo Application-
URL- Demo Application
Username - demo, Pass- demo
I hope everyone will like it. Please watch the full video,
Comment on any of your problems, I will try my best to solve the problem, In-Shah Allah. Everyone's cooperation is desirable. Visit my blog site, new technology related videos, you will get different types of tutorials of Oracle Apex, and hopefully, you can use them in your daily work. database 19c related various
Please stay tuned by subscribing to the YouTube channel, and encourages new videos to be uploaded. database 19c related various
=================
Visit my site to get more collaborative posts about Oracle Apex and subscribe to my YouTube channel. Thanks.
Comment on any of your issues, I will try my best to solve the problem, In-Shah Allah. Everyone's cooperation is desirable.
Visit my blog site, new technology-related videos, you will get different types of tutorials of Oracle Apex, and hopefully, you can use them in your daily work. database 19c related various
==============================
🙍🏾 Md jABER HOSSEN
📲 Mobile- +8801760688286
📨 Email- jaberit786@gmail.com
🌐 FB- facebook.com/mdjaber.hossen1
Please Subscribe to My Channel
Many thanks for visiting the site.
Then Enjoy.........................