SQL Script to Find out Total SGA and Current SGA Utilization

This query gives you the total SGA and its current usage by combining v$sga, v$sgastat and v$sga_dynamic_components dynamic views. 

Query

SQL Script to Check the User wise Count in Oracle database

Here is the SQL script

set lines 120 pages 1000
break on report
compute SUM of tot on report
compute SUM of active on report

How to Kill My Own SQLPLUS Session


Here I am giving you tip to kill your own sqlplus session connected to the oracle database.
Syntax

How to Check When was the Table Insert, Update, Delete Done on Oracle Tables or Partitions

This is done with the help of the DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO package. This package flushes in-memory monitoring information for all the tables to the dictionary.

SQL Query to Check Last Modified Time for an Oracle Object


Query
select        to_char(last_ddl_time,'DD-MON-YYYY HH24:MI:SS')
from         dba_objects
where       owner='&user'

How Check Hardware type In Linux / Unix

AIX
uname -M  /   prtconf

Linux
cat /sys/devices/virtual/dmi/id/*

ORA-01103: database name 'TEST' in control file is not 'CDB'


Problem Description:
Alter database mount failed with following error after the dbname change using DBNEWID – NID utility.
SQL> startup mount

DBNEWID – NID Utility – Change DBNAME and DBID


Using this command line utility we can make following 3 changes to the oracle database.

   1.  Only the DBID of a database

Flush SQLID or SQL Statement, Object from Shared Pool - DBMS_SHARED_POOL.PURGE

Package Name: DBMS_SHARED_POOL.PURGE 
 PROCEDURE PURGE
Argument Name                  Type                    In/Out Default?
------------------------------ ----------------------- ------ --------
NAME                           VARCHAR2                IN
FLAG                           CHAR                    IN     DEFAULT
HEAPS                          NUMBER                  IN     DEFAULT

 

acehints.com Copyright 2011-19 All Rights Reserved | Site Map | Contact | Disclaimer | Google