Sponsored Content
Top Forums Shell Programming and Scripting How can we hardcode TNS_ADMIN? Post 302519914 by rdhanek on Thursday 5th of May 2011 11:13:24 AM
Old 05-05-2011
I tried the code beloe.Getting Internal server error.

<
Code:
<html>
<head>
<title>xxxxxxxxxxxxxx</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<%
  ### Load modules, connect to database
  require 'cgi'
  require 'dbi'
  $dbh = ''
  SetEnv TNS_ADMIN '/opt/oracle/network/admin'
  begin
  $dbh = DBI.connect("DBI:Oracle:dbname", "username", "password")>

Can you please check if there is any syntax issue?

Last edited by pludi; 05-05-2011 at 05:47 PM..
 

5 More Discussions You Might Find Interesting

1. Solaris

i wanto hardcode password for a username to ssh to a server using script

Dear all i want to ssh to a server via running a shell script with a username and i want to hard code the password for that particular username can u help me please Thank u Naree (8 Replies)
Discussion started by: naree
8 Replies

2. Shell Programming and Scripting

mysqldump script without hardcode password

OS: Linux ambglx02 2.6.16.60-0.21-default #1 Tue May 6 12:41:02 UTC 2008 i686 i686 i386 GNU/Linux Shell: bash Currently I have a mysqldump script to backup my mysql database, the command is as below: /opt/novell/mysql/bin/mysqldump --add-drop-table -u root -p -h mydb > /home/john/mydb.sql ... (5 Replies)
Discussion started by: bulkbiz
5 Replies

3. UNIX for Advanced & Expert Users

Change in script to hardcode in a query

HI, In a script i am using a query ${SQLPLUS_SETTINGS} select c.CYCLE_CODE ||'|'|| NEXT_CYCLE_INST ||'|'|| CYCLE_YEAR ||'|'|| to_char(trunc(CYCLE_CLOSE_DATE +1),'DD-MON-YY YY')||'|'|| to_char(ADD_MONTHS(CYCLE_CLOSE_DATE,1),'DD-MON-YYYY') ||'|'|| CYCLE_MONTH FROM PM1_CYCLE_STATE C,... (2 Replies)
Discussion started by: madfox
2 Replies

4. UNIX for Dummies Questions & Answers

Problem with TNS_ADMIN in .profile

Hi! In my .profile I have a line that says export TNS_ADMIN=$HOME I received the .profile file from a colleague who uses it to access SQL*Plus from a UNIX server. When I try the same method he uses I get ORA-12154: TNS:could not resolve the connect identifier specifiedwhich makes me think... (8 Replies)
Discussion started by: Mike Welch
8 Replies

5. Shell Programming and Scripting

Logon to multiple hosts using ssh hardcode password

Hi im trying to write a script to logon to list of servers with same userID. I have no option/plan to implement ssh-keygen sharing between the systems, so i have written script creating 2 files, file1 holds list of hosts host1 host2 host3 file2 has following script for i in `cat file1`... (1 Reply)
Discussion started by: dreamaix
1 Replies
rheolef-config(1rheolef)					    rheolef-6.1 					  rheolef-config(1rheolef)

NAME
rheolef-config -- get installation directories EXAMPLE
The following command returns the rheolef libraries directory: rheolef-config --libdir An environment sanity check writes: rheolef-config --check DESCRIPTION
This command is usefull when linking executables with rheolef: libraries locations are required by the link editor. Such directories are defined while configuring rheolef, before to compile and install see . Installing}'. The rheolef-config command returns these settings. Note that rheolef-config could be used in Makefiles for the determination of linker flags. Another usefull feature is the --check option. When rheolef is installed in a user directory, i.e. not as root, the sane run-time environ- ment depends upon two environment variables. The first one is the PATH: bkindir directory may be present in PATH. The second environment variable is related to shared libraries, and its name is system-dependent, e.g. LD_LIBRARY_PATH on most platforms and SHLIB_PATH on HP-UX. Its content may contains bindir. rheolef-config --shlibpath-var Since it is a common mistake to have incorrect values for these variable, for novice users or for adanced ones, especialy when dealing with several installed versions, the environment sanity check writes: rheolef-config --check If there is mistakes, a hint is suggested to fix it and the return status is 1. Instead, the return status is 0. FILE OPTIONS
--version rheolef version. --help print option summary and exit. --prefix install architecture-independent files location. --exec-prefix architecture-dependent files location. --includedir include header directory. --bindir executables directory. --mandir man documentation directory. --libdir object code libraries directory. --datadir --datarootdir read-only architecture-independent data location. --pkgdatadir read-only architecture-independent data location; specific for package. --includes include compiler flags. --libs library compiler flags. --shlibpath-var the shared library path variable. --library-interface-version the library interface version. --hardcode-libdir-flag-spec flag to hardcode a libdir into a binary during linking. --is-distributed true or false: whether it is the distributed version. --have-old-code --have-new-code true or false: whether it is the new/old code branch that is installed. rheolef-6.1 rheolef-6.1 rheolef-config(1rheolef)
All times are GMT -4. The time now is 10:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy