Showing posts with label Listener. Show all posts
Showing posts with label Listener. Show all posts

Friday, December 2, 2016

How to fix timezone issue in RAC Database.

When mismatch between OS time zone and clusterware time zone SYSDATE and  CURRENT_DATE will return different value, because of at the time of clusterware starting lintener started using clusterware time zone.

Solution : 

1. Shutdown clusterware from root user

crsctl stop crs

2. Change the clusterware time $GRID_HOME/crs/install/s_crsconfig__env.txt file using vi editor from root user. Before change take backup of this file.

bash-4.3# cat s_crsconfig_sbldcdb01_env.txt
### This file can be used to modify the NLS_LANG environment variable, which determines the charset to be used for messages.
### For example, a new charset can be configured by setting NLS_LANG=JAPANESE_JAPAN.UTF8
### Do not modify this file except to change NLS_LANG, or under the direction of Oracle Support Services

#TZ=America/New_York
TZ=Asia/Dhaka
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
RT_GRQ=ON
EXTSHM=OFF
TNS_ADMIN=
ORACLE_BASE=

3. Startup the clusterware from root user

crsctl start crs

Tuesday, July 28, 2015

ORA-12528: TNS:listener: all appropriate instances are blocking new connections.

ORA-12528: TNS:listener: all appropriate instances are blocking new connections.

Cause :  This condition may be temporary, such as at instance startup. In my case instance are in nomount mode and I am trying to connect database through Primary database.

Solution : After adding SID_LIST_LISTENER in listener I have solved this problem.

SQL> col DESTINATION format a35
col ERROR format a65
set lines 130
set pages 100
SELECT DESTINATION, ERROR FROM V$ARCHIVE_DEST;
SQL> SQL> SQL> SQL>
DESTINATION                         ERROR
----------------------------------- -----------------------------------------------------------------
USE_DB_RECOVERY_FILE_DEST
cbsdb                              ORA-12528: TNS:listener: all appropriate instances are blocking
                                    new connections

SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.

Total System Global Area 6.8413E+10 bytes
Fixed Size                  2238616 bytes
Variable Size            5.3687E+10 bytes
Database Buffers         1.4630E+10 bytes
Redo Buffers               93618176 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
DCDB1$
DCDB1$
DCDB1$ lsnrctl status

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production on 25-JUL-2015 13:58:33

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DCDB1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
Start Date                26-MAR-2015 14:39:25
Uptime                    120 days 23 hr. 19 min. 8 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /u01/oracle/app/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/oracle/app/diag/tnslsnr/DCDB1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=en4_bootip_server1)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "cbsdb" has 1 instance(s).
  Instance "cbsdb", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
DCDB1$ cat /u01/oracle/app/product/11.2.0/db_1/network/admin/listener.ora
# listener.ora Network Configuration File: /u01/oracle/app/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = DCDB1)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = /u01/oracle/app

DCDB1$ echo $ORACLE_HOME
/u01/oracle/app/product/11.2.0/db_1
DCDB1$ echo $ORACLE_SID
cbsdb
DCDB1$ vi listener.ora
"listener.ora" 22 lines, 544 characters # listener.ora Network Configuration File: /u01/oracle/app/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DCDB1)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
(GLOBAL_DBNAME = cbsdb)
(ORACLE_HOME = /u01/oracle/app/product/11.2.0/db_1)
(SID_NAME = cbsdb)
    )
  )
ADR_BASE_LISTENER = /u01/oracle/app

~
~"listener.ora" 22 lines, 544 characters
:wq
"listener.ora" 22 lines, 540 characters
DCDB1$ lsnrctl

LSNRCTL for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production on 25-JUL-2015 14:03:47

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> start
Starting /u01/oracle/app/product/11.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
System parameter file is /u01/oracle/app/product/11.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/oracle/app/diag/tnslsnr/DCDB1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=en4_bootip_server1)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DCDB1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
Start Date                25-JUL-2015 14:03:55
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      ON
Listener Parameter File   /u01/oracle/app/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/oracle/app/diag/tnslsnr/DCDB1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=en4_bootip_server1)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "cbsdb" has 1 instance(s).
  Instance "cbsdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> exit

Saturday, November 1, 2014

Set listener password in oracle database.

This is my listener 

SID_LIST_MYLISTENER=
  (SID_LIST=
(SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = D:\app\product\11.2.0\dbhome_1)
      (SID_NAME = ORCL)
    )
  )

MYLISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = N1020)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = D:\app

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


C:\Users\rajib.pradhan>lsnrctl

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 02-NOV-2014 10:45:29

Copyright (c) 1991, 2010, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.
LSNRCTL> change_password MYLISTENER
Old password:
New password:
Reenter new password:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Password changed for LISTENER
The command completed successfully
LSNRCTL> save_config MYLISTENER
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Saved MYLISTENER configuration parameters.
Listener Parameter File   D:\app\product\11.2.0\dbhome_1\network\admin\listener.ora
Old Parameter File   D:\app\product\11.2.0\dbhome_1\network\admin\listener.bak
The command completed successfully
LSNRCTL> status MYLISTENER
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     MYLISTENER
Version                   TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
Start Date                02-NOV-2014 10:51:24
Uptime                    0 days 0 hr. 2 min. 59 sec
Trace Level               off
Security                  ON: Password or Local OS Authentication
SNMP                      OFF
Listener Parameter File   D:\app\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File         d:\app\diag\tnslsnr\N1020\mylistener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=N1020)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> stop MYLISTENER
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully
LSNRCTL> start MYLISTENER
Starting tnslsnr: please wait...

TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
System parameter file is D:\app\product\11.2.0\dbhome_1\network\admin\listener.ora
Log messages written to d:\app\diag\tnslsnr\N1020\mylistener\alert\log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=N1020)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     MYLISTENER
Version                   TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
Start Date                02-NOV-2014 10:54:40
Uptime                    0 days 0 hr. 0 min. 5 sec
Trace Level               off
Security                  ON: Password or Local OS Authentication
SNMP                      OFF
Listener Parameter File   D:\app\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File         d:\app\diag\tnslsnr\N1020\mylistener\alert\log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=N1020)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
  Instance "ORCL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

LSNRCTL>

-- After set listener password listener.ora file will be change with new parameter PASSWORDS_MYLISTENER Like this --------

#----ADDED BY TNSLSNR 02-NOV-2014 10:53:38---
PASSWORDS_MYLISTENER = 95286B9DA1A6B8FE

#--------------------------------------------