[Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 830
  • Last Modified:

Oracle listener

I have created database manually oracle 11g on windows vista. Now I have to create listener and tnsnames. Ora
  • 4
  • 3
  • 2
  • +3
1 Solution
invoke your net manager and net config assisstant to create a listener and then create a service;

after you create the service you will have a tnsnames and you can copy the entry in thetnsnames to your client.
HainKurtSr. System AnalystCommented:
so whats the problem you are facing right now?
when you create a db most of the settings (if not all) created automatically...

check ORAHOME\server\NETWORK\ADMIN for tnsnames.ora and sqlnet.ora and listener.ora files for settings...

there should be a utility like NET COFIG, LISTENER CONFIG (or admin or manger) run those utilities to test your settings...
hussainkhan22Author Commented:
I have copied listener.ora, tnsnames.ora from my other database and now i would like to activate this listener and tnsnames on the fresh database which is created manually
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Khalid Mehmood AwanCommented:
run "netca" in your RUN dialog box.

Network Configuration Assistant.

slightwv (䄆 Netminder) Commented:
Since you've wanted to do everything else from the command line I'm guessing you want to do this from the command line as well and not use the netca GUI.

It's been a while since I've tried this and I don't have access to a test box right now but I think just running 'lsnrctl start' from the command line will create the Windows service for you if it does not exist.
hussainkhan22Author Commented:
Ok so you mean run listener start from command prompt will start listener and what about tnsnames
slightwv (䄆 Netminder) Commented:
You don't 'activate' the tnsnames.ora file.  Whenever a 'client' requests a connection, Oracle knows where this file is and will use it.
since you copied the listener.ora from other database I think you have to edit it and correct the host name, ORALCE_HOME and SID. once these parameters are correct, go to command prompt and type
lsnrctl start <listener name>
<listener name> is the named you mentioned in listener.ora file. if it is other than LISTENER then you have to mention other wise no need. if listener name is LISTENER then just type
c:\>  lsnrctl start
1-when you invoke net manger and net config assistant;
you just invoke the java interface that creates the:
1- listener (only on the server side) which will create you a listener (service in windows )and the listener.ora which is the file (as a parameter file the oracle sqlnet engine uses do not confuse it with the database parameter file)
this listener.ora will reside in oracle_home/network/admin
it will have info like the listener name ,hostname or IP.and the port number.
AGAIN this file/service/sqlnet module is only needed on the server side.
that if you copy the listener .ora from one server to another considering the same destination it should map and appear on your oracle jave module net manger and net config assistant; IN THEORY
but the fact that you need to create a service a dos SC service and another bug in 11g that makes most of changes manually entered to net manger and net config assistant are not automatically registered in
net manger and net config assistant; in WINDOWS ;
left you with one choice DO NOT COPY listener.ora create it:
1-craete it from Dos using the lsnrctl binary

The following operations are available
An asterisk (*) denotes a modifier or extended command:

start  - stop  - status
services -version -reload
save_config-trace  -change_password
quit -exit -set*

NOTE that start = create

2- create it from net manger and net config assistant (much better)
amke sure to tie your l;stener to your oracle home and your sid name.
the service Via net manager /service naming/use the green button to creat a new service.

this will create you a tnsnames file locally on server
slightwv (䄆 Netminder) Commented:
>>you just invoke the java interface that creates the

Based on the asker's previous questions they do not want to use GUIs.
thanks for your comment;I have actually noticed that;
the reason why I have given this comment is to give an overall view about the whole module.
also when Hussain mentioened that he will copy the listener.ora.

usually sqlnet setup will never finish as  100% manual process .

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 4
  • 3
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now