Friday, 9 August 2013

CRITICAL: Failed to connect to database instance: ORA-12537: TNS:connection closed (DBD ERROR: OCIServerAttach)

CRITICAL: Failed to connect to database instance: ORA-12537: TNS:connection closed (DBD ERROR: OCIServerAttach)

The DB alert log show max processes exceeded.

ORA-00020: maximum number of processes (150) exceeded
ORA-20 errors will not be written to the alert log for
the next minute. Please look at trace files to see all
the ORA-20 errors.
Incremental checkpoint up to RBA [0x6c.3340f.0], current log tail at RBA [0x6c.34e88.0]
ORA-00020: maximum number of processes (150) exceeded
ORA-00020: maximum number of processes (150) exceeded
ORA-20 errors will not be written to the alert log for
ORA-20 errors will not be written to the alert log for
the next minute. Please look at trace files to see all
the next minute. Please look at trace files to see all
the ORA-20 errors.
the ORA-20 errors


SQL> show parameter processes;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes                      integer     1
db_writer_processes                  integer     1
gcs_server_processes                 integer     0
global_txn_processes                 integer     1
job_queue_processes                  integer     10
log_archive_max_processes            integer     4
processes                            integer     150
SQL> show parameter sessions;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
java_max_sessionspace_size           integer     0
java_soft_sessionspace_limit         integer     0
license_max_sessions                 integer     0
license_sessions_warning             integer     0
sessions                             integer     248
shared_server_sessions               integer
SQL>

===========================


SQL> alter system set processes=300 scope=both;

alter system set processes=300 scope=both
                 *
ERROR at line 1:
ORA-02095: specified initialization parameter cannot be modified


SQL> alter system set processes=300 scope=spfile;

System altered.

SQL> alter system set sessions=496 scope=spfile;

System altered.

- Bounce the database for changes to be effective

Thursday, 25 July 2013

Oracle Database 12c R1 New Features - Multiple Indexes on the same column or set of columns

Oracle Database 12c R1 New Features - Multiple Indexes on the same column or set of columns

In DB releases prior to Oracle DB 12c, you could not create multiple indexes either on the same column or set of columns in any form. 

But now in DB 12c, you can have multiple indexes on the same column or set of columns as long as the index type is different. However, only one type of index is usable/visible at a given time. 

In order to test the invisible indexes, you need to set the optimizer_use_use_invisible_indexes=true.

Example:


SQL> CREATE TABLE EMP_RECORDS
  2  (EMP_NO number (5),
  3  EMP_NAME varchar2 (30),
  4  EMP_SAL number (6) INVISIBLE)
  5  /

SQL> alter session set optimizer_use_invisible_indexes = true;

Session altered.

SQL> CREATE INDEX EMP_IND1 ON EMP_RECORDS (EMP_NO, EMP_NAME);

Index created.

SQL> CREATE BITMAP INDEX EMP_IND2 ON EMP_RECORDS (EMP_NO, EMP_NAME) INVISIBLE;

Index created.

Related:

Oracle Database 12c R1 New Features - Invisible columns

Installing Oracle Database 12c R1 (12.1.0.1.0)