Wednesday, July 23, 2014

ORA-16826: apply service state is inconsistent with the DelayMins property

 ORA-16826: apply service state is inconsistent with the DelayMins property


 Cause:
This warning was caused by one of the following reasons:
Re enable the standby database to allow the broker to restart the apply service with the apply options that are consistent with the specified value of the DelayMins property.



1. Apply service was started without specifying the real time apply option or without the NODELAY option while DelayMins is zero.

2. Apply service was started with the real-time apply option or with the NODELAY option while DelayMins is greater than zero.

Action:-



DGMGRL> show database orcl

Database - orcl
  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds
  Apply Lag:       0 seconds
  Real Time Query: OFF
  Instance(s):    orcl

  Database Warning(s):
    ORA-16826: apply service state is inconsistent with the DelayMins property

Database Status:
WARNING

DGMGRL> show database orcl

Database - orcl

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds
  Apply Lag:       0 seconds
  Real Time Query: OFF
  Instance(s):    orcl

Database Status:
SUCCESS
  
You have to run the following command on standby  to fix this warning.

SQL> alter database recover managed standby database cancel;

Database altered.

SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

All the best...:)

ORA-12514: TNS: listener does not currently know of service requested in connect descriptor Failed

"Warning: You are no longer connected to ORACLE" while converting database using DGMGRL.

Converting the Primary database into physical standby using Data Guard Broker, the following warning messages were generated:
Unable to connect to database

ORA-12514: TNS: listener does not currently know of service requested in connect descriptor
Failed. Warning: You are no longer connected to ORACLE.
Please complete the following steps and reissue the CONVERT command:


start up and mount instance "stdb" of database "stdb


[oracle@localhost ~]$ dgmgrl

DGMGRL for Linux: Version 11.2.0.1.0 - Production

 Copyright (c) 2000, 2009, Oracle. All rights reserved.
 Welcome to DGMGRL, type "help" for information.

DGMGRL> connect sys
Password:
Connected.

DGMGRL> show configuration
Configuration - DG_orcl
  Protection Mode: MaxPerformance
  Databases:
    stdb - Primary database
   orcl - Physical standby database

Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

Check the value of StaticConnectIdentifier property for stby database:-

DGMGRL> show database 'stdb' 'StaticConnectIdentifier';
  StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=stdb_DGMGRL)(INSTANCE_NAME=stdb)(SERVER=DEDICATED)))'

NOTE: - change service_name property with your Global database name.
           Below line is a single line.

DGMGRL> edit database 'stdb' set property ‘StaticConnectIdentifier'='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=stdb)(INSTANCE_NAME=stdb)(SERVER=DEDICATED)))';
Property "StaticConnectIdentifier" updated

Show the current value for StaticConnectIdentifier property:-

DGMGRL> show database 'stdb' 'StaticConnectIdentifier';
  StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=stdb)(INSTANCE_NAME=stdb)(SERVER=DEDICATED)))'

DGMGRL> show configuration

Configuration - DG_orcl
  Protection Mode: MaxPerformance
  Databases:
    stdb - Primary database
    orcl - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

Now starts conversion:-

DGMGRL> switchover to orcl;

Performing switchover NOW, please wait...
New primary database "orcl" is opening...
Operation requires shutdown of instance "stdb" on database "stdb"
Shutting down instance "stdb"...
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "stdb" on database "stdb"
Starting instance "stdb"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "orcl"


DGMGRL> show configuration

  Configuration - DG_orcl
  Protection Mode: MaxPerformance
  Databases:
    orcl - Primary database
    stdb - Physical standby database

Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

NOTE: - before switchover to standby database check that sequence numbers are same both the side.

DGMGRL> switchover to stdb

Performing switchover NOW, please wait...
New primary database "stdb" is opening...
Operation requires shutdown of instance "orcl" on database "orcl"
Shutting down instance "orcl"...
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance "orcl" on database "orcl"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "stdb"
DGMGRL>



My problem resolved with this post. try it and  give your suggestion for this if you feel that i need to add something else in this which i missed.....

All the best...:)

Tuesday, July 15, 2014

ORA-00020 maximum number of processes exceeded

ORA-00020 maximum number of processes exceeded
Cause: All process state objects are in use.
Action: Increase the value of the PROCESSES initialization parameter.

ORA-00020 comes under "Oracle Database Server Messages". These messages are generated by the Oracle database server when running any Oracle program.

Reference: Oracle Documentation

How to increase PROCESSES initialization parameter:
1.    Login sqlplus
       sys as sysdba

NOTE:- if you are not able to connect with sys as sysdba then you need to stop the listener and then try and after connecting then start the listener or manuly kill find the process and kill them then try ....       

2. Check Current Setting of Parameters


sql> show parameter sessions
sql> show parameter processes
sql> show parameter transactions

3.    If you are planning to increase "PROCESSES" parameter you should also plan to increase "sessions and "transactions" parameters     A basic formula for determining these parameter values is as follows:


  processes=x     
 sessions=x*1.1+5    
 transactions=sessions*1.1     

4.    These parameters can't be modified in memory. You have to modify the spfile only (scope=spfile) and bounce the instance.
sql> alter system set processes=500 scope=spfile;
sql> alter system set sessions=555 scope=spfile;
sql> alter system set transactions=610 scope=spfile;
 sql> shutdown abort 
sql> startup

All The best.....:)

Sunday, July 13, 2014

An unexpected error has been detected by HotSpot Virtual Machine

"An unexpected error has been detected by HotSpot Virtual Machine" Error While Launching Installer
Today while installing Oracle 11gR2 (11.2.0.1.0) 64-bit on RHEL 6.1 64-bit on a VMWare box, I received the mentioned error.. However, this seems to be an RHEL bug. 





The workaround to the problem is to set "LD_BIND_NOW" environment variable to a value "1" as shown below and re-launch the installer. 

[oracle@redhat1]$ export LD_BIND_NOW=1
[oracle@redhat1]$ ./runInstaller 
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB.   Actual 1054 MB    PassedChecking swap space: must be greater than 150 MB.   Actual 1999 MB    PassedChecking monitor: must be configured to display at least 256 colors.    Actual 16777216    PassedPreparing to launch Oracle Universal Installer from /tmp/OraInstall2014-07-13_03-29-40PM. Please wait ...[oracle@redhat1]$ 



The installer will run normally....

All The Best.....:)


Thursday, July 3, 2014

Enterprise Manager : Failed To Allocate Port (error At End Of Installation) , ORA-00119 ,ORA-00130 and enterprise manager configuration failed due to the following error - null


 1. I am running DBCA and I am getting this ORA-00119 error:



Need to change the hostname to localhost.localdomain
 $  hostname localhost.localdomain
Check service iptables status if runing then stop
then stop the iptables
server iptables stop
----------------------------------------------


2. Enterprise manager configuration failed due to the following error





check  these parameter in the respective config files  and try again:

vi /etc/sysctl.conf
kernel.shmall = 268435456
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
NET.CORE.WMEM_MAX = 1048586

vi /etc/security/limits.conf
# End of file
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  4096
oracle              hard    nofile  65536
oracle              soft    stack   10240


Check the ip of the server:
$ifconfig
192.168.204.128
Check the hostname:
$hostname
localhost.example.com
$vi /etc/hosts
192.168.204.128 localhost.example.com

then reboot the server:
check again iptables that are running or not if running then stop

$ service iptables status
$ service iptables stop


3.  enterprise manager configuration failed due to the following error - null 




Login with the root user:
Check the ip of the server:
$ifconfig
192.168.204.128
Check the hostname:
$hostname
localhost.example.com
$vi /etc/hosts
192.168.204.128 localhost.example.com


Try these. it will help you.
i have tried these...... and give your suggestion if any other way to resolve these issues... and  these step are useful to resolve these problem or not. Kindly  let me know.... 

All The Best....:)


Sunday, October 20, 2013

java.sql.SQLException: Got minus one from a read call


If you get this error: pls check the alerts.log file.
.sql.SQLException: Got minus one from a read call


commisionTxnIdnull, levelOneApprovedQuantity=null, levelTwoApprovedQuantity=null, levelThreeApprovedQuantity=null, pybleAmt=0.0, _ntpybleAmt=0.0, _pyinsAmt=0.0, _refTransferIDnull
2013-10-21 10:28:40,075 : 2329 [main] DEBUG com.btsl.db.pool.OJDBCPoolManager  - createPool :: Creating oracle connection pool
2013-10-21 10:28:40,076 : 2330 [main] DEBUG com.btsl.db.pool.OJDBCPoolManager  - createPool 10G :: userid=neeraj1, db password=neeraj1, db_url=jdbc:oracle:thin:@172.23.23.47:1522:orcl, minPoolSize=100 max poolSize=150 oraclePoolLogFile=null
java.sql.SQLException: Got minus one from a read call
        at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
        at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:197)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:525)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:413)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:203)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:33)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
        at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:275)
        at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:206)
        at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:139)
        at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:88)
        at oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(OracleImplicitConnectionCache.java:1567)
        at oracle.jdbc.pool.OracleImplicitConnectionCache.makeOneConnection(OracleImplicitConnectionCache.java:499)
        at oracle.jdbc.pool.OracleImplicitConnectionCache.defaultUserPrePopulateCache(OracleImplicitConnectionCache.java:218)
        at oracle.jdbc.pool.OracleImplicitConnectionCache.<init>(OracleImplicitConnectionCache.java:194)
        at oracle.jdbc.pool.OracleConnectionCacheManager.createCache(OracleConnectionCacheManager.java:269)
        at com.btsl.db.pool.OJDBCPoolManager.createPool(OJDBCPoolManager.java:270)
        at com.btsl.db.pool.OJDBCPoolManager.getConnection(OJDBCPoolManager.java:67)
        at com.btsl.util.OracleUtil.getConnection(OracleUtil.java:113)
        at com.btsl.common.IDGenerator.getNextID(IDGenerator.java:81)
        at com.btsl.pretups.channel.transfer.businesslogic.ChannelTransferBL.genrateTransferID(ChannelTransferBL.java:129)
        at com.btsl.pretups.processes.ActivationBonusRedemption.process(ActivationBonusRedemption.java:291)
        at com.btsl.pretups.processes.ActivationBonusRedemption.main(ActivationBonusRedemption.java:119)
Caused by: oracle.net.ns.NetException: Got minus one from a read call
        at oracle.net.ns.Packet.receive(Packet.java:243)
        at oracle.net.ns.NSProtocol.connect(NSProtocol.java:259)
        at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:966)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:292)
        ... 20 more


com.btsl.common.BaseException
        at com.btsl.db.pool.OJDBCPoolManager.getConnection(OJDBCPoolManager.java:68)
        at com.btsl.util.OracleUtil.getConnection(OracleUtil.java:113)
        at com.btsl.common.IDGenerator.getNextID(IDGenerator.java:81)
        at com.btsl.pretups.channel.transfer.businesslogic.ChannelTransferBL.genrateTransferID(ChannelTransferBL.java:129)
        at com.btsl.pretups.processes.ActivationBonusRedemption.process(ActivationBonusRedemption.java:291)
        at com.btsl.pretups.processes.ActivationBonusRedemption.main(ActivationBonusRedemption.java:119)
2013-10-21 10:28:42,649 : 4903 [main] ERROR com.btsl.pretups.channel.transfer.businesslogic.ChannelTransferBL  - genrateTransferID :: Exception 00000
class=null,method=null,message=00000,date=nullerrorCode=0
        at com.btsl.db.pool.OJDBCPoolManager.getConnection(OJDBCPoolManager.java:143)
        at com.btsl.util.OracleUtil.getConnection(OracleUtil.java:113)
        at com.btsl.common.IDGenerator.getNextID(IDGenerator.java:81)
        at com.btsl.pretups.channel.transfer.businesslogic.ChannelTransferBL.genrateTransferID(ChannelTransferBL.java:129)
        at com.btsl.pretups.processes.ActivationBonusRedemption.process(ActivationBonusRedemption.java:291)
        at com.btsl.pretups.processes.ActivationBonusRedemption.main(ActivationBonusRedemption.java:119)
2013-10-21 10:28:42,650 : 4904 [main] DEBUG com.btsl.pretups.channel.transfer.businesslogic.ChannelTransferBL  - genrateTransferID :: Exited  ID =null
class=ChannelTransferBL,method=genrateTransferID,message=9007,date=2013-10-21errorCode=0
        at com.btsl.pretups.channel.transfer.businesslogic.ChannelTransferBL.genrateTransferID(ChannelTransferBL.java:139)
        at com.btsl.pretups.processes.ActivationBonusRedemption.process(ActivationBonusRedemption.java:291)
        at com.btsl.pretups.processes.ActivationBonusRedemption.main(ActivationBonusRedemption.java:119)
class=ChannelTransferBL,method=genrateTransferID,message=9007,date=2013-10-21errorCode=0
        at com.btsl.pretups.channel.transfer.businesslogic.ChannelTransferBL.genrateTransferID(ChannelTransferBL.java:139)
        at com.btsl.pretups.processes.ActivationBonusRedemption.process(ActivationBonusRedemption.java:291)

        at com.btsl.pretups.processes.ActivationBonusRedemption.main(ActivationBonusRedemption.java:119)
-----------------------After checking  the alerts.log file  you will get this error the do the following--


Mon Oct 21 10:20:26 2013
ORA-00020: maximum number of processes (200) 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.
-- need to increase the processes by running this command ---

alter system set processes=500 scope=spfile;
shutdown immediate
startup



Enjoy this....:-) 

Sunday, July 28, 2013

ORA-16032: parameter LOG_ARCHIVE_DEST destination string cannot be translated

[oracle11@db01 ~]$ export ORACLE_SID=orcl

[oracle11@db01 ~]$ sqlplus
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jul 29 10:12:44 2013

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

Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.

SQL> startup
ORA-16032: parameter LOG_ARCHIVE_DEST destination string cannot be translated
ORA-07286: sksagdi: cannot obtain device information.
Linux Error: 2: No such file or directory

SQL> create pfile='/data01/orcl.ora' from spfile;

File created.

open the pfile and check this parameter and check the path that path is available or not if not then you have to create the folder same as you set  the path in the parameter. and startup the db.


*.log_archive_dest='/data/oracle11_backup/archive'


All The Best.........:)