Sponsored Content
Top Forums Shell Programming and Scripting Help to set the oracle environment???? Post 302070533 by castlerock on Wednesday 5th of April 2006 01:55:34 PM
Old 04-05-2006
Help to set the oracle environment????

Hi,
I am trying to set the environment for my oracle database. I have 5 database in an unix box. My idea is to create 5 files for each database with the following script on it.

After logging into the unix box ...just by typing the database name....the enviornment for the database will be set.

not able to set the environment by calling the file name which is sadev(same as database name)

1. Created a file with name sadev

2. contents in sadev file

export ORACLE_SID=SADEV
echo $ORACLE_SID

3. running the file

eg: deveopmentbox# sadev
sadev
# echo $ORACLE_SID
sademo


I am not able to set the environment the ORACLE_SID=sadev. The "sademo" is set in the .profile of the user.

when i execute the commands inside the file i am able to set the environment for any database instance.

Is there anything wrong in the above steps???


Many Thanks,
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

set environment variable?

Installed a program, need to set the system up so that when the executable is entered, it finds the path to the executable. In Windows, set under system properties, advanced, environmental variables. How do I do this with Unix? Specifically using Solaris 9. I have tried: env... (3 Replies)
Discussion started by: kohoutek
3 Replies

2. UNIX for Advanced & Expert Users

by using c++ how to set environment variables in unix

hi, I am writing c++ code in unix operating system.In that i need to set the environment variable in unix. suppose previously i have environment variable like path="something" now i need to change the path value to some othervalue . so that some other program will access that path value... (1 Reply)
Discussion started by: sada@123
1 Replies

3. Linux

How do i set environment variable

Hi, I am quite new to Linux. And I have doubt how to set new environment variable with value to a C executable. Let say I have a environment variable $Hack ; I would like to load a value for this variable; so that when the C executable is executed, the $Hack would set the variable value. ... (4 Replies)
Discussion started by: ahjiefreak
4 Replies

4. Shell Programming and Scripting

How does the environment stay set

I am running this pre-script with a post scripts that needs to share the same variables. How do I keep the environment variable settings for the next script to access from the RMAN Script? Prescript #1 #RMAN Script #!/bin/ksh ORACLE_SID=INVPRD;export ORACLE_SID... (1 Reply)
Discussion started by: gzs553
1 Replies

5. Solaris

set environment variable?

I am working with solaris 9 sunBlade150 Box. I Installed a program, need to set the environment variable so that when the executable is entered,it finds the path to the executable. The documentation for the software says: Set the appropriate environment variable: Connect to server failed;... (8 Replies)
Discussion started by: smartgupta
8 Replies

6. Shell Programming and Scripting

Set environment

Hi, I can run shell script from the command line using $ . set If the run the script inside perl script using $var = system("set"); print $var; This prints 0. This command sets up the environment from command line. But when used inside the shell script or perl script it... (2 Replies)
Discussion started by: sandy1028
2 Replies

7. Shell Programming and Scripting

Set Environment variable from another file

Hi, i have the following env variable. currently i am exporting variable in the same script file. but i need this is in a text file and the scripts need to export this variable from the text file. can you please suggest me. is it possible. export... (6 Replies)
Discussion started by: rsivasan
6 Replies

8. Shell Programming and Scripting

Need to SET Environment variables

Hi Could you please tell me how to set environment variables in Unix ksh. And how can acess those varibles in shell scripts ( Please give the code with an example) For my scenario. We have written number of shell scripts with hard coded username and password. But if we want to... (1 Reply)
Discussion started by: shyamu544
1 Replies

9. UNIX and Linux Applications

Identify a specific environment Oracle variable to connect a remote Oracle database ?

Good evening I nned your help pls, In an unix server i want to connect to a remote oracle databse server by sqlplus. I tried to find out the user/passwd and service name by env variable and all Ive got is this: ORACLE_SID_REPCOL=SCL_REPCOL ORACLE_SID=xmeta ORACLE_SID_TOL=SCL_PROTOLCOL... (2 Replies)
Discussion started by: alexcol
2 Replies
FINFO_OPEN(3)								 1							     FINFO_OPEN(3)

finfo_open - Create a new fileinfo resource

       Procedural style

SYNOPSIS
resource finfo_open NULL ([int $options = FILEINFO_NONE], [string $magic_file]) DESCRIPTION
Object oriented style (constructor): finfo::__construct NULL ([int $options = FILEINFO_NONE], [string $magic_file]) This function opens a magic database and returns its resource. PARAMETERS
o $options - One or disjunction of more Fileinfo constants. o $magic_file - Name of a magic database file, usually something like /path/to/magic.mime. If not specified, the MAGIC environment variable is used. If the environment variable isn't set, then PHP's bundled magic database will be used. Passing NULL or an empty string will be equivalent to the default value. RETURN VALUES
(Procedural style only) Returns a magic database resource on success or FALSE on failure. NOTES
Warning The expected magic database format changed in PHP 5.3.11 and 5.4.1. Due to this, the internal magic database was upgraded. This mostly effects code where an external magic database is used: reading an older magic file will now fail. Also, some textual repre- sentations of the mime types has changed, for instance for PHP would be "PHP script, ASCII text" instead of "PHP script text" returned. Note Generally, using the bundled magic database (by leaving $magic_file and the MAGIC environment variables unset) is the best course of action unless you specifically need a custom magic database. EXAMPLES
Example #1 Object oriented style <?php $finfo = new finfo(FILEINFO_MIME, "/usr/share/misc/magic"); // return mime type ala mimetype extension /* get mime-type for a specific file */ $filename = "/usr/local/something.txt"; echo $finfo->file($filename); ?> Example #2 Procedural style <?php $finfo = finfo_open(FILEINFO_MIME, "/usr/share/misc/magic"); // return mime type ala mimetype extension if (!$finfo) { echo "Opening fileinfo database failed"; exit(); } /* get mime-type for a specific file */ $filename = "/usr/local/something.txt"; echo finfo_file($finfo, $filename); /* close connection */ finfo_close($finfo); ?> The above example will output: text/plain; charset=us-ascii SEE ALSO
finfo_close(3). PHP Documentation Group FINFO_OPEN(3)
All times are GMT -4. The time now is 09:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy