Sponsored Content
Operating Systems AIX SQLPLUS -S option not working Post 302934023 by rbatte1 on Wednesday 4th of February 2015 05:45:31 AM
Old 02-04-2015
In what way is it 'not working'? Do you get any output/errors that we can see?


Could I also suggest that you move your credentials to the next line. If anyone does a ps -ef | grep sql whilst your code is running, they will see your credentials in clear text. Something more like:-
Code:
OUTPUT=$(sqlplus -s <<EOF
$usrname/$passwd
set heading OFF termout ON trimout ON feedback OFF
set pagesize 0
select column1,column2 from tablename where column1=${FILENAME1};
exit;
EOF
)

Of course, keeping the credentials secret if you code them in the script is another problem.....Smilie



Robin
This User Gave Thanks to rbatte1 For This Post:
 

10 More Discussions You Might Find Interesting

1. Solaris

Why does the 'ps' command with -u option not working?

How can I use the 'ps' command to view current sessions but only for a given process/user, with the -u parm? In older versions of Unix, this used to work, but not in Sun Solaris. Thanks (4 Replies)
Discussion started by: ElCaito
4 Replies

2. UNIX for Dummies Questions & Answers

-d option not working...

:confused: In the following, when I enter a valid, existing directory,why am I getting Not Found when the Dir DOES exist? read auser echo "You entered $auser" wait 2 cd /home if then echo "Dir Exists" sleep 2 else echo "/home/$auser Not Found" sleep... (2 Replies)
Discussion started by: rgouette
2 Replies

3. Shell Programming and Scripting

Multiple SQLPLUS background processes not working properly

Hi All, I am running 25 background process from a Unix shell script which calls a single Oracle procedure with different paramenters each time. These 25 process creates 25 different files. When i run these 25 Background SQLPLUS processes, few files are not created completly but if i run 25... (1 Reply)
Discussion started by: rawat_me01
1 Replies

4. HP-UX

who command option not working

Running HP 11.31 on a HP3600. But when I log in as a user the who command works but if I use an option like "who -m" I get nothing. Any thoughts on what is causing this problem. (11 Replies)
Discussion started by: KMRWHUNTER
11 Replies

5. Shell Programming and Scripting

sqlplus @ not working sqlplus \@ working..

Hi All, I am facing a strange problem on one of my unix servers. When i try to login using the standard method: it fails with below message >sqlplus REF1SSTDBO1/REF1SSTDBO1@TKS3N10G > TKS3N10G ksh: TKS3N10G: not found But it works perfectly when i escape with ;\ >sqlplus... (3 Replies)
Discussion started by: kunwar
3 Replies

6. Shell Programming and Scripting

Sqlplus Set Heading not Working

Hello, Could someone tell me why this still returns headings? echo "SELECT columnA from tableA group by columnA;" | sqlplus -s ${DB_CONNECT} set heading OFF | while read line do arr="$line" echo ${arr} let i=$i+1 done (2 Replies)
Discussion started by: flowervz
2 Replies

7. Shell Programming and Scripting

-v and -f option for grep not working

In solaris, i m trying to find the files having a particulat extension and then from the list i want to exclude those files which is present in a file. But it seems the -f and -v option are not working find $source -type f -name $extn | /usr/xpg4/bin/grep -F -v -f $exclude | while read... (7 Replies)
Discussion started by: millan
7 Replies

8. Shell Programming and Scripting

Working with UTF char sqlplus

I have below SQL that I wasnt to run from a solaris machine using sqlplus select * from TABLE_NAME where regexp_like(field_value, 'Α|Β|Γ|Δ|Ε|Ζ|Η|Θ|Ι|Κ|Λ|Μ|Ν|Ξ|Ο|Π|Ρ|Σ|Τ|Υ|Φ|Χ|Ψ|Ω|α|β|γ|δ|ε|ζ|η|θ|ι|κ|λ|μ|ν|ξ|ο|π|ρ|σ|τ|υ|φ|χ|ψ|ω'); When I cat the file UTF char shows perfect however when i run... (1 Reply)
Discussion started by: varun22486
1 Replies

9. Shell Programming and Scripting

Sqlplus not working through ssh

Hi Gurus, I was trying to execute sqlplus command remotely like ssh -q IP venkat@"which sqlplus" am getting error as which: no sqlplus in (/usr/local/bin:/bin:/usr/bin) if i connect manually and executing which sqlplus it working fine. Please help to fix the issue. Regard's Venky (7 Replies)
Discussion started by: venky.b5
7 Replies

10. UNIX for Beginners Questions & Answers

"SQLPLUS -S " is not working in one environment where same code is working in another

"SQLPLUS -S " is not working in one environment where same code is working in another getting below error =================================== SQL*Plus: Release 11.2.0.3.0 Production Copyright (c) 1982, 2011, Oracle. All rights reserved. Use SQL*Plus to execute SQL, PL/SQL and SQL*Plus... (1 Reply)
Discussion started by: yogendra.barode
1 Replies
PAM_SETCRED(3)						     App. Programmers' Manual						    PAM_SETCRED(3)

NAME
pam_setcred - set the credentials for the user SYNOPSIS
#include <security/pam_appl.h> int pam_setcred(pam_handle_t *pamh, int flags); DESCRIPTION
pam_setcred This function is used to establish, maintain and delete the credentials of a user. It should be called after a user has been authenticated and before a session is opened for the user (with pam_open_session(3)). It should be noted that credentials come in many forms. Examples include: group memberships; ticket-files; and Linux-PAM environment vari- ables. For this reason, it is important that the basic identity of the user is established, by the application, prior to a call to this function. For example, the default Linux-PAM environment variables should be set and also initgroups(2) (or equivalent) should have been performed. VALID FLAGS
PAM_ESTABLISH_CRED initialize the credentials for the user. PAM_DELETE_CRED delete the user's credentials. PAM_REINITIALIZE_CRED delete and then initialize the user's credentials. PAM_REFRESH_CRED extend the lifetime of the existing credentials. RETURN VALUE
On success PAM_SUCCESS is returned, all other return values should be treated as errors. ERRORS
May be translated to text with pam_strerror(3). CONFORMING TO
DCE-RFC 86.0, October 1995. BUGS
none known. SEE ALSO
pam_authenticate(3), pam_strerror(3) and pam_open_session(3). Also, see the three Linux-PAM Guides, for System administrators, module developers, and application developers. Linux-PAM 0.58 1997 July 6 PAM_SETCRED(3)
All times are GMT -4. The time now is 01:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy