Sponsored Content
Full Discussion: Tnsnames.ora
Top Forums Shell Programming and Scripting Tnsnames.ora Post 302894702 by elcaro on Wednesday 26th of March 2014 07:15:44 PM
Old 03-26-2014
Tnsnames.ora

Hi,

I would like to modify, in script schell, the line right above (DESCRIPTION and check three cases :

Code:
if line contain ".world" then line=line-".world" concat "," concat line
if line dont contain ".world" then line=line concat "," concat line concat".world"
else line=line

Keep in mind that there may or may not be spaces between the '(' and the word DESCRIPTION. So valid examples can be something like this:

Code:
PRI =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.3.7)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = pri)
      (INSTANCE_NAME = pri)
    )
  )

STDBY.world =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.3.5)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = stdby)
      (INSTANCE_NAME = stdby)
    )
  )


AIXSNAP.us.net =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.9.0.5)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = aixsnap)
      (INSTANCE_NAME = aixsnap)
    )
  )

only the lines PRI and STDBY.world can be modified as :
Code:
PRI,PRI.world=
and 
STDBY,STDBY.world=

Many thanks

Last edited by elcaro; 03-26-2014 at 09:15 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to capture the service name from tnsnames.ora and create connect string

ghkjkjoj (4 Replies)
Discussion started by: chetankelvin
4 Replies

2. Solaris

init.ora

what is the function of the init.ora file and suppose by mistake it gets deleted , what will be the consequences on the server (1 Reply)
Discussion started by: asalman.qazi
1 Replies

3. UNIX for Dummies Questions & Answers

find tnsnames.ora in unix

Can we find out what is the location of tnsnames.ora file used by the hp unix. (3 Replies)
Discussion started by: Sudipshib
3 Replies

4. Solaris

maxuprc and maxusers - ORA-27300, ORA-27301, ORA-27302

Hi all, Am intermittently getting the following errors on one of my databases. Errors in file /oracle/HRD/saptrace/background/hrd_psp0_13943.trc: ORA-27300: OS system dependent operation:fork failed with status: 12 ORA-27301: OS failure message: Not enough space ORA-27302:... (1 Reply)
Discussion started by: newbie_01
1 Replies

5. Shell Programming and Scripting

sed: parsing tnsnames.ora

All: Can sombodoy help me out with a sed command? Assume I have the following: PRI = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.3.7)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pri) ... (3 Replies)
Discussion started by: BeefStu
3 Replies

6. UNIX for Advanced & Expert Users

grep all ORA errors except one ORA error

Hi - I am trying to grep all "ORA" errors in a log files.I have to grep all ORA errors except one error for example ORA-01653.How can exclude that error in "grep" command? In following "grep" command I want to exclude "ORA-01653" error grep -i ORA alert.log >>/tmp/ora_errors.txt ... (7 Replies)
Discussion started by: Mansoor8810
7 Replies

7. Shell Programming and Scripting

Removing section from tnsnames.ora

Hi, I am trying to write a script or command to remove a section from tnsnames.ora file in the following example I would like to remove tns_alias2 section $ cat tnsnames.ora tns_alias1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = host1 )(PORT = 1521)) ... (3 Replies)
Discussion started by: ynixon
3 Replies

8. Shell Programming and Scripting

Tnanames.ora parser

Dears How can I use shell to parser this file? PRI = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.3.7)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.3.17)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) ... (6 Replies)
Discussion started by: eric0826
6 Replies

9. AIX

I cannot find dsn and TNSNAMES.ora on UNIX

Where can I find dsn and TNSNAMES.ora on UNIX AIX Thanks for contribution (3 Replies)
Discussion started by: digioleg54
3 Replies

10. Red Hat

Ora-27603:ora-27626:

