Visit Counter

Wednesday, January 29, 2014

ORA-12514: TNS:listener does not currently know of service


I tnsping standby database from primary,it works but when i try to connect to standby from primary as:


[oracle@rac1 bin]$ tnsping orastd

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 29-DEC-2010 21:50:08

Copyright (c) 1997, 2009, Oracle.  All rights reserved.d
Used parameter files:
/ora/oracle/ora11g/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.0.0.24)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orastd)))
OK (0 msec)


When I connect to standby database using SQL getting the error.

SQL> connect sys/password@orastd as sysdba

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


Solution:

Looks like your standby DB instance is not register with the listener.

You have to register db using NETMGR or edit listener.ora file.









$ cat listener.ora


















 LSNRCTL>  status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.0.0.23)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                30-JAN-2014 00:57:33
Uptime                    0 days 1 hr. 46 min. 36 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /ora/oracle/ora11g/network/admin/listener.ora
Listener Log File         /ora/oracle/ora11g/base/diag/tnslsnr/rac2/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.0.0.23)(PORT=1521)))
Services Summary...
Service "orastd" has 1 instance(s).
  Instance "orastd", status UNKNOWN, has 1 handler(s) for this service...
Service "orarpri" has 1 instance(s).
  Instance "orapri", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully
LSNRCTL>             





Wednesday, January 22, 2014

ORA-12543: TNS:destination host unreachable



[oracle@rac2 bin]$tnsping orapri
TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 30-Nov-2012 01:52:34
Copyright (c) 1997, 2009, Oracle.  All rights reserved.
Used parameter files:
/ora/oracle/ora11g/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.0.0.24)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orapri)))

TNS-12543: TNS:destination host unreachable

Diagnosis process:

-------------------

If you are unfamiliar with the error use the oerr utility to get the more information on this error.

oracle@rac2 $ oerr ora 12543

12543, 00000, "TNS:destination host unreachable"

*Cause: Contact can not be made with remote party.

*Action: Make sur the network driver is functioning and the network is up.


Solution:
---------
Reason : Firewall was enabled on Primary and Standby servers.
-----------------------------------------------------------------

I disabled the Fire wall from primary and standby servers.You can disable firewall by GUI and command line as well.

root@rac1 # service iptables status
                     service iptables stop
                     chkconfig iptables off


Linux Error 111: Connection refused



[oracle@rac2 bin]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-JAN-2012 01:51:56

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

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> start
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=rac2)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused


Solution:
-------------

The hosts file does not contain the correct address or name for the server. This can also occur if the loopback address is not present. Edit /etc/hosts and verify that the host name and address are correct. Also verify that 127.0.0.1 localhost.localdoman localhost are present.


# /etc/hosts

LSNRCTL> start
Starting /ora/oracle/ora11g/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /ora/oracle/ora11g/network/admin/listener.ora
Log messages written to /ora/oracle/ora11g/base/diag/tnslsnr/rac2/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac2)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                23-JAN-2012 01:52:04
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /ora/oracle/ora11g/network/admin/listener.ora
Listener Log File         /ora/oracle/ora11g/base/diag/tnslsnr/rac2/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac2)(PORT=1521)))
The listener supports no services
The command completed successfully


Tuesday, January 14, 2014

Enterprise Manager Cloud Control 12103 repository creation failure


While Installing Oracle 12c EM Cloud Control getting error.















Solution:


Oracle 12.1.0.1 Database not yet certified for the Oracle 12c OEM respository.

You can use one of the below certified databases as repository for 12c OEM.


11.1.0.7.0
11.2.0.1.0
11.2.0.2.0
11.2.0.3.0
11.2.0.4.0
10.2.0.5.0

Monday, January 13, 2014

Oracle 12c Enterprise Manager Cloud Control Installation on Oracle Linux 6


Download Software 
--------------------

http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/index.html?ssSourceSiteId=ocomen

Check the HOST NAME in hosts file.

# /etc/hosts

 192.0.0.24    rac1 

# /etc/sysconfig/network

HOSTNAME: rac1


Installed Oracle Database 11g


Cloud Control 12c Installation
---------------------------------------------------

Make the following directories to hold the management server and agent.


$mkdir -p /ora/oracle/middle
$mkdir -p /ora/oracle/agent



Unzip the Cloud Control media, the start the installation by running the "runInstller" script.

$ mkdir /ora/oracle/em12c

$ unzip -d /ora/oracle/em12c em12cr2_linux64_disk1.zip
$ unzip -d /ora/oracle/em12c em12cr2_linux64_disk2.zip
$ unzip -d /ora/oracle/em12c em12cr2_linux64_disk3.zip

$ ./runInstaller







































(https://rac1:7803/em). Log in with the username "sysman" and the password you specified during your installation.






 













"License Agreement" screen. Click the "I Agree" button and you are presented with 
the homepage selector  screen. Select the desired homepage (I chose Summary)
and click the "Preview" button.





# !/bin/bash

export ORACLE_HOME=/ora/oracle/ora11g
export OMS_HOME=/ora/oracle/middle/oms
export AGENT_HOME=/ora/oracle/middleware/agent/core/12.1.0.1.0


Starting Everything:
--------------------

$ OMS_HOME/bin/emctl start oms -all

$ AGENT_HOME=/bin/emctl start agent

$ ORACLE_HOME/bin/dbstart  $ORACLE_HOME


Stopped Everything:
--------------------

$ OMS_HOME/bin/emctl stop oms -all

$ AGENT_HOME=/bin/emctl stop agent

$ ORACLE_HOME/bin/dbshut $ORACLE_HOME







Sunday, January 12, 2014

ORA-01034: ORACLE not available & ORA-00838: Specified value of MEMORY_TARG




bash-4.1$ ./sqlplus /nolog

SQL*Plus: Release 12.1.0.1.0 Production on Sat Nov  02 18:53:58 2013

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

SQL> conn / as sysdba
Connected.
SQL> alter system set sga_target=2G scope=SPFILE;

System altered.

SQL> ALTER SYSTEM SET session_cached_cursors=200 scope=spfile;

System altered.

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

System altered.

SQL> alter system set shared_pool_size=600m scope=spfile;

System altered.

SQL> alter system set pga_aggregate_target=1g scope=spfile;

System altered.

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

System altered.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup
ORA-00838: Specified value of MEMORY_TARGET is too small, needs to be at least 3072M

SQL> create pfile from spfile;

File created.

Change the value of MEMORY_TARGET parameter.

$ vi /ora/oracle/dbs/initcdb1.ora

MEMORY_TARGET=0



bash-4.1$ ./sqlplus /nolog

SQL*Plus: Release 12.1.0.1.0 Production on Sat Nov  02 19:53:58 2013

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

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup pfile='/ora/oracle/dbs/initcdb1.ora';
ORACLE instance started.

Total System Global Area 2137886720 bytes
Fixed Size    2290416 bytes
Variable Size  805309712 bytes
Database Buffers 1325400064 bytes
Redo Buffers    4886528 bytes
Database mounted.
Database opened.




Wednesday, January 8, 2014

Connect to a PDB using Oracle EM Express


Configuring the HTTPS Port for EM Database Express 12c


bash-4.1$ ./sqlplus /nolog

SQL*Plus: Release 12.1.0.1.0 Production on Thu Sep 5 22:28:38 2013

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



SQL> conn / as sysdba
Connected.

SQL> select dbms_xdb_config.gethttpsport() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
---------------------------------------------------------------


SQL> exec dbms_xdb_config.sethttpsport(5501);

PL/SQL procedure successfully completed.


SQL> select dbms_xdb_config.gethttpsport from dual;

GETHTTPSPORT
--------------------------
5501






































Sunday, January 5, 2014

PRVF-0002 : Could not retrieve local nodename



Installing Oracle 12c database getting below error.


















Cause: Unable to determine local host name using Java network functions. 
Action: Ensure hostname is defined correctly using the 'hostname' command.




 # hostname

ora12c.localdomain

Add the hostname into /etc/hosts

# vi /etc/hosts

192.0.0.25   ora12c.localdomain