Wednesday, August 11, 2021

Oracle Database Security Assessment Tool

 1- Download Oracle Database Security Assessment Tool using below link.


https://www.oracle.com/database/technologies/security/dbsat.html


2- Download Java JDK RPM if not already installed.

https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html

3- Now install Java

   rpm -Uvh jdk-8u181-linux-x64.rpm

4- Export Java Variables

export JAVA_HOME=/usr/java/jdk1.8.0_181-amd64

export PATH=$JAVA_HOME/bin:$PATH


5- Now Unzip DB stat file into any directory.
cd /u01/app/oracle/
unzip /backup/dbsat.zip
cd /u01/app/oracle/dbstat/


6- Now Run DB State Tool 

 ./dbsat collect system/yourpassword /u01/app/oracle/dbstat/statreport

This will create a new zip file named as statreport.

./dbstat collect system/yourpassword  /u01/app/oracle/dbstat/statreport

./dbsat report  /u01/app/oracle/dbstat/statreport


Now cd to discoverer folder.
cd Discover/

and copy sample_dbsat.config  to dbstat_config and change hostname and service_name and port no in this file.

 ./dbsat discover -c Discover/conf/dbstat_config nameofdatabase


After successful execution of last command. New zip file named as dbname_report.zip will be created. Copy this file to your machine and open .html file.






7- 

Saturday, July 10, 2021

Oracle 12c New Feature: How to recover table using rman.

 How to recover a table in Oracle 12c Pluggable Database Using RMAN.


09:32:19 SQL> 

09:33:19 SQL> 

09:36:19 SQL> Create table hr.emp as select * from hr.employees;


rman target /

RMAN> backup as compressed backupset incremental level 0 database format '/backup/incr_bkp%U';


09:50:22 SQL> drop table hr.emp purge;


rman target/


RMAN> recover table hr.emp of pluggable database pdb  until time "to_date('10/07/2021 09:40:00','dd/mm/yyyy hh24:mi:ss')" auxiliary destination '/backup' datapump destination '/backup';


RMAN> recover table hr.emp of pluggable database pdb  until time "to_date('10/07/2021 20:15:00','dd/mm/yyyy hh24:mi:ss')" auxiliary destination '/backup';



09:59:19 SQL> select count(*) from hr.emp

Sunday, June 6, 2021

How to register PDB with Listener

 LISTENER_DBATEST =

 (DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dbatest-host)(PORT = 1573))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1573))
)
)
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_PDB_LISTENER=ON # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_PDB_LISTENER=SUBNET # line added by Agent


lsnrctl start LISTENER_DBATEST