I have created a script as instructed above and ran it.
Can you please expain how this works.
Does it create different threads and execute it in different sessions.
For me its giving a big error in sql as its not able to decrypt the password.
There is a line to decrypt password and I have copied it in both main script and sunscript but still its not working. Its displaying as below.
username/@database
I don't know why but its not able to retain the password.
Since its not able to logon so its not executing the query.
May be I am not interpreting it correctly.
So I am pasting the big error below.
Code:
SQL*Plus: Release 10.2.0.2.0 - Production
reprompting on error.
Runs the specified SQL*Plus script from a web server (URL) or the
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
-M "<options>" Sets automatic HTML markup of output. The options
local file system (filename.ext) with specified parameters that
have the form:
will be assigned to substitution variables in the script.
Usage 1: sqlplus -H | -V
HTML [ON|OFF] [HEAD text] [BODY text] [TABLE text]
+ [ 0 -ne 0 ]
+ echo export report_run_date=07/12/2010
-H Displays the SQL*Plus version and the
[ENTMAP {ON|OFF}] [SPOOL {ON|OFF}] [PRE[FORMAT] {ON|OFF}]
usage help.
When SQL*Plus starts, and after CONNECT commands, the site profile
-R <level> Sets restricted mode to disable SQL*Plus commands
-V Displays the SQL*Plus version.
that interact with the file system. The level can
be 1, 2 or 3. The most restrictive is -R 3 which
(e.g. $ORACLE_HOME/sqlplus/admin/glogin.sql) and the user profile
Usage 2: sqlplus [ [<option>] [<logon>] [<start>] ]
disables all user commands interacting with the
(e.g. login.sql in the working directory) are run. The files may
<option> is: [-C <version>] [-L] [-M "<options>"] [-R <level>] [-S]
file system.
contain SQL*Plus commands.
-S Sets silent mode which suppresses the display of
-C <version> Sets the compatibility of affected commands to the
Refer to the SQL*Plus User's Guide and Reference for more information.
version specified by <version>. The version has
the SQL*Plus banner, prompts, and echoing of
the form "x.y[.z]". For example, -C 10.2.0
commands.
-L Attempts to log on just once, instead of
<logon> is: (<username>[/<password>][@<connect_identifier>] | /)
reprompting on error.
[AS SYSDBA | AS SYSOPER] | /NOLOG
-M "<options>" Sets automatic HTML markup of output. The options
have the form:
Specifies the database account username, password and connect
HTML [ON|OFF] [HEAD text] [BODY text] [TABLE text]
identifier for the database connection. Without a connect
[ENTMAP {ON|OFF}] [SPOOL {ON|OFF}] [PRE[FORMAT] {ON|OFF}]
identifier, SQL*Plus connects to the default database.
-R <level> Sets restricted mode to disable SQL*Plus commands
that interact with the file system. The level can
The AS SYSDBA and AS SYSOPER options are database administration
be 1, 2 or 3. The most restrictive is -R 3 which
privileges.
disables all user commands interacting with the
+ [ 0 -ne 0 ]
file system.
The /NOLOG option starts SQL*Plus without connecting to a
database.
-S Sets silent mode which suppresses the display of
the SQL*Plus banner, prompts, and echoing of
<start> is: @<URL>|<filename>[.<ext>] [<parameter> ...]
commands.
Runs the specified SQL*Plus script from a web server (URL) or the
<logon> is: (<username>[/<password>][@<connect_identifier>] | /)
local file system (filename.ext) with specified parameters that
will be assigned to substitution variables in the script.
[AS SYSDBA | AS SYSOPER] | /NOLOG
When SQL*Plus starts, and after CONNECT commands, the site profile
Specifies the database account username, password and connect
(e.g. $ORACLE_HOME/sqlplus/admin/glogin.sql) and the user profile
+ 0<<
identifier for the database connection. Without a connect
(e.g. login.sql in the working directory) are run. The files may
identifier, SQL*Plus connects to the default database.
contain SQL*Plus commands.
Refer to the SQL*Plus User's Guide and Reference for more information.
The AS SYSDBA and AS SYSOPER options are database administration
privileges.
If I execute this script:
$ORACLE_HOME/bin/sqlplus -s <<EOF > oracle.log
$DB_id/$DB_pswd@$DB_server
start test.sql
EOF
the sql script executes with no errors.
IF I execute the following script:... (12 Replies)
i have script say some_script.ksh that takes an argument
I need to run some_script.ksh in background parallely at the sametime with different arguments.
Once all the background jobs complete, i need to run this script again in parallel with another 5 set of arguments.
Would really... (1 Reply)
Hi All,
I have 3 shell scripts, Script1,Script2 and Script3. Now I want to run Script1 and Script2 in parallel and Script3 should depend on successful completion of both Script1 and Script2.
Could you please suggest an approach of acheiving this...
Thanks in advance (2 Replies)
Hello,
I have a shell script "Test.ksh" and I need to pass 8 parameters/arguments while executing the script
./Test.ksh 1 2 3 4 5 6 7 8
Out of these I want first 3 to be compulsory and rest 5 to be optional. Can you suggest the way to do this like and also how to pass these optional... (3 Replies)
Hi,
I am stuck into a situation where i want to execute a command in my shell script well along with a previous command in order to achieve something but i am not figuring out a way.
here is a snippet:
service management restart
rm -rf lock.file
in the above, if you see, i am trying to... (5 Replies)
i have 3 sqls , sql 1 and sql 2 shuld run in parallel , but sql 3 should run after completion f sql1 nd sql2, my code is as below, please suggest the changes
sqlplus username1/password1@DB1 @sql >> log1 &
sqlplus username2/password2@DB2 @sql2 >> log1 &
how can i execute the... (7 Replies)
I have n number of SQL queries needs to executed in Shell. Result of this query need to assign in a variable. Once all the queries are executed script needs to exit.
Sample Query:
SQL 1: Select Count(*) from TABLE GROUP BY COL1,COL2
SQL 2: Select Count(*) from TABLE GROUP BY COL1,COL2
... (2 Replies)
Hi ,
I have a script which is using a text file as I/P.
I want a code where it reads n lines from this file and pass the parameters to a function and now this script should run in such a way where a function can be called in parallel with different parameters. Please find below my script, it... (1 Reply)
Hello,
This is my Script which configure a list of nodes. ( 40 nodes, and the configuration 10 minutes)
#! /bin/sh
if
then
echo "USE: ./start.sh nodes
else
nb_lignes=`wc -l $1 | cut -d " " -f1`
echo "$nb_lignes machines"
for i in $(seq $nb_lignes)
//instructions
done
fi
My... (2 Replies)
Hi Folks,
I have requirement to pull a bunch of SQL's from a table in DB and execute them in parallel and update the status of each query as and when they complete. Can you please help me with ideas on how this can be achieved?
create table list_of_sql
(
id number,
full_sql... (3 Replies)