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

x
  • 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
0
hussainkhan22
Asked:
hussainkhan22
  • 4
  • 3
  • 2
  • +3
1 Solution
 
it-rexCommented:
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.
0
 
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...
like
C:\Oracle\OracleXE\app\oracle\product\10.2.0\server\NETWORK\ADMIN

there should be a utility like NET COFIG, LISTENER CONFIG (or admin or manger) run those utilities to test your settings...
0
 
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
0
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.

0
 
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.
0
 
hussainkhan22Author Commented:
Ok so you mean run listener start from command prompt will start listener and what about tnsnames
0
 
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.
0
 
FayyazCommented:
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
0
 
it-rexCommented:
hussain
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.
Note:
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

LSNRCTL> help
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*
show*

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
WHICH YOU WILL NEED TO DISTRIBUTE TO CLIENTS ACCESSING THIS SERVER
0
 
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.
0
 
it-rexCommented:
@slightwv
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 .
0

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