Hi, User claim that job is running slow from their end. I DBA found in database the below errors in alert log file. ORA-27603: Cell storage I/O error, I/O failed on disk o/192.168.10.3/RECO_DM01_CD_01_drm01 at offset 13335789568 for data length 1048576 ORA-27626: Exadata error: 2201 (IO... (2 Replies)
Discussion started by: Maddy123
2 Replies
DIVALOAD(8)						    Linux System Administration 					       DIVALOAD(8)

NAME
divaload - configure Eicon Diva active ISDN card SYNOPSIS
divaload controller protocol [options] DESCRIPTION
divaload is used to setup the Eicon Diva card for the proper configuration. OPTIONS
controller selects the controller (card). This can be either: -c n where n is the controller number, or -all to operate on all cards. protocol can be one of the following: -f 1TR6 Germany, old protocol for PABX................ PRI & BRI -f ETSI DSS1, Europe (Germany, ...)................... PRI & BRI -f FRANC VN3, France, old protocol for PABX............ PRI & BRI -f BELG NET3, Belgien, old protocol for PABX.......... PRI & BRI -f SWED DSS1 with CRC4 off, Sweden, Benelux........... PRI -f NI NI1, NI2, North America, National ISDN........ PRI & BRI -f 5ESS 5ESS, North America, AT&T..................... PRI & BRI -f JAPAN Japan, INS-NET64.............................. PRI & BRI -f ATEL ATEL, Australia, old TPH1962.................. PRI & BRI -f US North America, Auto Detect.................... BRI -f ITALY DSS1, Italy................................... PRI & BRI -f TWAN DSS1, Taiwan.................................. PRI & BRI -f AUSTRAL Australia, Microlink (TPH1962), On Ramp ETSI.. PRI & BRI -f 4ESS_SDN 4ESS Software Defined Network................. PRI -f 4ESS_SDS 4ESS Switched Digital Service................. PRI -f 4ESS_LDS 4ESS Long Distance Service.................... PRI -f 4ESS_MGC 4ESS Megacom.................................. PRI -f 4ESS_MGI 4ESS Megacom International.................... PRI -f HONGKONG Hongkong...................................... PRI & BRI -f RBSCAS Robbed Bit Signaling, CAS..................... PRI -f QSIG QSIG, Intra PABX link protocol................ PRI & BRI The following options may be given to divaload. -e [1,2,3] set Layer 1 framing on PRI Adapter 1 - doubleframing (NO CRC4) 2 - multiframing (CRC4) 3 - autodetection -x set PRI Adapter in NT mode; default mode is TE -z set PRI Adapter in High Impedance state until first user application does request interface activation -l [1...30] set starting channel number on PRI Adapter. By default the allocation of channels is made on a high-to-low basis. By specifying -l you select a low-to-high allocation policy (in addition) -q [0..3] select QSIG options 0 - CR and CHI 2 Bytes long (default) 1 - CR 1 byte, CHI 2 bytes 2 - CR is 2 bytes, CHI is 1 byte 3 - CR and CHI 1 byte (CR - Call Reference, CHI - B-Channel Ident.) -n [0...20] select NT2 mode and default length of DIDN (DIDN - Direct Inward Dial Number) -o turn off order checking of information elements -p [1,2] establish a permanent connection (e.g. leased line configuration) 1 - TE <-> TE mode, structured line 2 - NT <-> TE mode, raw line -s [0,1,2,3] D-Channel Layer 2 activation policy on BRI Adapter 0 - On demand 1 - Deactivation only by NT side, preferred, default 2 - Always active 3 - Always active, mode 2 -t [0...63] specifies a fixed TEI value (Default is a automatic TEI assignment) -u select point to point mode on BRI Adapter; uses default TEI '0', NT2 mode is on -[1...8]oad|osa|spid BRI Adapter B-Channel options Specify the Originating Address (OAD), Originating Sub-address (OSA) and/or Service Profile Identifier (SPID) for each B-channel (1 or 2 by BRI, 1...8 by 4BRI) Example: -1oad 123456 -1spid 1234560001 -d display protocol options summary -w select alternative protocol code directory. default directory: "/usr/share/isdn" -h or -? help AUTHOR
manpage written from -h output by Paul Slootman <paul@debian.org>. divaload 2000/12/02 DIVALOAD(8)
All times are GMT -4. The time now is 09:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy