Sponsored Content
Top Forums Shell Programming and Scripting Passing PL/SQL variable value to Shell Varible Post 302104917 by roopla on Monday 29th of January 2007 02:35:31 PM
Old 01-29-2007
shell_var=`$ORACLE_HOME/bin/sqlplus -S test/passwd@service > ${logfile} 2>&1 << EOF
SET FEED OFF;
SET TERMOUT ON;
SET VERIFY OFF;
SET ECHO OFF;
SET HEAD OFF;
SELECT sysdate from dual FROM DUAL;
EXIT
EOF`

echo $shell_var
 

10 More Discussions You Might Find Interesting

1. Linux

Passing variables to sql from batch shell in linux

Hi, I need to put this command in a batch shell. sqlplus -s user/password @test.sql and in the test.sql I have this command select * from pbempl where pebempl_id = $1; How I can pass the variable $1 from the batch shell??? Thanks (2 Replies)
Discussion started by: rama71
2 Replies

2. UNIX for Advanced & Expert Users

passing value to a variable in a SQL

Hi Folks, This is a small chunk of the bigger problem which i am facing and some help here will help me resolve the rest of the issue. Problem is that i need to pass the value of a variable from a shell script to a SQL query (infact a lot of SQL's) i have the following solution but somehow... (4 Replies)
Discussion started by: kamitsin
4 Replies

3. Shell Programming and Scripting

Passing argumnets from shell script to sql

hi I all , I have sql statment in my shell script , I pass two argument to the script I need to pass the this two arguments to the sql statment example : runsql.sh "1" "2" sql : updat tables_x set y=0 where A=:x should subsituted by "1" and B=:y shuold subsituted bt "2"... (1 Reply)
Discussion started by: habuzahra
1 Replies

4. Shell Programming and Scripting

passing values from sql to shell script

Hi guyz, Posting a thread after a long time. I want to pass two variables to unix shell script from sql script. Note: I am calling sql script from unix script. sql script has 2 variables one is the return code for status of program run and second one email flag. I don't know how to capture... (3 Replies)
Discussion started by: sachin.gangadha
3 Replies

5. UNIX for Advanced & Expert Users

Passing Hash variable in to sql query in perl

Hi Everyone, Can anyone help me how do i call hash variable in to sql query in perl. Please see the script below i have defined two Hash %lc and %tab as below $lc{'REFF'}='V_RES_CLASS'; $lc{'CALE'}='V_CAP_CLASS'; $lc{'XRPD'}='V_XFMR_CLASS'; $tab{'V_RES_CLASS'}='V_MFR_SERS';... (6 Replies)
Discussion started by: jam_prasanna
6 Replies

6. Shell Programming and Scripting

Passing filename dynamically in SPOOL of SQL*PLUS in shell script

Hi all, I am executing shell script in which I am using SQLLDR In this SQLLDR I am passing text file having PL/SQL script. This script will produce some formated output, this output I have to spool in another text file. Currently I have given this in script file as following Spool... (2 Replies)
Discussion started by: shekharjchandra
2 Replies

7. Shell Programming and Scripting

Passing a string variable from Unix to Sql Plus

Hi Guys, I am trying to pass a string variable from Unix shell script to sqlplus as a parameter. I have tried using single quotes with the variable name but it does not work. Please help me with it. I am using BASH. My code: Your help is much appreciated. Thanks, shil (2 Replies)
Discussion started by: infintenumbers
2 Replies

8. Shell Programming and Scripting

Passing the result of an anonymous pl/sql block to a shell script

Hello, Here is the code i have written to get the count of a plsql query back to the unix. function checkforCOIDs { countcheck=`sqlplus -s $1/$2@$3 whenever oserror exit sql.oscode rollback whenever sqlerror exit sql.sqlcode rollback set serverout on size 2000; set head off feedback off... (2 Replies)
Discussion started by: santosh2eee
2 Replies

9. Shell Programming and Scripting

Passing variable to sql

How to pass variable to sql file. Im tryin in two ways, Method 1: my.sql select * from table where col1 = '$1' and col2 = 'text'; Method 1execute: dbaccess database my.sql $var Method2: select * from table col1 in (`cat inputfile`) and col2 = 'text'; method... (2 Replies)
Discussion started by: Roozo
2 Replies

10. Shell Programming and Scripting

Passing variable from file to sql from script

Hi Friend, I have one file in which some number are mentioned and number of lines are vary every time And i need to pass that number to my sql command from script. Suppose i have file acc.txt 45456546456 45464564565 67854353454 67657612132 Number of records are vary every time.... (20 Replies)
Discussion started by: pallvi_mahajan
20 Replies
NSCD.CONF(5)							File Formats Manual						      NSCD.CONF(5)

NAME
nscd.conf - configuration file for Name Service Caching Daemon DESCRIPTION
/etc/nscd.conf configures the caches used by nscd(8) as well as some generic options. nscd(8) is able to use a configuration file at a different location, when supplied with the -f or --config-file command line option. The configuration file consists of a set of lines. Empty lines, and text after a '#' is ignored. All remaining lines denote the setting of an option. White space before and after options, and between options and option arguments is ignored. There are two kinds of options: General options influence nscd(8)'s general behaviour, while cache related options only affect the specified cache. Options are set like this: general_option option cache_option cache_name option GENERAL OPTIONS
logfile file Specifies the name of the debug log-file that nscd(8) should use if debug-level is higher than 0. If this option is not set, nscd(8) will write its debug output to stderr. debug-level level If level is higher than 0, nscd(8) will create some debug output. The higher the level, the more verbose the output. threads #threads This option sets the number of threads that nscd(8) should use by default. It can be overridden by calling nscd(8) with the -t or --nthreads argument. If neither this configuration option nor the command line argument is given, nscd(8) uses 5 threads by default. The minimum is 3. More threads means more simultaneous connections that nscd(8) can handle. max-threads #threads Specifies the maximum number of threads to be started. server-user user By default, nscd(8) is run as user root. This option can be set to force nscd(8) to drop root privileges after startup. It cannot be used when nscd(8) is called with the -S or --secure argument. Also note that some services require that nscd run as root, so using this may break those lookup services. stat-user user Specifies the user who is allowed to request statistics. paranoia bool bool must be one of yes or no. Enabling paranoia mode causes nscd(8) to restart itself periodically. restart-interval time Sets the restart interval to time seconds if periodic restart is enabled by enabling paranoia mode. The default value is 3600. CACHE OPTIONS
All cache options take two arguments. The first one denotes the service or cache the option should affect. Currently service can be one of passwd, group, or hosts. enable-cache service bool bool must be one of yes or no. Each cache is disabled by default and must be enabled explicitly by setting this options to yes. positive-time-to-live service secs This is the number of seconds after which a cached entry is removed from the cache. This defaults to 3600 seconds (i. e. one hour). negative-time-to-live service secs If an entry is not found by the Name Service, it is added to the cache and marked as "not existent". This option sets the number of seconds after which such a not existent entry is removed from the cache. This defaults to 20 seconds for the password and host caches and to 60 seconds for the group cache. suggested-size service prime-number This option sets the size of the hash that is used to store the cache entries. As this is a hash, it should be reasonably larger than the maximum number of entries that is expected to be cached simultaneously and should be a prime number. It defaults to a size of 211 entries. check-files service bool bool must be one of yes (default) or no. If file checking is enabled, nscd(8) periodically checks the modification time of /etc/passwd, /etc/group, or /etc/hosts (for the passwd, group, and host cache respectively) and invalidates the cache if the file has changed since the last check. persistent service bool bool must be one of yes (default) or no. Keep the content of the cache for service over nscd(8) restarts. Useful when paranoia mode is set. shared service bool bool must be one of yes (default) or no. The memory mapping of the nscd(8) databases for service is shared with the clients so that they can directly search in them instead of having to ask the daemon over the socket each time a lookup is performed. reload-count #number Sets the number of times a cached record is reloaded before it is pruned from the cache. Each cache record has a timeout, when that timeout expires, nscd(8) will either reload it (query the NSS service again if the data hasn't changed), or drop it. max-db-size service number-of-bytes Sets the maximum allowable size for the service. auto-propagate service bool When set to no for passwd or group service, then the .byname requests are not added to passwd.byuid or group.bygid cache. This may help for tables containing multiple records for the same id. EXAMPLE
# This is a comment. logfile /var/log/nscd.log threads 6 server-user nobody debug-level 0 enable-cache passwd yes positive-time-to-live passwd 600 negative-time-to-live passwd 20 suggested-size passwd 211 check-files passwd yes enable-cache group yes positive-time-to-live group 3600 negative-time-to-live group 60 suggested-size group 211 check-files group yes enable-cache hosts yes positive-time-to-live hosts 3600 negative-time-to-live hosts 20 suggested-size hosts 211 check-files hosts yes SEE ALSO
nscd(8), nsswitch.conf(5) 4.2 Berkeley Distribution 07 January 2001 NSCD.CONF(5)
All times are GMT -4. The time now is 05:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy