- person Penulis:
-
Dimas Maryanto
PT. Tabeldata Informatika
- account_balance_wallet Donasi via:
- Saweria a/n Dimas Maryanto
- lock_open Join Premium Members:
- Udemy.com
-
Daftar Materi
-
1. Pengenalan Oracle Database 10
-
1. Silabus Belajar RDBMS Oracle 18c
2. Pengenalan Oracle Database 18c
3. Konsep User dan Schema di Oracle Database 18c
4. Interface untuk Oracle Database
5. Database Interaction dengan SQL
6. Persiapan install Oracle Database 18c
7. Install Oracle 18c XE untuk Windows 10
8. Install Oracle 18c XE untuk Linux
9. Install Oracle 18c XE dengan Docker
10. Install Database Editor untuk Oracle 18c
-
2. SQL - Select Statement 9
-
1. Persiapan Sebelum mulai belajar
2. Aturan Penulisan SQL pada Oracle Database
3. Data Types di Oracle Database
4. Select Statement dalam SQL
5. Pemberian alias pada column dan table
6. Operation Arithmetic di Oracle
7. Menggabungkan column dengan concatnation
8. Handle Null value dengan Coalesce
9. Menghilangkan nilai redundansi dengan klausa Distinct
-
3. SQL - Select with where clause 10
-
1. Klausa where untuk filter data di Oracle
2. Comparison Predicate pada klausa where di Oracle
3. Like Predicate pada klausa where di Oracle
4. Between Predicate pada klausa where di Oracle
5. Null Conditions pada klausa where di Oracle
6. In Predicates pada klausa where di Oracle
7. Exists Condition pada klausa where di Oracle
8. Not Predicate pada klausa where di Oracle
9. Combine Logical pada klausa where di Oracle
10. Mengurutkan data dengan klausa ORDER BY di Oracle
-
4. SQL - Functions 11
-
1. Single Row Function di Oracle
2. Character Single Row Function di Oracle
3. Number Single Row Function di Oracle
4. Date & Time Single Row Function di Oracle
5. Conversion Single Row Function di Oracle
6. Casting Build-In Data Type di Oracle
7. Null-Related Single Row Function
8. Aggregate Functions
9. Klausa Group By di Oracle
10. Where clause dengan Group By Function
11. Having clause dengan Group By Function
-
5. SQL - Join Tables 6
-
6. SQL - Sub Queries 12
-
1. Sub Query di Oracle
2. Sub Query single row result dengan where clause
3. Handle Sub Query Multiple rows Result dengan where operator
4. In Predicates dengan Sub Query di Oracle
5. ANY & SOME dengan Sub Query di Oracle
6. ALL Operator dengan Sub Query di Oracle
7. Sub Query Correlate di Oracle
8. Sub Query EXIST Predicates di Oracle
9. Pairwise Sub Query di Oracle
10. Sub Query Inline View di Oracle
11. Paginate dengan Sub Query di Oracle versi lama
12. Pagination dengan fetch dan offset
-
7. SQL - Expressions 2
-
8. SQL - Data Manipulation Language 11
-
1. Data Manipulation Language (DML)
2. DML - Insert Statement di Oracle
3. DML - Update Statement di Oracle
4. DML - Delete Statement di Oracle
5. DML - Merge Statement di Oracle
6. Transaction Control Language (TCL)
7. TCL - Commit Transaction di Oracle
8. TCL - Rollback Transaction di Oracle
9. TCL - Savepoint di Oracle
10. TCL - Concurrent Transaction
11. TCL - Locking Transaction di Oracle
-
9. SQL - Data Definition Language 19
-
1. Data Definition Language (DDL) di Oracle
2. DDL - Static Data Dictionary View
3. DDL - Membuat Tabel di Oracle
4. DDL - Merubah struktur table
5. DDL - Menghapus table dengan DROP
6. DDL - Truncate Table
7. DDL - Purge Table & Recyclebin
8. DDL - Macam-macam Constraint di Oracle
9. DDL - Not Null Constraint
10. DDL - Unqiue Constraint
11. DDL - Check Constraint
12. DDL - Primary Key Constraint
13. DDL - Foreign Key Constraint
14. DDL - Foreign Key Constraint dengan Options
15. DDL - Enabled, Disabled & Drop Constraints
16. DDL - Deferring Constraint Checks
17. DDL - View di Oracle
18. DDL - Sequences di Oracle
19. Default value untuk Primary Key di Oracle
-
10. Indexing 5
-
11. DDL - User Management 8
-
12. Monitor database activity 5
-
13. Database Design 8
- Lastest Posts
- 09 Apr 23 Working with Deployment object
- 26 Feb 23 Study cases: Microservice apps (...
- 05 Feb 23 Welcome to the Nutanix HCF (Hybr...
- 04 Feb 23 Silabus SRE - Nutanix AHV: Pemul...
- 17 Jan 23 What is Workload Resources?
- 17 Jan 23 Overview Kubernetes Workloads re...
- 15 Jan 23 Getting started with Transaction...
- 14 Jan 23 Overview of Concurrency Control
- 14 Jan 23 Time your practice (part 3)
- 08 Jan 23 Cleanup Data from Table
Auditing Specific Activities with Fine-Grained Auditing
Fine-Grained Audition yaitu policies yang di tujukan secara specifik kondisi untuk INSERT, UPDATE, DELETE, SELECT operation. Secara general fine-grained audit policies adalah user-defined sql predicate pada suatu tabel untuk selective audition.
Syntax Fine-Grained Audit Policy
Syntax untuk membuat FGA Policy, seperti berikut:
Syntax untuk enable/disble FGA Policy, seperti berikut:
Syntax untuk menhapus FGA Policy, seperti berikut:
Implementasi Fine-grained Audit Policy
Contoh kasusnya, disini kita akan melakukan audit terhadap columns salary
dan commission_pct
pada table employees
dalam schema hr
yang memiliki salary >= 10000
. Seperti berikut penggunaanya:
Untuk melihat informasi suatu policy FGA, kita bisa lihat di Data Dictionary View Seperti berikut
Untuk melihat record audit, kita bisa check di Data Dictionary View seperti berikut:
Jika di jalankan maka hasilnya seperti berikut:
bash> sqlplus system/passwordnyaOracle18@XEPDB1
SQL*Plus: Release 18.0.0.0.0 - Production on Sat Mar 20 09:58:05 2021
Version 18.4.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Last Successful login time: Sat Mar 20 2021 09:31:10 +00:00
Connected to:
Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
Version 18.4.0.0.0
SQL> begin
DBMS_FGA.ADD_POLICY(
object_schema => 'HR',
object_name => 'EMPLOYEES',
policy_name => 'FGA_UPDATE_HR_EMPLOYEES_ON_DEP_IN',
audit_column => 'SALARY, COMMISSION_PCT',
audit_condition => 'SALARY >= 10000',
enable => true,
statement_types => 'UPDATE'
);
end;
/
SQL> col object_schema format a5
SQL> col object_name format a20
SQL> col policy_owner format a10
SQL> col policy_name format a20
SQL> col policy_text format a20
SQL> col policy_column format a20
SQL> SET LONG 20000 LONGCHUNKSIZE 20000 PAGESIZE 0 LINESIZE 1000 FEEDBACK OFF VERIFY OFF TRIMSPOOL ON
SQL> SET PAGESIZE 14 LINESIZE 100 FEEDBACK ON VERIFY ON
SQL> select OBJECT_SCHEMA, OBJECT_NAME, POLICY_OWNER, POLICY_NAME, POLICY_TEXT, ENABLED
from dba_audit_policies;
OBJEC OBJECT_NAME POLICY_OWN POLICY_NAME POLICY_TEXT ENA
----- -------------------- ---------- -------------------- -------------------- ---
HR EMPLOYEES SYSTEM FGA_UPDATE_HR_EMPLOY SALARY >= 10000 YES
EES_ON_DEP_IN
1 row selected.
SQL> conn toko_online/toko_online@XEPDB1
Connected.
SQL> update hr.EMPLOYEES
set SALARY = 22500,
COMMISSION_PCT = 0.1
where EMPLOYEE_ID in (100, 115);
2 rows updated.
SQL> commit;
Commit complete.
SQL> update hr.EMPLOYEES
set SALARY = 6500,
COMMISSION_PCT = 0.1
where EMPLOYEE_ID = 160;
1 row updated.
SQL> commit;
SQL> conn system/passworndyaOracle18@XEPDB1
SQL> col object_schema format a5
SQL> col object_name format a20
SQL> col policy_owner format a10
SQL> col policy_name format a20
SQL> col policy_text format a20
SQL> col policy_column format a20
SQL> col sql_text format a30
SQL> col db_user format a10
SQL> SET LONG 20000 LONGCHUNKSIZE 20000 PAGESIZE 0 LINESIZE 1000 FEEDBACK OFF VERIFY OFF TRIMSPOOL ON
SQL> SET PAGESIZE 14 LINESIZE 100 FEEDBACK ON VERIFY ON
SQL> select TIMESTAMP, DB_USER, OBJECT_SCHEMA, OBJECT_NAME, POLICY_NAME, SQL_TEXT, STATEMENT_TYPE
from CDB_FGA_AUDIT_TRAIL
where DB_USER = 'TOKO_ONLINE'
order by TIMESTAMP desc;
TIMESTAMP DB_USER OBJEC OBJECT_NAME POLICY_NAME SQL_TEXT STATEME
--------- ----------- ----- -------------------- -------------------- ------------------------------ -------
20-MAR-21 TOKO_ONLINE HR EMPLOYEES FGA_UPDATE_HR_EMPLOY update hr.EMPLOYEES UPDATE
EES_ON_DEP_IN set SALARY = 22500,
COMMISSION_PCT = 0.1
where EMPLOYEE_ID in (100, 115)
1 row selected.
SQL>
Management Fine-grained Audit Policy
Fine-Grained Audit Policy tidak dapat di modifikasi, untuk merubahnya kita perlu hapus dulu kemudian buat lagi. berikut adalah perintah untuk meng-hapusnya:
Selain itu juga kita bisa non-active / disable policynya dengan menggunakan perintah berikut:
Untuk mengaktifkanya kembali, kita bisa menggunakan perintah berikut: