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
DBIx::Class::Storage::DBI::Oracle::Generic(3)		User Contributed Perl Documentation	     DBIx::Class::Storage::DBI::Oracle::Generic(3)

NAME
DBIx::Class::Storage::DBI::Oracle::Generic - Oracle Support for DBIx::Class SYNOPSIS
# In your result (table) classes use base 'DBIx::Class::Core'; __PACKAGE__->add_columns({ id => { sequence => 'mysequence', auto_nextval => 1 } }); __PACKAGE__->set_primary_key('id'); # Somewhere in your Code # add some data to a table with a hierarchical relationship $schema->resultset('Person')->create ({ firstname => 'foo', lastname => 'bar', children => [ { firstname => 'child1', lastname => 'bar', children => [ { firstname => 'grandchild', lastname => 'bar', } ], }, { firstname => 'child2', lastname => 'bar', }, ], }); # select from the hierarchical relationship my $rs = $schema->resultset('Person')->search({}, { 'start_with' => { 'firstname' => 'foo', 'lastname' => 'bar' }, 'connect_by' => { 'parentid' => { '-prior' => { -ident => 'personid' } }, 'order_siblings_by' => { -asc => 'name' }, }; ); # this will select the whole tree starting from person "foo bar", creating # following query: # SELECT # me.persionid me.firstname, me.lastname, me.parentid # FROM # person me # START WITH # firstname = 'foo' and lastname = 'bar' # CONNECT BY # parentid = prior personid # ORDER SIBLINGS BY # firstname ASC DESCRIPTION
This class implements base Oracle support. The subclass DBIx::Class::Storage::DBI::Oracle::WhereJoins is for "(+)" joins in Oracle versions before 9.0. METHODS
get_autoinc_seq Returns the sequence name for an autoincrement column datetime_parser_type This sets the proper DateTime::Format module for use with DBIx::Class::InflateColumn::DateTime. connect_call_datetime_setup Used as: on_connect_call => 'datetime_setup' In connect_info to set the session nls date, and timestamp values for use with DBIx::Class::InflateColumn::DateTime and the necessary environment variables for DateTime::Format::Oracle, which is used by it. Maximum allowable precision is used, unless the environment variables have already been set. These are the defaults used: $ENV{NLS_DATE_FORMAT} ||= 'YYYY-MM-DD HH24:MI:SS'; $ENV{NLS_TIMESTAMP_FORMAT} ||= 'YYYY-MM-DD HH24:MI:SS.FF'; $ENV{NLS_TIMESTAMP_TZ_FORMAT} ||= 'YYYY-MM-DD HH24:MI:SS.FF TZHTZM'; To get more than second precision with DBIx::Class::InflateColumn::DateTime for your timestamps, use something like this: use Time::HiRes 'time'; my $ts = DateTime->from_epoch(epoch => time); relname_to_table_alias DBIx::Class uses DBIx::Class::Relationship names as table aliases in queries. Unfortunately, Oracle doesn't support identifiers over 30 chars in length, so the DBIx::Class::Relationship name is shortened and appended with half of an MD5 hash. See "relname_to_table_alias" in DBIx::Class::Storage. with_deferred_fk_checks Runs a coderef between: alter session set constraints = deferred ... alter session set constraints = immediate to defer foreign key checks. Constraints must be declared "DEFERRABLE" for this to work. ATTRIBUTES
Following additional attributes can be used in resultsets. connect_by or connect_by_nocycle Value: \%connect_by A hashref of conditions used to specify the relationship between parent rows and child rows of the hierarchy. connect_by => { parentid => 'prior personid' } # adds a connect by statement to the query: # SELECT # me.persionid me.firstname, me.lastname, me.parentid # FROM # person me # CONNECT BY # parentid = prior persionid connect_by_nocycle => { parentid => 'prior personid' } # adds a connect by statement to the query: # SELECT # me.persionid me.firstname, me.lastname, me.parentid # FROM # person me # CONNECT BY NOCYCLE # parentid = prior persionid start_with Value: \%condition A hashref of conditions which specify the root row(s) of the hierarchy. It uses the same syntax as "search" in DBIx::Class::ResultSet start_with => { firstname => 'Foo', lastname => 'Bar' } # SELECT # me.persionid me.firstname, me.lastname, me.parentid # FROM # person me # START WITH # firstname = 'foo' and lastname = 'bar' # CONNECT BY # parentid = prior persionid order_siblings_by Value: ($order_siblings_by | @order_siblings_by) Which column(s) to order the siblings by. It uses the same syntax as "order_by" in DBIx::Class::ResultSet 'order_siblings_by' => 'firstname ASC' # SELECT # me.persionid me.firstname, me.lastname, me.parentid # FROM # person me # CONNECT BY # parentid = prior persionid # ORDER SIBLINGS BY # firstname ASC AUTHOR
See "AUTHOR" in DBIx::Class and "CONTRIBUTORS" in DBIx::Class. LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.18.2 2014-01-22 DBIx::Class::Storage::DBI::Oracle::Generic(3)
All times are GMT -4. The time now is 10:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy