Thanks for the suggestion with regards to using a global variable. I am not opposed to doing this. I hope that it doesn't get lost on the poor DBAs here who will have to maintain these scripts when I eventually have to move on.
I started working on a proof of concept and hit an unexpected snag using eval. My thought is that I would pass a handle (just a string really) to my database functions and build variables based on the handle. When I try to redirect stdout and stdin to some open file descriptors, I get an error.
eval exec ${TESTVAR_stdout}>&p <==== results in "t[13]: 3: not found"
The previous lines work fine, I am scratching my head on why TESTVAR_stdout isn't expanding properly.
What is more perplexing is If I manually execute the lines with numeric literals, it works. If I manually execute the lines using variable and no "eval", KSH indicates that I have running jobs for stdout and closes my session for stdin.
If I can get past this hurdle, I can implement the concept easily.
Hi,
I have written a daemon process, to perform certain operations in the background.
For this I have to close, the open file descriptors,
Does anybody know how to find out the number of open file descriptors ?
Thanks in Advance,
Sheetal (2 Replies)
Hello all,
A few questions on file descriptors ...
scenario : Sun Ultra 30 with Sun OS 5.5.1 , E250 with Solaris 2.6
In one of my servers, the file descriptor status from the soft limit and hard limits are 64 and 1024 respectively for root user.
Is the soft limit (64) represents the... (3 Replies)
i m trying to learn processes in unix and i've been reading this but i don't quite get it. its regarding file descriptors. : each is a part of file pointers, they point to another area. indexes into an Operating system maintained table called "file descriptor table". one table per process. may... (3 Replies)
I am in a Systems programming class this semester, and our current project is to write a program utilizing sockets and fork. For the project, I decided to make my own instant messaging program. I have the code completed, but I have a problem that keeps old clients from communicating with new... (3 Replies)
Dec 20 15:34:32 hostname sendmail: File descriptors missing on startup: stderr; Bad file number
Dec 20 15:34:32 hostname sendmail: File descriptors missing on startup: stderr; Bad file number
Dec 20 15:34:32 hostname sendmail: File descriptors missing on startup: stderr; Bad file number
Dec... (1 Reply)
Hi All,
This thread is going to be a discussion basically bringing out more information from the experts on cron jobs and the associated file handles.
So, here is the question.
There is definitely a constant ' n ' as the maximum number of file handles alloted to a process ' p '.
Will... (7 Replies)
Hi,
I speak and write english more or less, so I hope my asking be clear.
:)
In the company I am working, they are using control-m software to lunch
shell scripts.
So i put this command in all shell scripts:
export LOGFILE_tmp=$PRODUC_DATA/tmp/${SCRIPT}_${PAIS}_`date... (0 Replies)
What is the difference between a file descriptor and a semaphore?
My basic understanding is:
- a file descriptor is a small positive integer that the system uses instead of the file name to identify an open file or socket.
- a semaphore is a variable with a value that indicates the... (1 Reply)
Hi, I'm playing with KSH
I entered following command in terminal
{ echo "stdout" >&1; echo "stderr" >&2; } > out
And I get only stoud in a new file out.
My question is: Where did my stderr vanish ? (5 Replies)
Discussion started by: solaris_user
5 Replies
LEARN ABOUT PHP
oci_set_edition
OCI_SET_EDITION(3)OCI_SET_EDITION(3)oci_set_edition - Sets the database editionSYNOPSIS
bool oci_set_edition (string $edition)
DESCRIPTION
Sets the database "edition" of objects to be used by a subsequent connections.
Oracle Editions allow concurrent versions of applications to run using the same schema and object names. This is useful for upgrading live
systems.
Call oci_set_edition(3) before calling oci_connect(3), oci_pconnect(3) or oci_new_connect(3).
If an edition is set that is not valid in the database, connection will fail even if oci_set_edition(3) returns success.
When using persistent connections, if a connection with the requested edition setting already exists, it is reused. Otherwise, a different
persistent connection is created
PARAMETERS
o $edition
- Oracle Database edition name previously created with the SQL " CREATE EDITION" command.
NOTES
Note
Oracle version requirement
This function is available from Oracle 11 gR2 onwards.
Caution
Persistent connections
To avoid inconsistencies and unexpected errors, do not use ALTER SESSION SET EDITION to change the edition on persistent connec-
tions.
Caution
DRCP Connection Pooling
To avoid inconsistencies and unexpected errors when using editions and DRCP with Oracle 11.2.0.1, keep a one-to-one correspondence
between the oci8.connection_class and the edition name used by applications. Each pooled server of a given connection class should
only be used with one edition. This restriction has been removed with Oracle 11.2.0.2.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Two scripts can use different versions of myfunc() at the same time
<?php
// File 1
echo "Version 1 of application
";
oci_set_edition('ORA$BASE');
$c = oci_connect('hr', 'welcome', 'localhost/XE');
$s = oci_parse($c, "begin :r := myfunc(); end;");
oci_bind_by_name($s, ":r", $r, 20);
oci_execute($s);
echo "The result is $r
";
?>
<?php
// File 2
echo "Version 2 of application
";
oci_set_edition('E1');
$c = oci_connect('hr', 'welcome', 'localhost/XE');
$s = oci_parse($c, "begin :r := myfunc(); end;");
oci_bind_by_name($s, ":r", $r, 20);
oci_execute($s);
echo "The result is $r
";
?>
PHP Documentation Group OCI_SET_EDITION(3)