How to obtain Oracle License Information on 11g

-- Number of users and CPU/Processors
SQL> select L.SESSIONS_MAX, L.SESSIONS_WARNING, L.SESSIONS_CURRENT,
  2  L.SESSIONS_HIGHWATER,
  3  L.USERS_MAX, L.CPU_COUNT_CURRENT, L.CPU_SOCKET_COUNT_CURRENT,
  4  L.CPU_COUNT_HIGHWATER,
  5  L.CPU_CORE_COUNT_CURRENT, L.CPU_CORE_COUNT_HIGHWATER,
  6  L.CPU_SOCKET_COUNT_HIGHWATER
  7  from v$license l;
SQL> set linesize 300
SESSIONS_MAX SESSIONS_WARNING SESSIONS_CURRENT SESSIONS_HIGHWATER  USERS_MAX CPU_COUNT_CURRENT CPU_SOCKET_COUNT_CURRENT CPU_COUNT_HIGHWATER CPU_CORE_COUNT_CURRENT CPU_CORE_COUNT_HIGHWATER CPU_SOCKET_COUNT_HIGHWATER
------------ ---------------- ---------------- ------------------ ---------- ----------------- ------------------------ ------------------- ---------------------- ------------------------ --------------------------
           0                0                3                 12          0                 1                                            1

 
-- Database Edition
SQL> select banner from v$version where BANNER like '%Edition%';  
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production


-- Oracle Partitioning installed
SQL> select decode(count(*), 0, 'No', 'Yes')
  2  from dba_part_tables
  3  where owner not in ('SYSMAN', 'SH', 'SYS', 'SYSTEM') and rownum = 1;

DEC
---
No

-- Oracle Spatial installed:
select decode(count(*), 0, 'No', 'Yes')
from all_sdo_geom_metadata where rownum = 1;

DEC
---
No

-- Oracle RAC installed:
SQL> select decode(count(*), 0, 'No', 'Yes')
  2  from v$active_instances where rownum <= 2;

DEC
---
No

What is the difference between a physical and logical standby database ?

Q. What is the difference between a physical and logical standby database ?

Ans. 1.A physical standby database is a block-for-block identical copy of the primary database because it is kept in sync with the primary database by using media recovery to apply redo 
that was generated on the primary database.

Instead a logical standby database is kept in sync with the primary database using the SQL Apply engine. SQL Apply Engine transforms redo data received from the primary into logical 
SQL statements and then executes those SQL statements against the standby database: so a logical standby database has the same logical information but a different physical structure.

2.Physical standby schema matches exactly the source database.
Logical standby database does not have to match the schema structure of the source database.

3.Archived redo logs are transferred directly to the standby database which is always running in "recover" mode.  Upon arrival, the archived redo logs are applied directly to the 
standby database.
Logical standby uses LogMiner techniques to transform the archived redo logs into native DML statements (insert, update, delete).  This DML is transported and applied to the standby
database.

4.Installing Physical standbys offers these benefits:

An identical physical copy of the primary database

Disaster recovery and high availability

High Data protection

Reduction in primary database workload

Performance Faster

Installing Logical standbys offer:

Simultaneous use for reporting, summations and queries

Efficient use of standby hardware resources

Reduction in primary database workload

It's important to remember that a logical standby does not support all Oracle datatypes.
You can run this query
select distinct owner, table_name
from dba_logstdby_unsupported
order by owner;
to see if you are using unsupported objects.
So before setting up a logical standby database, ensure the logical standby database can maintain the data types and tables in your primary database, otherwise your only and best choice is to setup a physical standby database.




Reference:-http://www.dba-oracle.com/t_difference_logical_physical_standby_database.htm




Please share your ideas and opinions about this topic.

If you like this post, then please share with others.
Please subscribe on email for every updates on mail.

How to find out a particular tablesize in mysql


mysql> SELECT
    ->     CONCAT(FORMAT(DAT/POWER(1024,pw1),2),' ',SUBSTR(units,pw1*2+1,2)) DATSIZE,
    ->     CONCAT(FORMAT(NDX/POWER(1024,pw2),2),' ',SUBSTR(units,pw2*2+1,2)) NDXSIZE,
    ->     CONCAT(FORMAT(TBL/POWER(1024,pw3),2),' ',SUBSTR(units,pw3*2+1,2)) TBLSIZE
    -> FROM
    -> (
    ->     SELECT DAT,NDX,TBL,IF(px>4,4,px) pw1,IF(py>4,4,py) pw2,IF(pz>4,4,pz) pw3
    ->     FROM
    ->     (
    ->         SELECT data_length DAT,index_length NDX,data_length+index_length TBL,
    ->         FLOOR(LOG(IF(data_length=0,1,data_length))/LOG(1024)) px,
    ->         FLOOR(LOG(IF(index_length=0,1,index_length))/LOG(1024)) py,
    ->         FLOOR(LOG(data_length+index_length)/LOG(1024)) pz
    ->         FROM information_schema.tables
    ->         WHERE table_schema='cyclexaftest'
    ->         AND table_name='log_url'
    ->     ) AA
    -> ) A,(SELECT 'B KBMBGBTB' units) B;
+---------+---------+----------+
| DATSIZE | NDXSIZE | TBLSIZE  |
+---------+---------+----------+
| 5.52 MB | 6.03 MB | 11.55 MB |
+---------+---------+----------+
1 row in set (0.00 sec)


-----------------------------------------------------
Another query:-

mysql> SELECT table_name AS `Table`,
    -> round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`
    -> FROM information_schema.TABLES
    -> WHERE table_schema = "cyclexaftest"
    ->  AND table_name = "log_url";
+---------+------------+
| Table   | Size in MB |
+---------+------------+
| log_url |      11.55 |
+---------+------------+
1 row in set (0.00 sec)



Related Posts Plugin for WordPress, Blogger...