Was running the command : emca -config dbcontrol db -repos create
with below configuration:-
Database ORACLE_HOME ................ /usr/oracle/app/oracle/product/11.2.0/dbhome_1
Local hostname ................ mydb.grp.local
Listener ORACLE_HOME ................ /usr/oracle/app/oracle/product/11.2.0/dbhome_1
Listener port number ................ 1521
Database SID ................ mydb
And getting below error in emca log file:-
Caused by: oracle.sysman.emdrep.config.ConfigurationException: Cannot Create Connection:(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=mydb.grp.local)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=mydb.grp.local)))
SYSMAN
normal
ORA-00604: error occurred at recursive SQL level 1
ORA-20999: DB Access Restricted
ORA-06512: at line 60
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-20999: DB Access Restricted
ORA-06512: at line 60
In the above logfile, why the SERVICE_NAME is taking my hostname , even after I mentioned my SID: mydb during the repository creation ?
Please find other configuration files details:-
--------------------------------------------------------------------
/etc/hosts file:-
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
129.1.1.6 mydb.grp.local mydb
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
--------------------------------------------------------------------
lsnrctl status :-
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
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=mydb.grp.local)(PORT=1521)))
Services Summary...
Service "mydb" has 1 instance(s).
Instance "mydb", status UNKNOWN, has 1 handler(s) for this service...
Service "mydb.grp.local" has 1 instance(s).
Instance "mydb", status READY, has 1 handler(s) for this service...
The command completed successfully
-------------------------------------------------------------------------------
listener.ora file:-
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = mydb.grp.local)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /usr/oracle/app/oracle
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = mydb)
(ORACLE_HOME = /usr/oracle/app/oracle/product/11.2.0/dbhome_1)
)
)
---------------------------------------------------------------------------------
tnsnames.ora file:-
MYDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = mydb.grp.local)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mydb)
)
)
----------------------------------------------------------------------------------
sqlnet.ora file:-
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
ADR_BASE = /usr/oracle/app/oracle