This blog provides valuable insights and information for Oracle DBA professionals.
user_privs.sql
Get link
Facebook
X
Pinterest
Email
Other Apps
-- ************************************************************************************************************
-- * Filename : user_privs.sql
-- * Author : Saravanakumar K
-- * Description : This script with show all system,table privs and granted role infor for a user
-- * Usage : @user_privs.sql
-- * Version : v1
-- **********************************************************************************************************
set echo off
set define '&'
define username = &1
set tab off verify off
col USERNAME for a25
col ACCOUNT_STATUS for a15
col PROFILE for a30
col CREATED heading User|created_dt for a18
col PTIME heading Password|last|changed_dt for a18
col LTIME heading Password|last|locked_dt for a18
col EXPIRY_DATE heading Password|expire|date for a18
col default_tablespace heading Tablespace for a25
col "User account status" for a80
col "Table_name" for a30
set lines 250 pages 49999
SELECT
d.name DB_NAME,
du.username,
du.default_tablespace,
du.account_status,
du.profile,
to_char(du.created,'DD-MON-YY HH24:MI:SS') created,
to_char(du.expiry_date,'DD-MON-YY HH24:MI:SS') expiry_date
FROM
dba_users du,
v$database d
--sys.user$ u
WHERE
username = upper(TRIM('&username'))
;
SELECT GRANTEE "USERNAME",null "Table_name",PRIVILEGE "PRIVILEGE" FROM DBA_SYS_PRIVS WHERE GRANTEE = '&username'
union
SELECT GRANTEE "USERNAME",null,GRANTED_ROLE "PRIVILEGE" FROM DBA_ROLE_PRIVS WHERE GRANTEE = '&username'
union
SELECT GRANTEE "USERNAME",TABLE_NAME,PRIVILEGE "PRIVILEGE" FROM DBA_TAB_PRIVS WHERE GRANTEE = '&username'
Automating DBA Tasks with Oracle GoldenGate Oracle GoldenGate is widely recognized as one of the best tools for real-time data replication. It allows seamless database migrations, schema or table replication across homogeneous and heterogeneous environments, and enhances database performance by offloading reporting workloads. Additionally, it ensures high availability by enables Bi-directional or cascading database replication configurations. Beyond these well-known benefits, GoldenGate can also be leveraged for automating routine DBA tasks, reducing manual intervention and improving efficiency by Streamline Your DBA Tasks with EVENTACTIONS. Let's explore how you can leverage its EVENTACTIONS parameter to automate routine DBA tasks, reduce manual effort, and optimize workflows. In this post, I will demonstrate how GoldenGate can assist in automating key DBA operations, such as: Starting or stopping GoldenGate processes – Automate the m...
Goldengate initial load options - File to Replicat This method allows the Extract process to write to a file on the target system, which the Replicat applies using SQL INSERT statements. The Extract process generates a file in a universal format for the Replicat to load. This approach fundamentally resembles the standard GoldenGate data replication method used for change data capture (CDC). During the initial load, you can enable CDC. In a live environment, you should use the SQLPREDICATE key to specify the SCN# to maintain data integrity. Please follow the below steps to enable goldengate initial load using File to Replicat method On source: Add initial load extract process. Create a parameter file. Verify task(in...
Oracle Recovery Manager (RMAN) is a robust utility designed for the backup, restoration, and recovery of Oracle databases. RMAN simplifies database management by offering comprehensive backup options, automatic recovery features, and seamless integration with Oracle Database. It supports full and incremental backups, point-in-time recovery, and database cloning. RMAN can be executed through command-line, integrated with Oracle Enterprise Manager, and offers advanced features like block media recovery, encryption, and compression, ensuring efficient and secure database management. One of the most tedious processes is resetting all RMAN configurations in a single command. If you want to clear configurations, use " CONFIGURE..CLEAR" . Sometimes, restoring a standby or duplicate database can fail due to configurations from the source database. Therefore, it's essential to reset all configurations beforehand using the fo...
Comments
Post a Comment