Skip to main content

Posts

VPD Policy Implementation - ORACLE Database

VPD Policy Implementation - ORACLE Database  VPD policies Oracle CREATE TEST USERS in DB -- Owner schema for objects CREATE USER app_owner IDENTIFIED BY AppOwner#123 DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp QUOTA UNLIMITED ON users; GRANT CREATE SESSION, CREATE TABLE, CREATE PROCEDURE, CREATE ANY CONTEXT TO app_owner; -- Test application user CREATE USER app_user IDENTIFIED BY AppUser#123 DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp; GRANT CREATE SESSION TO app_user; CONNECT TO USER CONN app_owner/AppOwner#123  CREATE THE SAMPLE TABLE AND DATA CREATE TABLE employees (     emp_id         NUMBER PRIMARY KEY,     emp_name       VARCHAR2(100),     department_id  NUMBER,     salary         NUMBER ); INSERT TEST DATA   INSERT INTO employees VALUES (1, 'John',  10, 1000); INSERT INTO employees VALUES (2, 'Mary',  20, 1200); INSERT INTO empl...
Recent posts

100% working EXPDP for Oracle database for exporting data from old database.

Check current directory pathes which are on the source database. SELECT directory_name, directory_path FROM dba_directories; create and grant permision to run expdp for the same location which you want to run the backup. CREATE OR REPLACE DIRECTORY DUMP_NEW_DIR AS '/BACKUP'; GRANT READ, WRITE ON DIRECTORY DUMP_NEW_DIR TO SYSTEM; before running the below command create a file in the directory and give permissions as follows, chmod -R 777 export.par vi export.par  DIRECTORY=DUMP_NEW_DIR DUMPFILE=full_db_export_%U.dmp LOGFILE=export.log FULL=Y PARALLEL=2 run the command nohup to run this expdp without enteruptions. nohup expdp system/oracle123 parfile=export.par & check if any exp process are running on the database using below sql command. col owner_name format a12 col job_name format a25 col state format a15 col operation format a10 col job_mode format a12 select owner_name,        job_name,        operation,        job...

How To Enable Flash Recovery Area In Oracle Database

  The flash recovery area(FRA) is an Oracle-managed destination( either FILE SYSTEM or ASM ) for centralized backup and recovery files. It simplifies the backup management. The following recovery-related files are stored in the flash recovery area: — Current control file — Online redo logs — Archived redo logs — Flashback logs — Control file auto backups — Datafile and control file copies — Backup pieces — Foreign archived redo log Below are the steps for enabling  flash  recovery area. DB_RECOVERY_FILE_DEST_SIZE   and  DB_RECOVERY_FILE_DEST   initial parameters are required for enabling FRA. DB_RECOVERY_FILE_DEST_SIZE   -> It is the disk quota size for the flash recovery area. DB_RECOVERY_FILE_DEST   – > This initialization parameter is a valid destination for the Flash Recovery Area. It can be a directory, file system, or ASM disk group. NOTE  : DB_RECOVERY_FILE_DEST_SIZE must be set before DB_RECOVERY_FILE_DEST. 1. Check whether FRA ...

Convert TIMESTAMP to SCN and SCN to TIMESTAMP in Oracle

  Convert TIMESTAMP to SCN and SCN to TIMESTAMP in Oracle In many recovery scenario we need to know our SCN and timestamps. We can convert this by using the following function SCN_TO_TIMESTAMP TIMESTAMP_TO_SCN We can use this function with help of dual functions. Example of using this function as follows: 1. Convert the SCN to Timestamp SQL> select scn_to_timestamp(2011955) from dual; SCN_TO_TIMESTAMP(2011955) ----------------------------------------------------- 05-SEP-18 12.46.20.000000000 PM 2. Convert the Timestamp to SCN SQL> select timestamp_to_scn(to_timestamp('05-09-2018 12:46:21','dd-mm-yyyy hh24:mi:ss')) scn from dual; SCN ---------- 2011955

How to Set the IP Address in Redhat 7 || RHEL7 or Centos7 Step by Step

How to Set the IP Address in Redhat 7 || RHEL7 or Centos7 Step by Step go to terminal  login to root  # su - # ip a to check the ip address and details # dhclient  use to request a client from the dns server # browse to the below location cd /etc/sysconfig/network-scripts open vi ifcfg-eno(the connection file) edit the connection file and remove IPV6 records and add  ONBOOT = YES IPADDR = 192.168.160.32 PREFIX = 24 GATEWAY = 192.168.160.1 save the file and cat open the file to check if its saved properly. then ifdown ifcfg-eno  and ifup ifcfg-eno restart the pc by using shutdown -r and see the results reference : https://www.youtube.com/watch?v=oQd5eG9BZXE