Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Get the tnsnames.ora alias for a given service name Post 303046176 by kpg on Monday 27th of April 2020 03:50:10 AM
Old 04-27-2020
Hi,
thanks for the awk --- I do not understand how it should work and I get an error I can not correct:

Code:
awk: cmd. line:4: error: Unmatched ( or \(: /^(/

And I'd like to search for a service name that contains 'pri'. Can you please explain?



I played around with sed:
Code:
sed -n '/DESCR/{x;p;d;}; x'

returns all lefthand sides of the tnsnames.ora....if only I could add something to match the DESCRIPTION with a service name matching 'pri'
 

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. UNIX for Dummies Questions & Answers

ORA-12154: TNS:could not resolve service name

Hi everyone, when i run ; sqlplus -s username/password@TTTEST @umt.sql i take "ORA-12154: TNS:could not resolve service name" i want to run "umt.sql" query and also see result. thanx for your helping. (6 Replies)
Discussion started by: temhem
6 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

Tnsnames.ora

Hi, I would like to modify, in script schell, the line right above (DESCRIPTION and check three cases : 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... (10 Replies)
Discussion started by: elcaro
10 Replies

8. 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

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
yum-aliases(1)															    yum-aliases(1)

NAME
yum aliases plugin SYNOPSIS
yum [options] alias DESCRIPTION
This plugin changes other commands in yum, much like the alias command in bash. There are a couple of notable differences from shell style aliases though. The alias command has three forms: * alias * alias command * alias command result The first form lists all current aliases with their final result, the second form looks up a "command" and shows it's final result or an error message. The last form creates a new alias. Explanation of alias to final result conversion When you type an aliased command, like "yum --disableexcludes UPT lsu" using the default aliases, the yum-aliases plugin first takes the first "command", by skipping over any options, and then looks up the result (in this case "UPT" is converted to "--enablerepo=updates-test- ing"). If there is a match, then it will replace the aliased "command" in the argument list and try again (again skipping over any options). By convention, in the default aliases list, alias "commands" that are in all CAPS only add options so you can join together a chain of them before any real command or aliased command. There are two things that can alter the above, if you have the "recursive" configuration option set to off then alias processing will stop after the first alias to command substitution. Also, like in shell aliases, if the result starts with then alias processing will stop. EXAMPLES
To create a new alias command called "rm" which does the same thing as the command "remove" use: yum alias rm remove To always add the --skip-broken --disableexcludes=all --obsoletes options to the update command (but leaving the upgrade option alone), you could use: yum alias update update --skip-broken --disableexcludes=all --obsoletes To override the default "up" alias to use the above update command, and never ask for confirmation, you could use: yum alias up update -y AUTHORS
James Antill <james@and.org> SEE ALSO
yum-utils(1) yum(1) James Antill 31 March 2008 yum-aliases(1)
All times are GMT -4. The time now is 04:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy