03-27-2003
here is another way:
horiz=`sqlplus -s scott/tiger@test_db <<END
set pagesize 0
set feedback off
set heading off
set echo off
set verify off
select sysdate from dual;
exit;
END`
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I cannot figure out how to run a SQL script, or just a sqlplus query, from a shell script (bash or ksh). Basically, I need to su - oracle from root and run a query, then test the exit status. (3 Replies)
Discussion started by: 98_1LE
3 Replies
2. Shell Programming and Scripting
Hi ALL,
I need an help in connecting to oracle database, executing a select query and printing it on the screen. Can any one please write a simple code or psuedo code and let me know.
select query returns multiple values( say select name from emp)
Thanks in advance
LM (1 Reply)
Discussion started by: lijju.mathew
1 Replies
3. Shell Programming and Scripting
Hi I am getting this error while connecting to sql through a shell script, whereas i am able to connect to sql directly.
It was working properly earlier, no clue why i am getting this.
Please find the log below:
FTP to <IP> completed Wed Apr 30 11:42:01 BST 2008
Program ended. Wed Apr 30... (1 Reply)
Discussion started by: nehak
1 Replies
4. Shell Programming and Scripting
query sql using shell script, is it possible?
my friend told me to do a file.sql and link to my shell script, but can i query sql using shell script?
thanks in advance! (2 Replies)
Discussion started by: kingpeejay
2 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
In a Shell scriipt with a SQL block I want to issue a query against a local DB and a remote DB on a remote server. The shell script is running locally.
This is how I connect to the local server. But I want the query to reference remote table in the join. Question can I specify a... (1 Reply)
Discussion started by: daveu7
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have one SQL file prepared in UNIX and one script that is executing that.
In SQL i have Update and create queries.
I want to introduce conditions in SQL file (in UNIX) that if either of the create or update query failes whole transaction should be rollback.
I just have 1 create... (2 Replies)
Discussion started by: abhii
2 Replies
7. Red Hat
hey , i am using this code to store value of a sql query and and then use
it in other query but after some time , but it is not working. please help
#!/bin/bash
val_1=$( sqlplus -s rte/rted2@rel76d2 << EOF
setting heading off
select max(stat_id) from cvt_stats;
exit
EOF
)
nohup... (5 Replies)
Discussion started by: ramsavi
5 Replies
8. Shell Programming and Scripting
Hi All,
I have a query with output below
select 'create synonym "'||TABLE_NAME||'" for '||Table_owner||'."'||table_name||'"'||chr(59) from user_synonyms;
==================
create synonym "RV_SBC_SIG" for WFCONTROLLER_TE."RV_SBC_SIG";
create synonym "AQM_TASK" for AWQM_TE."AQM_TASK";... (2 Replies)
Discussion started by: pvmanikandan
2 Replies
9. Shell Programming and Scripting
Hi I would like to embed a sql query in my shell script.
Also, before any the sql query is executed, i would like to validate username and password. (1 Reply)
Discussion started by: arghadeep adity
1 Replies
10. Shell Programming and Scripting
Hello All,
I'm trying to put together a shell script that will:
1. connect to an oracle database
2. execute a query
3. save the output to a csv file
I know that I can execute the sqlplus -s user/pass @dbsid and get logged in. What I would like to do is have my query in a separate text... (9 Replies)
Discussion started by: bbbngowc
9 Replies
LEARN ABOUT DEBIAN
tigercron
TIGERCRON(8) Administrator Commands TIGERCRON(8)
NAME
tigercron - Cron utility for Tiger UNIX Security Checker
SYNOPSIS
tigercron [controlfile] [-B basedir] [tigeroptions...]
DESCRIPTION
Tigercron is used to run periodically checks from the Tiger UNIX Security Checker. Tigercron reads a control file which is usually located
in '/etc/tiger/cronrc' although it can also be specificied as the first argument when calling the program. The format of this control file
is the same as for the cron program, each line indicates when different checks from Tiger will be run. The user can indicate where Tiger
is installed through the -B basedir parameter, any other additional options provided in the command line will be passed on to configure to
configure Tiger based on them (as described in tiger (8)).
Tigercron runs the specified checks and compares their reports with previous stored reports (under /var/log/tiger). It will then mail the
user defined in '/etc/tiger/tigerrc' (Tiger_Mail_RCPT) the results.
When a module is run, tigercron checks:
o If Tiger_Cron_Template is set to Y in tigerrc. If it is, it checks if there is a template stating which are the expected results.
o If Tiger_Cron_CheckPrev is set to Y in tigerrc. If it is, it checks if there is a previous run of the module it can check against.
A differential report is generated depending on the module reports and previous run and is sent through e-mail. These reports provide an
easy way to detect intrusions even if no configuration of templates has been done. In the event of an intrusion a Tiger check might detect
something specific (file changes, new processes, new users, etc.) and this alert mechanism provides a way to turn Tiger into a Host Intru-
sion Detection System (HIDS).
The ability of it to work as a proper HIDS is based on a good customization of the cronrc file. Modules that check events to which the host
is most exposed to should be run often in order to detect deviations from normal behaviour.
OPTIONS
Tigercron uses the same options as Tiger. A controlfile can be defined also to override the default.
FILES
/etc/tiger/tigerrc
Configuration file for the Tiger tool.
/etc/tiger/cronrc
Configuration file for the Tigercron tool.
/var/log/tiger
Location of the log messages generated by Tiger when run through cron
/var/lib/tiger/work
Working directory used by Tiger scripts to create temporary files.
SEE ALSO
tigexp(8),tiger(8),cron(8),crontab(5)
The deficiencies of using tigercron as a HIDS are described in the file README.hostids which is provided with the package. In Debian
GNU/Linux you will find this (and other related) documentation at /usr/share/doc/tiger/
BUGS
Currently Tigercron has only one alert mechanism (mail) and signatures are not supported. Thus, alerts could be faked. Also, it is depen-
dant on cron and will not work if cron is not working.
AUTHOR
This manpage was written by Javier Fernandez-Sanguino.
Security 19 September 2003 TIGERCRON(8)