Sponsored Content
Full Discussion: Modifying listener file
Top Forums Shell Programming and Scripting Modifying listener file Post 302977187 by humble_learner on Wednesday 13th of July 2016 05:29:40 PM
Old 07-13-2016
Modifying listener file

Hi Pros,

I'm writing a script to modify listener.ora file on multiple hosts. When I ssh to any server from a central server in our environment we are presented with menu to select the instance. I need to set my environment to listener which could be different number on every instance. How can I do this without having to do any complicated work?

Code:
oracle@11204_home> ssh testHost
Last login: Wed Jul 13 15:11:09 2016 from centralHost.whatever
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
        1)   agent12c    @testHost      agent
        2)   listener    @testHost      11.2.0.4
        3)   testdb1     @testHost      11.2.0.4
        4)   testdb02    @testHost      11.2.0
        5)   testdb03    @testHost      11.2.0.4
        6)   testdb04    @testHost      10.2.0

Which instance do you want to use? [1]


So far this is my script and having hard time to set the environment to listener. Also we do not have expect utility installed on any server. The ORATAB file does contain all the homes.

This script is now being developed to test one server only, once this is successful I will add the list of hosts.

Code:
#!/usr/bin/ksh
export host="testHost"
echo "HOST= "${host}
ssh -o CheckHostIP=no -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${host} <<EOF
"How do I set my environment to listener always on any host?"
EOF

Any help is appreciated



Moderator's Comments:
Mod Comment Please use code tags for data and output as well!

Last edited by RudiC; 07-14-2016 at 04:19 AM.. Reason: Added some code tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get the listener port from its configuration file?

Hi folks, I'm trying to get the listener port from its configuration file (tnsnames.ora) using sed ,and I encounter difficulties. tnsnames.ora : DB10g = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = buffy)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) ... (3 Replies)
Discussion started by: nir_s
3 Replies

2. Shell Programming and Scripting

can someone help me with modifying this file

Hi, I have a file which has data kind of like this. Apr 13 08:20:38 uslis10a sendmail: m3DDKSx3006432: usliss26.ca.com Apr 13 08:20:38 uslis10b sendmail: m3DDKSoK006433: usliss26.ca.com Apr 13 08:20:38 uslis10b sendmail: m3DDKcSo006442: usliss26.ca.com Apr 13 08:20:38 uslis10c... (2 Replies)
Discussion started by: eamani_sun
2 Replies

3. Shell Programming and Scripting

Modifying file from outside

hi , I have a javascript file like this: function fnValidateId(){ var array_id = new Array("444","7888","6633","555","146562","3333","33332") var tmp_id = document.form1.id.value; var num=0; while(1) { if(tmp_id ==... (9 Replies)
Discussion started by: Sreejith_VK
9 Replies

4. UNIX for Dummies Questions & Answers

Modifying a .ksh file

Hi, i have created a simple .ksh file in the following manner cat <<EOF >mfile #!/bin/ksh echo "hello world" EOF I have 2 questions 1. now i would like to add a second line after the first echo command e.g. echo "this is line 2" how can i do that ? 2. I would then like... (1 Reply)
Discussion started by: corbusier
1 Replies

5. Shell Programming and Scripting

modifying file using script

Hi, I am new to shell programming, and want to know is it possible to change the contents of file using script? for example, if want to search 2 words and want to replace these words with 2 new words. Regards, Manoj (4 Replies)
Discussion started by: manoj.solaris
4 Replies

6. UNIX for Dummies Questions & Answers

Modifying a file using SED

Dear Members, I have a file which contains data as shown below: LOAD DATA APPEND INTO TABLE xxap.test ( RAW_DATA char(3000) "replace(:raw_data,'*','|')", LOADING_SEQUENCE "xx_gl_bank_fee_s1.nextval", CREATION_DATE SYSDATE, LAST_UPDATE_DATE SYSDATE, ATTRIBUTE1 "DATE_STAMP", ... (1 Reply)
Discussion started by: sandeep_1105
1 Replies

7. Shell Programming and Scripting

Modifying a file?

Hi, I want to convert a file that looks like this >joe XXXXXXXXXXXXXXXXXXX >man BBBBBBBBBBBBBBBBBBBBBSSSSSSSS to something that looks like this (where the spacing is tab seperated) joe XXXXXXXXXXXXXXXXXXX man BBBBBBBBBBBBBBBBBBBBBSSSSSSSS I am able to do the reverse but the other... (3 Replies)
Discussion started by: kylle345
3 Replies

8. Infrastructure Monitoring

modifying existing file using C

Hi all, I have a snmpd.conf file as below. in "SECTION: Trap Destinations" line I want to add "trap2dest <IP>:162 <com_str>" on a new line. For this I wrote following code #include <stdio.h> #include <stdlib.h> int main(void) { FILE *fp; ssize_t read_char_count = 0; ... (2 Replies)
Discussion started by: zing_foru
2 Replies

9. Shell Programming and Scripting

Modifying file to 75 characters

I have a text file containing some notes and I want to limit the lines to 75 characters. Tried using fold, however fold will cut words. Need something in bash, sed or awk to do this. Find the blank space less than 75 ant cut from there (10 Replies)
Discussion started by: kristinu
10 Replies

10. Shell Programming and Scripting

Modifying the header in a flat file

Hi, I need to modify the header of the flat file, can you provide me the code example: Temp.txt header: list_col1|list_col2|list_col3 data: 1|2|3 in the above header should be modified in the prescribed format(is available with me) Header: List_Col1|List_Col2|List_Col3 A... (4 Replies)
Discussion started by: srikanth_sagi
4 Replies
asadmin-create-iiop-listener(1AS)				   User Commands				 asadmin-create-iiop-listener(1AS)

NAME
asadmin-create-iiop-listener, create-iiop-listener - adds the IIOP listener SYNOPSIS
create-iiop-listener --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=true] --listeneraddress address [--iiopport iiop_port] [--enabled=true] [--property (name=value)[:name=value]*] listener_ID Adds the IIOP listener. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. --listeneraddress can be the IP address or the hostname --iiopport IIOP port number. --enabled determines whether the IIOP listener is enabled at runtime. --property optional attribute name/value pairs for configuring the resource. OPERANDS
listener_id unique identifier for the IIOP listener to be created. Example 1: Using create-iiop-listener asadmin> create-iiop-listener --user admin --password adminadmin --host fuyako --port 7070 --listeneraddress 192.168.1.100 --iiopport 8080 sample_iiop_listener Created IIOP listener with id = sample_iiop_listener Where: sample_iiop_listener is the IIOP listener created. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-delete-iiop-listener(1AS), asadmin-list-iiop-listeners(1AS) J2EE 1.4 SDK March 2004 asadmin-create-iiop-listener(1AS)
All times are GMT -4. The time now is 11:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy