Sponsored Content
Top Forums UNIX for Advanced & Expert Users Run only 3 sqlplus session at a time Post 303010847 by ATWC on Monday 8th of January 2018 10:47:29 AM
Old 01-08-2018
Run only 3 sqlplus session at a time

Below code runs n number of session at a time when called. I want to restrict it to run only for 3 sqlplus at a time. Is there a way to do the same.
Code:
for name in `cat abc.txt`
do
(sqlplus -s  usert/password@host <<-EOF>> error.txt
			SET LINESIZE 1000
			select '$name', TO_CHAR(current_timestamp(0),'DD-Mon-YYYY HH24:MI:SS') as start_time from dual;
			EXEC proc('$name');
			select '$name' ,TO_CHAR(current_timestamp(0),'DD-Mon-YYYY HH24:MI:SS') as end_time from dual;
			EOF
 ) &
done
wait

run the below part only if all the loops in the for has completed!
echo "Complete"

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

setting session time

Please lemme know how & where to set the session time for ftp connection in Wu-ftp . Regards Gambhi. (5 Replies)
Discussion started by: gambhi_s
5 Replies

2. UNIX for Dummies Questions & Answers

Session time out

Hi, We have a generic login id :- ship1 . There can be any number of sessions for this login ID. I'm working on a way to log off idle sessions ( not logins) . I searched the forum and found TMOUT. Is it at login level or session level ? ( looks like it is at login level) But I added it to... (2 Replies)
Discussion started by: newtoxinu
2 Replies

3. Shell Programming and Scripting

sqlplus session being able to see unix variables session within a script

Hi there. How do I make the DB connection see the parameter variables passed to the unix script ? The code snippet below isn't working properly. sqlplus << EOF user1@db1/pass1 BEGIN PACKAGE1.perform_updates($1,$2,$3); END; EOF Thanks in advance, Abrahao. (2 Replies)
Discussion started by: 435 Gavea
2 Replies

4. Shell Programming and Scripting

Is it possible..when ftp session disconnect and it can automatic run again?

Hi, Is is possible when ftp script disconnect by remote server and it can restart to tranfer (such as restart in 10 mins, etc)? Please help!!!! (1 Reply)
Discussion started by: happyv
1 Replies

5. UNIX for Dummies Questions & Answers

how to run who am i from remote session

I just moved from AIX 4 to AIX 5.3. the command `who am i` is essential to our logon scripts; but it does not work anymore, it says the process is not attached to a terminal. Is it possible to run this command remotely? It works for remote root sessions. If it is not is there another way to... (2 Replies)
Discussion started by: raidzero
2 Replies

6. UNIX for Advanced & Expert Users

Xserver connect and run CDE session from Windows PC

Hope someone can help. I have 5 Unix Tru64 ver 4.0/5.1B, boxes and I'm trying to connect and run CDE session from my PC. I have tried using Reflections, and Xming with no luck. Can someone tell me what exactly needs to be running on the Tru64 boxes in order for this to work. Along with what or how... (4 Replies)
Discussion started by: Troberts50
4 Replies

7. Shell Programming and Scripting

how to run a command as soon as user exits from session

I need to write a script, where I have to get names of files that are to be deleted from a user and have to delete those files when he exits session. How to set a particular command to be run as soon as user exits from a session? Can somebody help? I have to write a script on linux system.... (3 Replies)
Discussion started by: yashashri
3 Replies

8. Shell Programming and Scripting

How to run scripts within a telnet session?

I want to connect to a remote host using telnet there is no username/password verification just telnet remotehost then I need to input some commands for initialization and then I need to repeat the following commands: cmd argument argument is read from a local file, in this... (1 Reply)
Discussion started by: esolve
1 Replies

9. Shell Programming and Scripting

Need to track what Commands run in a login session

Hi I need to track what commands run in login session in solaris whether it is root or any normal users in bash shell. My actual requirement is that when a user (nomal/root) login into the system, whatever commands he run, it should log into file on specified path . I don't require command... (4 Replies)
Discussion started by: hb00
4 Replies
Atompub::DateTime(3pm)					User Contributed Perl Documentation				    Atompub::DateTime(3pm)

NAME
Atompub::DateTime - A date and time object for the Atom Publishing Protocol SYNOPSIS
# assuming the local timezone is JST (+09:00) use Atompub::DateTime qw(datetime); $dt = datetime; # current time $dt = datetime(DateTime->new); $dt = datetime(1167609600); # UTC epoch value $dt = datetime('20070101090000'); $dt = datetime('2007-01-01 09:00:00'); $dt = datetime('2007-01-01 00:00:00Z'); $dt = datetime('2007-01-01T09:00:00+09:00'); $dt = datetime('2007-01-01T00:00:00Z'); $dt = datetime('Mon, 01 Jan 2007 00:00:00 GMT'); $dt->epoch; # 1167609600 (UTC epoch value) $dt->iso; # 2007-01-01 09:00:00 (in localtime) $dt->isoz; # 2007-01-01 00:00:00Z $dt->w3c; # 2007-01-01T09:00:00+09:00 $dt->w3cz; # 2007-01-01T00:00:00Z $dt->str; # Mon, 01 Jan 2007 00:00:00 GMT my $dt2 = datetime($dt); # copy $dt == $dt2; # compare "$dt"; # $dt->w3c $dt->dt; # DateTime object METHODS
Atompub::DateTime->new([ $str ]) Returns a datetime object representing the time $str. If the function is called without an argument, it will use the current time. datetime([ $str ]) An alias for Atompub::DateTime->new $datetime->epoch Returns UTC epoch value. 1167609600 $datetime->iso Returns a "YYYY-MM-DD hh:mm:ss"-formatted string representing time in the local time zone. 2007-01-01 09:00:00 $datetime->isoz Returns a "YYYY-MM-DD hh:mm:ssZ"-formatted string representing Universal Time. 2007-01-01 00:00:00Z $datetime->w3c Returns a "YYYY-MM-DDThh:mm:ssTZ"-formatted string (W3C DateTime Format) representing time in the local time zone. 2007-01-01T09:00:00+09:00 $datetime->w3cz Returns a "YYYY-MM-DDThh:mm:ssZ"-formatted string (W3C DateTime Format) representing Universal Time. 2007-01-01T00:00:00Z $datetime->str Returns a human readable representation. Mon, 01 Jan 2007 00:00:00 GMT $datetime->dt An accessor for the internal DateTime object. $datetime->tz An accessor for the internal DateTime::TimeZone object. $datetime->fmt An accessor for the internal DateTime::Format object. INTERNAL INTERFACES
$datetime->init $datetime->_parse_timestamp SEE ALSO
Atompub AUTHOR
Takeru INOUE, <takeru.inoue _ gmail.com> LICENCE AND COPYRIGHT
Copyright (c) 2007, Takeru INOUE "<takeru.inoue _ gmail.com>". All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. perl v5.14.2 2011-04-30 Atompub::DateTime(3pm)
All times are GMT -4. The time now is 11:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy