I am trying to close of multiple users in an Oracle database. Each users has records in multiple tables what I need to do is use a script that call each SQL seperately passing either CLI arguments or gathered arguments from the users during run time.
## Accept variable(s) from the command line... (1 Reply)
Hi-
I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment...
I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
i want to use multple sql count statements and store these count values in unix variable but in one connection only i.e. in only 1 time database should be hit ,which is the main requirement. (1 Reply)
Hi guys,
I am new on here, I have a function in oracle that returns a specific value:
create or replace
PACKAGE BODY "CTC_ASDGET_SCHED" AS
FUNCTION FN_ASDSCHEDULE_GET
RETURN VARCHAR2
AS
BEGIN
DECLARE
ASDSchedule varchar2(6);
ASDComplete... (1 Reply)
Hi ,
I used the below script to get the sql data into csv file using unix scripting.
I m getting the output into an output file but the output file is not displayed in a separe columns .
#!/bin/ksh
export FILE_PATH=/maav/home/xyz/abc/
rm $FILE_PATH/sample.csv
sqlplus -s... (2 Replies)
Hi!
I would like to do a single connection to sqlplus and execute some querys.
Actually I do for every query one connection to database
i.e
echo 'select STATUS from v$instance;
exit' > $SQL_FILE
sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT
echo 'select VERSION from v$instance;... (6 Replies)
Hi Experts:
I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
Hi,
How to set as variable from sql output.
Query:
select aa.serial, ao.name from ann_amit aa JOIN ann_object ao on (aa.classid=ao.classid);
I got two values from aa.serial and ao.name, I wanna make two different variable for aa.serial and ao.name.
The value of aa.serial should be in... (2 Replies)
Hi,
I have connected to oracle database with sqlplus -s / <<EOF
select ename, age from emp where empid=1234;
EOF
I want to save the values of ename and age in unix shell variables. Any pointers would be welcome..
Thanks in advance!!1
Cheers :):):):) (1 Reply)
Hi All,
I want to run multiple sql queries and store the data in variable but i want to use sql command only once. Is there a way without running sql command twice and storing.Please advise.
Eg :
Select 'Query 1 output' from dual;
Select 'Query 2 output' from dual;
I want to... (3 Replies)
Discussion started by: Rokkesh
3 Replies
LEARN ABOUT OPENSOLARIS
setusershell
getusershell(3C) Standard C Library Functions getusershell(3C)NAME
getusershell, setusershell, endusershell - get legal user shells
SYNOPSIS
#include <unistd.h>
char *getusershell(void);
void setusershell(void);
void endusershell(void);
DESCRIPTION
The getusershell() function returns a pointer to a legal user shell as defined by the system manager in the file /etc/shells. If
/etc/shells does not exist, the following locations of the standard system shells are used in its place:
/bin/bash /bin/csh
/bin/jsh /bin/ksh
/bin/ksh93 /bin/pfcsh
/bin/pfksh /bin/pfsh
/bin/sh /bin/tcsh
/bin/zsh /sbin/jsh
/sbin/pfsh /sbin/sh
/usr/bin/bash /usr/bin/csh
/usr/bin/jsh /usr/bin/ksh
/usr/bin/ksh93 /usr/bin/pfcsh
/usr/bin/pfksh /usr/bin/pfsh
/usr/bin/sh /usr/bin/tcsh
/usr/bin/zsh /usr/sfw/bin/zsh
/usr/xpg4/bin/sh
The getusershell() function opens the file /etc/shells, if it exists, and returns the next entry in the list of shells.
The setusershell() function rewinds the file or the list.
The endusershell() function closes the file, frees any memory used by getusershell() and setusershell(), and rewinds the file /etc/shells.
RETURN VALUES
The getusershell() function returns a null pointer on EOF.
BUGS
All information is contained in memory that may be freed with a call to endusershell(), so it must be copied if it is to be saved.
NOTES
Restricted shells should not be listed in /etc/shells.
SunOS 5.11 1 Nov 2007 getusershell(3C)