Hi my UNIX Friends,
Im calling some SQL scripts through Unix Shell scripting.
How do I export the value of PL/SQL variable value into a Unix shell script variable?
Also could any one inform me about the 'search' and 'cut' utility of PL/SQL
(like 'grep' and 'cut' in Shell scripting).
... (10 Replies)
Hi Folks,
This is a small chunk of the bigger problem which i am facing and some help here will help me resolve the rest of the issue.
Problem is that i need to pass the value of a variable from a shell script to a SQL query (infact a lot of SQL's)
i have the following solution but somehow... (4 Replies)
hi I all ,
I have sql statment in my shell script , I pass two argument to the script I need to pass the this two arguments to the sql statment
example :
runsql.sh "1" "2"
sql :
updat tables_x set y=0
where
A=:x should subsituted by "1"
and
B=:y shuold subsituted bt "2"... (1 Reply)
Hi Gurus,
i have one requirement in unix script, i have a file called abc.txt in that few lines are there with the empid, i need to read each line and pass to .sql script.
ex:
abc.txt
2345
2346
1243
1234
i need to pass these arguments to .sql script rom unix
ex:
select * from... (1 Reply)
Hi Everyone,
Can anyone help me how do i call hash variable in to sql query in perl. Please see the script below
i have defined two Hash %lc and %tab as below
$lc{'REFF'}='V_RES_CLASS';
$lc{'CALE'}='V_CAP_CLASS';
$lc{'XRPD'}='V_XFMR_CLASS';
$tab{'V_RES_CLASS'}='V_MFR_SERS';... (6 Replies)
I have a requirement where i have a sql file (filetext.sql). This file contains a variable ss_code.
Now in a shell script im trying to replace the variable ss_code with a value contained in the shell script variable MTK_DC..tried the below in the script
MTK_DC="mit,cit,bit"
OUT=`awk -v... (4 Replies)
Here is the requirement, When I run the "run file KSH (sql)", it should substitute
'${pCW_Bgn_DT}' with 201120
and
'${pCW_End_DT}' with 201124
Input File
----------
$ cat prevwk.dat
201124 20110711
run file KSH (sql)
------------------
In this file, I want to use the variables... (1 Reply)
Hi Guys,
I am trying to pass a string variable from Unix shell script to sqlplus as a parameter.
I have tried using single quotes with the variable name but it does not work. Please help me with it.
I am using BASH.
My code:
Your help is much appreciated.
Thanks,
shil (2 Replies)
How to pass variable to sql file.
Im tryin in two ways,
Method 1:
my.sql
select * from table where col1 = '$1' and col2 = 'text';
Method 1execute: dbaccess database my.sql $var
Method2:
select * from table col1 in (`cat inputfile`) and col2 = 'text';
method... (2 Replies)
OS Solaris 10,
DB oracle 10g
Hello,
We currently have a BASH script that runs and moves image files from a remote server to the local db server. A snippet of the code shows that we are picking up all Images that are 'mtime -1'
some code...
for file in `ssh user@10.200.200.10 'find... (3 Replies)
Discussion started by: JonP
3 Replies
LEARN ABOUT DEBIAN
dspam_maintenance
dspam_maintenance(1) User Commands dspam_maintenance(1)NAME
dspam_maintenance - remove old signatures and unimportant tokens from the DSPAM storage backend
SYNOPSIS
dspam_maintenance [--profile=PROFILE] [--logdays=no_of_days] [--signatures=no_of_days] [--neutral=no_of_days] [--unused=no_of_days]
[--hapaxes=no_of_days] [--hits1s=no_of_days] [--hits1i=no_of_days] [--without-sql-purge] [--with-sql-automatization] [--with-sql-autoup-
date] [--purgescriptdir=directory] [--with-all-drivers] [--verbose]
DESCRIPTION
dspam_maintenance is used to remove old signatures/tokens and unimportant tokens from the DSPAM storage backend and purge old log entries
in user and system logs.
This script can be called from the command line or run from within cron. Either add a line in your crontab or add this script in your
cron.{hourly,daily,weekly,monthly}. Running this script every hour might not be the best idea but it's your decision if you want to do so.
OPTIONS --profile=PROFILE
Specify a storage profile from dspam.conf. The storage profile selected will be used for all database connectivity.
NOTE: See dspam.conf for more information.
--logdays=no_of_days
All log entries older than no_of_days days will be removed.
NOTE: Default is 31 days. (for more info: man dspam_logrotate)
--signatures=no_of_days
All signatures older than no_of_daysdays will be removed.
NOTE: Default value is set by the PurgeSignatures option in dspam.conf, if this option is not set, the default value is 14 days.
This option is only used for the Hash driver.
--neutral=no_of_days
Deletes all tokens from the target users database whose probability is between 0.35 and 0.65 (fairly neutral, useless data).
NOTE: Default value is set by the PurgeNeutral option in dspam.conf, if this option is not set, the default value is 90 days.
--unused=no_of_days
Remove stale tokens which have not been used for a long period of time.
NOTE: Default value is set by the PurgeUnused option in dspam.conf, if this option is not set, the default value is 90 days.
--hapaxes=no_of_days
Remove tokens with a total hit count below 5 (which will be assigned a hapaxial value by DSPAM).
NOTE: Default value is set by the PurgeHapaxes option in dspam.conf, if this option is not set, the default value is 30 days.
--hits1s=no_of_days
Remove tokens with a single SPAM hit.
NOTE: Default value is set by the PurgeHits1S option in dspam.conf, if this option is not set, the default value is 15 days.
--hits1i=no_of_days
Remove tokens with a single INNOCENT hit.
NOTE: Default value is set by the PurgeHits1I option in dspam.conf, if this option is not set, the default value is 15 days.
--without-sql-purge
Do not use SQL based purging. Only run dspam_clean.
NOTE: Default is off (aka: use SQL based purging).
--with-sql-optimization
Run VACUUM (for PostgreSQL/SQLite) and/or OPTIMIZE (for MySQL).
NOTE: Default is off (aka: do not use optimizations).
--with-sql-autoupdate
Run SQL based purging with purge day values passed to dspam_maintenance.
NOTE: Default is off (aka: do not attempt to modify SQL instructions).
--purgescriptdir=directory
Space separated list of directories where to search for SQL files used for the SQL based purging.
--with-all-drivers
Process all installed storage drivers (not just the active driver).
NOTE: Default is true (aka: process all installed drivers).
--verbose
Verbose output while running maintenance script.
EXIT VALUE
0 Operation was successful.
other Operation resulted in an error. Run the script with --verbose to get more information about error.
COPYRIGHT
Copyright (C) 2002-2010 DSPAM Project
All rights reserved.
For more information, see http://dspam.sourceforge.net.
SEE ALSO dspam(1), dspam_admin(1), dspam_clean(1), dspam_crc(1), dspam_dump(1), dspam_logrotate(1), dspam_merge(1), dspam_stats(1), dspam_train(1)dspam_maintenance Apr 26, 2010 dspam_maintenance(1)