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
mongoconnectionexception
MONGOCONNECTIONEXCEPTION(3) 1 MONGOCONNECTIONEXCEPTION(3)The MongoConnectionException classINTRODUCTION
Thrown when the driver fails to connect to the database.
There are a number of possible error messages to help you diagnose the connection problem. These are:
o No candidate servers found Thrown when the driver cannot establish a connection to MongoDB (fulfilling the ReadPreferences, if
specified).
o No server name given. This error occurs if you pass in "" as the server name, probably because of an typo with string interpola-
tion, e.g., "$servr" instead of "$server".
o
failed to get host [hostname] or port [portnum] from [server]. This indicated that the server string was malformed. "[hostname]"
and "[portnum]" will be as much as the driver could dicipher of it.
o Operation in progress Connecting to the database timed out.
o Transport endpoint is not connected Generally means that the connection string isn't correct, the driver couldn't even find the
database server.
o couldn't determine master No server in a replica set connection was identified as the primary.
o couldn't get host info for [server] This indicated that DNS could not resolve the server address you gave. This could easily be
caused by a typo, for example, "server" instead of "$server".
o Invalid Argument This can be caused by attempting to connect to a machine that is up but that the database isn't actually running
on. Make sure that you've started the database server before connecting.
o Permission denied This means that the socket could not be opened due to permissions issues. On Red Hat variants, this can be
caused by a default setting that does not allow Apache to create network connections. You can override this setting by running:
$ /usr/sbin/setsebool -P httpd_can_network_connect 1
If the error message is not listed above, it is probably an error from the C socket, and you can search the web for its usual cause.
CLASS SYNOPSIS
MongoConnectionException
MongoConnectionExceptionextends
MongoException
PHP Documentation Group MONGOCONNECTIONEXCEPTION(3)