Sponsored Content
Top Forums Shell Programming and Scripting Shell script to query Oracle table Post 302472718 by ken002 on Wednesday 17th of November 2010 11:06:49 PM
Old 11-18-2010
Shell script to query Oracle table

Hi, unix gurnis
I need help for following requirement for writing a shell scritp.
log in to oracle database, query one table total records (select count(*) from table1), pass the return value to a file.


Thanks in advance
ken002
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

update a oracle table using shell script

Hi, I would like to know how to update a table in Oracle database, if a command in one shell script either successfully completes or it fails.(like Y if its success or N if its a failure) While the command is running,I am able to view the log file created in the Unix machine.After the command... (2 Replies)
Discussion started by: ann_124
2 Replies

2. Shell Programming and Scripting

Store return code of shell script in oracle table

Hi friends, I have to do the following things : 1) there should be a shell script returning the returning the return code of the script. and i have to add some more details like on which machine is has run , at what time and other details and then using plsql i have to add a row to Oracle... (3 Replies)
Discussion started by: sveera
3 Replies

3. Shell Programming and Scripting

updating a column in oracle table using shell script

Hi friends, i am having a variable declared in .profile.i am changing its value in a shell script and then i am connecting to oracle and then from there i am calling a .sql called update.sql STATUS is the variable declared in the .profile =============================== if sqlplus <<END... (3 Replies)
Discussion started by: sveera
3 Replies

4. Shell Programming and Scripting

shellscript.query Oracle table..populate in a text file

Hi Guys, I'm new to this forum as well as to UNIX shell scripting. I'm looking for a shellscript to query an Oracle database table and populate the result set of the query in a text file. Could you someone help me out with a sample code? Thanks, Bhagat (7 Replies)
Discussion started by: bhagat.singh-j
7 Replies

5. Shell Programming and Scripting

run oracle query remotly with shell script

hello how to run shell script to excute oracle queries on remote db ? i have tried as following sqlplus -s user/password@remote_server "select query;" but not working also this one sqlplus -s user/password@remote_server `select query;` not working :( i add this line to run another... (4 Replies)
Discussion started by: mogabr
4 Replies

6. Shell Programming and Scripting

Query Oracle tables and return values to shell script that calls the query

Hi, I have a requirement as below which needs to be done viz UNIX shell script (1) I have to connect to an Oracle database (2) Exexute "SELECT field_status from table 1" query on one of the tables. (3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies

7. Shell Programming and Scripting

Shell script to export data from Oracle table .

Hi, I want to write a shell script which will export data from oracle table . I don't want to save that data . I want the queries . Right now i am right clicking on the table and clicking on export as to my desktop . Please let me know if any one have any idea . (2 Replies)
Discussion started by: honey26
2 Replies

8. Shell Programming and Scripting

Shell Script to execute Oracle query taking input from a file to form query

Hi, I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database. For instance: USER CITY --------- ---------- A CITY_A B CITY_B C ... (2 Replies)
Discussion started by: DevendraG
2 Replies

9. Shell Programming and Scripting

How to run a SQL select query in Oracle database through shell script?

I need to run a SQL select query in Oracle database and have to capture the list of retrieved records in shell script. Also i would like to modify the query for certain condition and need to fetch it again. How can i do this? Is there a way to have a persistent connection to oracle database... (9 Replies)
Discussion started by: vel4ever
9 Replies
auditstat(1M)						  System Administration Commands					     auditstat(1M)

NAME
auditstat - display kernel audit statistics SYNOPSIS
auditstat [-c count] [-h numlines] [-i interval] [-n] [-v] DESCRIPTION
auditstat displays kernel audit statistics. The fields displayed are as follows: aud The total number of audit records processed by the audit(2) system call. ctl This field is obsolete. drop The total number of audit records that have been dropped. Records are dropped according to the kernel audit policy. See audi- ton(2), AUDIT_CNT policy for details. enq The total number of audit records put on the kernel audit queue. gen The total number of audit records that have been constructed (not the number written). kern The total number of audit records produced by user processes (as a result of system calls). mem The total number of Kbytes of memory currently in use by the kernel audit module. nona The total number of non-attributable audit records that have been constructed. These are audit records that are not attributable to any particular user. rblk The total number of times that auditsvc(2) has blocked waiting to process audit data. tot The total number of Kbytes of audit data written to the audit trail. wblk The total number of times that user processes blocked on the audit queue at the high water mark. wrtn The total number of audit records written. The difference between enq and wrtn is the number of outstanding audit records on the audit queue that have not been written. OPTIONS
-c count Display the statistics a total of count times. If count is equal to zero, statistics are displayed indefinitely. A time interval must be specified. -h numlines Display a header for every numlines of statistics printed. The default is to display the header every 20 lines. If num- lines is equal to zero, the header is never displayed. -i interval Display the statistics every interval where interval is the number of seconds to sleep between each collection. -n Display the number of kernel audit events currently configured. -v Display the version number of the kernel audit module software. EXIT STATUS
auditstat returns 0 upon success and 1 upon failure. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
auditconfig(1M), praudit(1M), bsmconv(1M), audit(2), auditon(2), auditsvc(2), attributes(5) NOTES
The functionality described in this man page is available only if the Basic Security Module (BSM) has been enabled. See bsmconv(1M) for more information. SunOS 5.10 6 May 1993 auditstat(1M)
All times are GMT -4. The time now is 12:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy