12-08-2011
That's too much close to what I'm looking for,
The only point left is i do need to open the connection one time for each array
is it possible to wave
connect user@database/password
to be connected before the loop starts, and close the connection after the whole loop ends
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I want to pass parameters from a shell script to a sql script and use the parameter in the sql query ..and then I want to spool a particular select query on to my unix box... for 4 different locations by writing only one sql script
Right now no file is generated on the unix box...it is a... (2 Replies)
Discussion started by: phani
2 Replies
2. UNIX for Advanced & Expert Users
Hi,
I want to input unix variable to sqlplus.The following is working fine
sqlplus username/password @dummy.sql param1 param2 << EOF
create user $1 identified by $2;
EOF
But I dont want any file name to be passed,I just want to pass the parameter. Is there any way to that??
Thanks... (3 Replies)
Discussion started by: sakthi.abdullah
3 Replies
3. Shell Programming and Scripting
hi,
I am using a shell script from where i will be conecting to sqlplus..
i am having a problem in passing a variable to sqlplus query..
i will be assigning the variable in the unix environment..whenever i am trying to pass a variable having the contents greater than 2500 characters, i am... (3 Replies)
Discussion started by: kripssmart
3 Replies
4. Shell Programming and Scripting
Hi,
I am writing a script which creates an external table using a shell script. My requirement is like this.
Usage: . ./r.ksh <table_name> - this should create an external table.
e.g . ./r.ksh abc - this should create an external table as abc_external.
How do i achieve this? Please... (5 Replies)
Discussion started by: Anaramkris
5 Replies
5. Shell Programming and Scripting
Hi there,
I am trying to call a shell script from a Perl script. here is the code:
@args = ("sh", "someshellprg.sh", "a file handler", "an array");
system(@args) == 0
or die "system @args failed: $?";
in the shell program, I examine if the arguments exits using:
if
then echo... (5 Replies)
Discussion started by: pinkgladiator
5 Replies
6. Shell Programming and Scripting
Hello All,
I am interested in finding out a way to pass parameters that are entered at the prompt from HP unix and passed to SQLPlus code with a Shell Script. Is this possible?
Thanks (4 Replies)
Discussion started by: compprog11
4 Replies
7. Shell Programming and Scripting
Hi All,
I'm new to Linux and scripting, apologies in advance for 'stupid' questions.
Please help... Im writing a script that calls a sqlplus script but the sqlplus requires inputs and i cant seem to get this to work.
here is my code.
#!/bin/sh
TERM=vt100
export TERM... (4 Replies)
Discussion started by: Mahomed
4 Replies
8. Shell Programming and Scripting
Hi ,
I am using below code :
for i in `ps -ef|grep pmon|awk {' print $8 '}|cut -f3 -d'_'|grep -v '^grep'`
do
ORACLE_SID=$i
export ORACLE_SID;
dest=`sqlplus "/ as sysdba" <<EOF
set heading off feedback on verify off
select DESTINATION from v\\$archive_dest where target in... (5 Replies)
Discussion started by: admin_db
5 Replies
9. Shell Programming and Scripting
Apologies if this is the incorrect forum.There is an issue in the function call I am facing while calling the same from a unix shell scripts.
Basically, I want the ref cursor to return values to a variable in sqlpus. The function call is currently saved in a ".txt" file
in a unix location. I want... (7 Replies)
Discussion started by: amvip
7 Replies
10. Shell Programming and Scripting
Hello,
I have file (PARFILE) with string on first line:
INCLUDE=SCHEMA:"IN\( 'SCHEMA1','SCHEMA2','SCHEMA3' \)"In .sh script I use:
....
IMPORT_SCHEMA=`awk 'NR==1{print $2}' ${PARFILE}`
...print $2 is because 'SCHEMA1','SCHEMA2','SCHEMA3' is 2nd column in file
echo "$IMPORT_SCHEMA"... (5 Replies)
Discussion started by: DjukaZg
5 Replies
LEARN ABOUT PHP
ibase_pconnect
IBASE_PCONNECT(3) 1 IBASE_PCONNECT(3)
ibase_pconnect - Open a persistent connection to an InterBase database
SYNOPSIS
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)