Sponsored Content
Top Forums Shell Programming and Scripting Read Oracle connection details from a configuration file Post 302945596 by jim mcnamara on Sunday 31st of May 2015 11:00:04 PM
Old 06-01-2015
You have an extra $ on the last line, a typo I think.

Code:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib ; export LD_LIBRARY_PATH

This is good.
Does LD_LIBRARY_PATH and PATH exist for the process using your connect string and are they exactly the same what you have for the process that "works"?

Also please define "doesn't work" - post the oracle error -- you know "ORA-nnnn error message" - are you using a shell script to start oracle (sqlplus for example) - are you using a here document to do that?
Example
Code:
while read connect_string
do
sqlplus -s  $connect_string <<-EOF
 select * from foo;
 exit
EOF
done < external_file


Last edited by jim mcnamara; 06-01-2015 at 12:05 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to read configuration file

Hi, I would like to write a Korn shell script which will remove files older than a certain date. In my script, it will read a configuration file with the following entries: # <directory> <filename wildcard> # /home/philip/log *.log /home/philip/log1 delete-me*.log The... (1 Reply)
Discussion started by: philip_dba
1 Replies

2. Shell Programming and Scripting

Read relevent details from Log File

Hi All, We have requirement to read XML details from large Log File and save in new file name. I have enclosed the sample xml which has start tag <OUTBOUND_MESSAGE xmlns="http://www.abc.com"> and the end tag as </OUTBOUND_MESSAGE> The log file contains many lines with other details which... (6 Replies)
Discussion started by: thinakarmani
6 Replies

3. Shell Programming and Scripting

How to read the configuration file from shell script

Hello all, Please let me know if anyone have the idea how to read the configuration file from the shell script? Thanks in advance, Nishanth (7 Replies)
Discussion started by: nishanth hampal
7 Replies

4. Solaris

Configuration details

hi can you please tell me how to get the configuration details from unix server. Rajesh. (6 Replies)
Discussion started by: pmrajesh21
6 Replies

5. Shell Programming and Scripting

How to stop Sqlplus command from printing db connection details

Hi, Could someone tell me how to stop SQLPLUS command from printing the connection details in the console. Below is the lines i get in console when executing the sqlplus... SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 9 03:31:03 2011 Copyright (c) 1982, 2005, Oracle. All rights... (2 Replies)
Discussion started by: funonnet
2 Replies

6. Solaris

Solaris configuration details.

How to find the entire configuration details of a solaris. I need to know what partion were made, which OS is used and wat version is used etc... Thanks to tell (4 Replies)
Discussion started by: kkalyan
4 Replies

7. UNIX for Advanced & Expert Users

UNIX / LINUX OS CPU configuration details

Hi, How to find the cpu configuration details of Cores, Speed MHz, virtual processors for the following servers: LINUX OS Servers: Linux 2.6.9-89.0.3.ELsmp #1 SMP Sat Jun 13 07:05:54 EDT 2009 i686 i686 i386 GNU/Linux. (Cores, Speed, Processor) Linux 2.6.18-164.el5 #1 SMP Tue Aug 18... (5 Replies)
Discussion started by: jagtheesh
5 Replies

8. Shell Programming and Scripting

Connection to Oracle data and dump text file

Hi for all! I need for my job one shell script very concrete about connection to oracle databases and writing to text file. Well I tell you: 1.- I must read a file as parameter from linux interface: > example.sh fileToRead 2.-I must read line to line in "fileToRead" and take a... (9 Replies)
Discussion started by: wien996
9 Replies

9. Shell Programming and Scripting

File read from UNIX to Oracle

hi all, I have flat file in unix. By using sql loader i need to import the data from the flat file. I have created a control file, table with the below data structure and pasted the sample input file. I am not sure whether it is a right way to do it. can anyone provide the thought on this. ... (2 Replies)
Discussion started by: arun888
2 Replies

10. UNIX for Beginners Questions & Answers

Unable to fetch BIOS configuration details

Hi All, unable to fetch the bios configuration information and service provider information in centos 5 using dmidecode command. ServiceProvider=`dmidecode -s system-product-name |awk '{print $1}'` BIOS_Configuration=`dmidecode | grep "BIOS Information" -A10 | grep -e... (4 Replies)
Discussion started by: sravani25
4 Replies
ZONE2SQL(8)						      System Manager's Manual						       ZONE2SQL(8)

NAME
zone2sql - Convert ISC Bind zones to SQL SYNOPSIS
zone2sql [OPTIONS] DESCRIPTION
Zone2sql parses Bind named.conf files and zonefiles and outputs SQL on standard out, which can then be fed to your database. zone2sql understands the Bind master file extension '$GENERATE' and will also honour '$ORIGIN' and '$TTL'. For backends supporting slave operation (currently only the PostgreSQL backend), there is also an option to keep slave zones as slaves, and not convert them to native operation. By default, zone2sql outputs code suitable for the mysqlbackend, but it can also generate SQL for the Generic PostgreSQL and Oracle back- ends. OPTIONS
Input options: --named-conf=<filename> Read <filename> to get the bind configuration --zone=<zone-file> Parse only this zone file. Conflicts with --named-conf parameter. --zone-name=<name> When parsing a single zone without $ORIGIN statement, set this as the zone name. Output options: --bare Output in a bare format, suitable for further parsing. The output is formatted as follows: domain_id<TAB>'qname'<TAB>'qtype'<TAB>'content'<TAB>prio<TAB>ttl --gmysql Output in format suitable for the default configuration of the Generic MySQL backend. --gpgsql Output in format suitable for the default configuration of the Generic PostgreSQL backend. --mysql Output in format suitable for the default configuration of the MySQL backend (the default output format). --oracle Output in format suitable for the default configuration of the Generic Oracle backend. --transactions For Oracle and PostgreSQL output, wrap each domain in a transaction for higher speed and integrity. Other options: --slave Maintain slave status of zones listed in named.conf as being slaves. The default behaviour is to convert all zones to native opera- tion. --on-error-resume-next Ignore missing files during parsing. Dangerous. --help List all options --verbose Be verbose during conversion. SEE ALSO
pdns_server(8) PowerDNS December 2002 ZONE2SQL(8)
All times are GMT -4. The time now is 10:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy