By the way you can establish a direct database connection instead of having a connection-less session with /NOLOG and then connecting. NOLOG is useful for performing some database administration tasks, writing transportable scripts, or to use SQL*Plus editing commands to write or edit scripts.
I am remember doing that in the past because the database username & passwords are visible, when if anyone else issues ps -ef command.
Hi All,
I am executing the following code :-
sqlplus -s ${DATABASE_USER} |&
print -p -- 'set feed off pause off pages 0 head off veri off line 500'
print -p -- 'set term off time off serveroutput on size 1000000'
print -p -- "set sqlprompt ''"
print -p -- "SELECT run_command from... (2 Replies)
i'm not new to programming, but i AM new to unix scripting. here's my deal.
this works:
#!/bin/ksh
echo "HELLO"
/oracle_home/bin/sqlplus username/password@MYDB<<EOF
SELECT COUNT(*) FROM EMPLOYEES;
EOF
exit
echo "GOODBYE"
this doesn't:
#!/bin/ksh
echo "HELLO"
for x in 1 2... (4 Replies)
I have korn shell scripts.
I want to pass a variable to a script which will execute a a sql script to read a table that contains env. variables. I want to read and then somehow export at unix level variables
example
for every row selected from the table build export command line
field1... (5 Replies)
Hi,
I am facing the following error in calling the stored procedure from SQLPLUS in unix environment.
SQL> set serveroutput on
SQL> var store number;
SQL> exec test_proc(:store, 200);
BEGIN TEST_PROC(:store, 200); END;
*
ERROR at line 1:
ORA-01858: a non-numeric character was found... (8 Replies)
I'm calling an embedded sql from my shell script file. This sql does simple task of spooling out the contents of the table (see below my sample code) into a spool file that I specify. So far so good, but the problem is that the output is also displayed on screen which I do NOT want.
How can I... (3 Replies)
I want to execute a shell script from sqlplus prompt and get its output back to sqlplus. Is this possible?
if yes just give me an example for doing that. (2 Replies)
Hello All,
I have a UNIX script which will prepare anonymous oracle pl/sql block in a temporary file in run time and passes this file to sqlplus as given below.
cat > $v_Input_File 2>>$v_Log << EOF
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION FORCE PARALLEL DML PARALLEL 16';
EXECUTE... (1 Reply)
Hello All,
I have exactly same issue @vikas_trl had in following link:
https://www.unix.com/shell-programming-and-scripting/259854-control-not-returning-sqlplus-calling-unix-shell-script.html
I wonder if he or somebody else could find the issue's cause or the solution.
Any help would... (4 Replies)
Hi,
I am trying to write a script that calls an Oracle SQL file who in turns call another SQL file. This same SQL file has to be run against the same database but using different username and password at each loop.
The first SQL file is basically a connection test and it is supposed to sort... (2 Replies)
Hi All,
we have requirement, i am created a shell script , inside i am connecting sqlplus and execute the query. below my code for your reference.
get_sqlid ()
{
sqlid=$(
sqlplus -s $PBDW_USERID/$PBDW_PW@$PBDW_SID <<EOF
DEFINE TBLNAME=$1
set feedback off
set serverout on size... (4 Replies)
Discussion started by: KK230689
4 Replies
LEARN ABOUT PHP
ibase_pconnect
IBASE_PCONNECT(3) 1 IBASE_PCONNECT(3)ibase_pconnect - Open a persistent connection to an InterBase databaseSYNOPSIS
resource ibase_pconnect ([string $database], [string $username], [string $password], [string $charset], [int $buffers], [int
$dialect], [string $role], [int $sync])
DESCRIPTION
Opens a persistent connection to an InterBase database.
ibase_pconnect(3) acts very much like ibase_connect(3) with two major differences.
First, when connecting, the function will first try to find a (persistent) link that's already opened with the same parameters. If one is
found, an identifier for it will be returned instead of opening a new connection.
Second, the connection to the InterBase server will not be closed when the execution of the script ends. Instead, the link will remain
open for future use (ibase_close(3) will not close links established by ibase_pconnect(3)). This type of link is therefore called 'persis-
tent'.
PARAMETERS
o $database
- The $database argument has to be a valid path to database file on the server it resides on. If the server is not local, it must
be prefixed with either 'hostname:' (TCP/IP), '//hostname/' (NetBEUI) or 'hostname@' (IPX/SPX), depending on the connection proto-
col used.
o $username
- The user name. Can be set with the ibase.default_user php.ini directive.
o $password
- The password for $username. Can be set with the ibase.default_password php.ini directive.
o $charset
-$charset is the default character set for a database.
o $buffers
-$buffers is the number of database buffers to allocate for the server-side cache. If 0 or omitted, server chooses its own
default.
o $dialect
-$dialect selects the default SQL dialect for any statement executed within a connection, and it defaults to the highest one sup-
ported by client libraries. Functional only with InterBase 6 and up.
o $role
- Functional only with InterBase 5 and up.
o $sync
-
RETURN VALUES
Returns an InterBase link identifier on success, or FALSE on error.
SEE ALSO ibase_close(3), ibase_connect(3).
PHP Documentation Group IBASE_PCONNECT(3)