Sponsored Content
Top Forums Shell Programming and Scripting PL SQL Runtimes different in Shell script log Post 302263124 by Nanu_Manju on Sunday 30th of November 2008 10:23:38 PM
Old 11-30-2008
Question PL SQL Runtimes different in Shell script log

Hi,

This run times recorded in UX shell script appears peculiar to me. The PL / SQL stored procedure is called through sqlplus from UNIX shell script and then a log is created with run times recorded.

The first set has actually taken 6 Hrs but the recorded time indicates it is only 2 Hrs and 19 mins

STARTED AT: 29-NOV-08 01.36.23.671837000 PM +00:00-
ENDED AT: 29-NOV-08 02.47.08.250187000 PM +00:00
STARTED AT: 29-NOV-08 03.07.19.281072000 PM +00:00-
ENDED AT: 29-NOV-08 04.15.08.122021000 PM +00:00

Below is the second set that has actually taken 7 Hrs but the recorded time indicates it is only 1 Hr 55 mins

STARTED AT: 29-NOV-08 05.52.57.930690000 PM +00:00-
ENDED AT: 29-NOV-08 06.37.50.285460000 PM +00:00
STARTED AT: 29-NOV-08 06.59.09.941000000 PM +00:00-
ENDED AT: 29-NOV-08 09.29.55.689355000 PM +00:00

I may be missing something because it is a huge difference unless there is something that is technically noticed in the past. I know UNIX itself cannot have such anomoly but with PL / SQL and Oracle, not sure. I am sure the experts here can guide me in the right direction.

Regards,
Manjax
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sql in shell script

Hey I have this shell script that I am trying to run and receive a value from a sql query.Then later use the value in an if stmt... I cannot get this to work for nothing.. Here is the script (sqlplus -s $usrname/$passwrd <<! set head off feed off pagesize 0 select b from table; set head... (9 Replies)
Discussion started by: devaris22
9 Replies

2. Shell Programming and Scripting

Shell script and sql

Hi, I have an issue. There is a file that has got some values seperated by commas. I have to write a shell script that would extrct these values and insert them into a table. How can this be done Thanx in advance (3 Replies)
Discussion started by: sendhil
3 Replies

3. Shell Programming and Scripting

Calling SQL LDR and SQL plus scripts in a shell script

Hi- I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment... I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Discussion started by: rajagavini
5 Replies

4. Shell Programming and Scripting

(Urgent):Creating flat file using sql script and sqlplus from UNIX Shell Script

Hi, I need help urgently for following issue. Pls help me to resolve this issue. I am calling sql script file(file1.sql) from UNIX Shell Script(script1.ksh) using sql plus and trying to create flat file that contains all records returned from SQL query in SQL script(file1.sql) I given... (6 Replies)
Discussion started by: praka
6 Replies

5. Shell Programming and Scripting

How to grep sql error in shell script and exit the script?

I need help in the following script. I want to grep the sql errors insert into the error table and exit the shell script if there is any error, otherwise keep running the scripts. Here is my script #!/bin/csh -f source .orapass set user = $USER set pass = $PASS cd /opt/data/scripts echo... (2 Replies)
Discussion started by: allinshell99
2 Replies

6. Shell Programming and Scripting

Job Runtimes by AWK

Hi , I need to find runtime of jobs. I have written below script to get start and end times for a list of jobs. #!/bin/bash InputFile_Name=/var/tmp/cgk/pre2_oper_status_7amcheck_jobs if then echo "File: $InputFile_Name doesn't exist , Pls check & run again" echo "Exiting... (8 Replies)
Discussion started by: cgk1983
8 Replies

7. Shell Programming and Scripting

pass null value to sql script from korn shell script

There are 4 parameters that I have to pass from korn shell to sql script. 1) I have to check if $1 , $2 , $3 and $4 are null values or not . How can I do that ? 2) Once its determined that these values are null (in the sense they are empty) how can I pass null values to sql script... (11 Replies)
Discussion started by: megha2525
11 Replies

8. Shell Programming and Scripting

Run SQL thru shell script: how to get a new line when run sql query?

Hi, this's Pom. I'm quite a new one for shell script but I have to do sql on shell script to query some information from database. I found a concern to get a new line...When I run my script, it retrieves all data as wondering but it's shown in one line :( What should I do? I'm not sure that... (2 Replies)
Discussion started by: Kapom
2 Replies

9. Shell Programming and Scripting

How to pass Oracle sql script as argument to UNIX shell script?

Hi all, $ echo $SHELL /bin/bash Requirement - How to pass oracle sql script as argument to unix shell script? $ ./output.sh users.sql Below are the shell scripts and the oracle sql file in the same folder. Shell Script $ cat output.sh #!/bin/bash .... (7 Replies)
Discussion started by: a1_win
7 Replies

10. Shell Programming and Scripting

Append date to sql*plus spool (log) file in shell script

SQL*Plus version : 11.2.0.4 OS : Oracle Linux 6.5 SQL*Plus is a client application to connect to oracle database. The log file for this tool is generated via spool command as shown below. I am trying to append date ( $dateString ) to spool file as shown below. $ cat test2.sh #!/bin/bash... (4 Replies)
Discussion started by: kraljic
4 Replies
ac(8)							      System Manager's Manual							     ac(8)

NAME
ac - Outputs connect-session records SYNOPSIS
ac [-dp] [-w filename] [user(s) ...] FLAGS
Outputs the total connect time for each midnight-to-midnight period for which a wtmp file exists. When user(s) is specified, this flag lim- its the output to the login names specified by any user(s) parameter(s). Outputs the connect time total by individual login name of the user specified with the -p flag and the user(s) parameter. Omission of this flag permits a total only for the midnight-to-midnight time period for all logged in users to be produced. Specifies a wtmp file other than the /var/adm/wtmp file. The wtmp file you access for data may have been created automatically by some shell script administration command (for example, runacct) or manually by the system adminis- trator when the original /var/adm/wtmp file becomes too large. DESCRIPTION
The ac command prints to the default output device the total connect time in hours to the nearest hundredth for all users, or the connect time for any user(s) specified with the -p flag. It also prints the names of users specified by the user(s) parameter who have logged in during the life of the current /var/adm/wtmp file. Connect-time records are written by the init and the login programs and are collected in the /var/adm/wtmp file, when such a file exists. When a /var/adm/wtmp file does not exist, no connect-time accounting records are written; consequently, when connect-time records are wanted, the system administrator should create a /var/adm/wtmp file that has an initial record length of 0 (zero). Records in wtmp files (there may be more than one such file) should be processed periodically to keep the files from becoming too large. When you use the runacct command in a shell script, additional wtmp files can be automatically created whenever the current wtmp file becomes too large. You can output the contents of any of these other files when you specify the -w flag and the desired wtmp filename. The ac command is run independently with respect to any accounting shell procedure created or run by any of the acct/* shell procedures or runacct commands. EXAMPLES
To obtain an output of the total connect time for all users who have logged in during the life of the current wtmp data file, enter: /usr/sbin/ac To obtain an output of the total connect time for grossman and mcwhinney as recorded in the default wtmp data file, enter: /usr/sbin/ac grossman mcwhinney To obtain an output of the connect time subtotals for grossman and mcwhinney as recorded in the default wtmp data file, enter: /usr/sbin/ac -p grossman mcwhinney FILES
Specifies the command path. Is the active data file for the collection of connect-time records. RELATED INFORMATION
Commands: login(1), init(8) delim off ac(8)
All times are GMT -4. The time now is 03:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy