Mir Sayeed Hassan – Oracle Blog

Oracle DBA – Tips & Techniques | Learn with real-time examples

Useful tips to find the Sysdate Commands from Oracle Database by issuing SQL Queries

Posted by Mir Sayeed Hassan on January 29th, 2023

Useful tips to find the Sysdate Commands from Oracle Database by issuing SQL Queries

Find the First Day of the Month

SQL> SELECT TRUNC (SYSDATE, 'MONTH') FROM DUAL;

TRUNC(SYS
---------
01-JAN-23

Find the Last Day of the Month

SQL> SELECT TRUNC (LAST_DAY (SYSDATE)) FROM DUAL;

TRUNC(LAS
---------
31-JAN-23

Find...
Read more..

Posted in DBA Administration | Comments Off on Useful tips to find the Sysdate Commands from Oracle Database by issuing SQL Queries

How to create the trigger for failed & success login attemp in Oracle Database

Posted by Mir Sayeed Hassan on January 18th, 2023

How to create the trigger for failed & success login attempt in Oracle Database

Note: The below given trigger is created to attempt the success and failed login attempt of the all the user in Oracle database., Data will be recorded in the table as well as at the OS Level (directory loc).

Verify the audit config in DB

SQL> show parameter... 
Read more..

Posted in DBA Administration | Comments Off on How to create the trigger for failed & success login attemp in Oracle Database

Backup and restore tablespace by using the RMAN ENCRYPTION Method in Oracle 19c

Posted by Mir Sayeed Hassan on December 7th, 2022

Backup and restore tablespace by using the RMAN ENCRYPTION Method in Oracle 19c

This scenario is to test the encryption method while performing the backup & restore operation.

Connect to Database

[oracle@testdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Tue Nov 8 04:03:38 2022
Version 19.3.0.0.0
Copyright... 
Read more..

Posted in RMAN | Comments Off on Backup and restore tablespace by using the RMAN ENCRYPTION Method in Oracle 19c

How to check the Failed Login Attempts in Oracle Database with time based.

Posted by Mir Sayeed Hassan on December 6th, 2022

How to check the Failed Login Attempts in Oracle Database.

Assume you or someone else has logged to the database with failed username & password.

SQL> connect systest/alksflkagf
ERROR:
ORA-01017: invalid username/password; logon denied

Lets try to find out the failed login attempt with time based

Query to find the time based...
Read more..

Posted in DBA Administration | Comments Off on How to check the Failed Login Attempts in Oracle Database with time based.

How to generate the ramdon User Password in Oracle Database

Posted by Mir Sayeed Hassan on December 6th, 2022

How to generate the ramdon User Password in Oracle Database

Note:

– Password should be 12 characters in length or as per the organization.
– Password should include at least one uppercase letter, one lower case letter, one number and one special character (&*(){}|[]+<>!@#$%^?).

SQL> select translate(dbms_random.string('a',... 
Read more..

Posted in Oracle SQL | Comments Off on How to generate the ramdon User Password in Oracle Database

Apply the Latest DB RU Patch 34419443 on Oracle Database 19c

Posted by Mir Sayeed Hassan on December 6th, 2022

Apply the Latest DB RU Patch 34419443 onOracle Database 19c

Check the status of Database

SQL> select instance_name, version, open_mode from V$database, v$instance;

INSTANCE_NAME       VERSION       OPEN_MODE
---------------------------------------------
proddb           19.0.0.0.0     READ WRITE

Download the Patch from below link

https://support.oracle.com/epmos/faces/PatchSearchResults?_adf.ctrl-state=ym4c1dobw_120&_afrLoop=189225645173189

Transfer...
Read more..

Posted in DB Patch | Comments Off on Apply the Latest DB RU Patch 34419443 on Oracle Database 19c