Sponsored Content
Top Forums Shell Programming and Scripting updating a column in oracle table using shell script Post 71246 by sveera on Monday 9th of May 2005 10:20:56 AM
Old 05-09-2005
Power 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 [ $STATUS -eq 1 ]
sqlplus <<END
username/password@connectstring
@update.sql
commit;
but how to i pass the value of the $STATUS to the .sql ? this value has to go into a column in a table.
Please help
thanks in advance
Veera
 

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

script for updating table using file(

Hi, Data file path (.txt) Control file(.ctl) I have delimited file(|). Sample data: 1|name|50009|DS24|0|12 2|name|30009|DS24|0|13 3|name|20409|DS24|0|14 4|name|20009|DS24|0|15 5|name|10009|DS24|0|16 I want to load this data into a oracle table (update and insert) Please help me... (1 Reply)
Discussion started by: unihp1
1 Replies

4. Shell Programming and Scripting

updating a column in a unix table for a particular row

Hi, I have the following requirement. I have a unix table as below progname par1 par2 par3 par4 PROG1 abc def 0012 ooo PROG2 wed xas 0100 xxx PROG3 kkk ppp 0004 ppp Different programs(ex:PROG1,PROG2..) accesses this table and update... (5 Replies)
Discussion started by: thanuman
5 Replies

5. Shell Programming and Scripting

To update a column in a table through shell script

Hi All, I need to write a shell script in UNIX that should accept booking number as an argument and update it with value "NULL" if the transaction date is greater than 2 years. Booking number and transaction_date are the two columns of the table table_booking. Something like this, through... (3 Replies)
Discussion started by: shilpa_acc
3 Replies

6. Shell Programming and Scripting

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 (2 Replies)
Discussion started by: ken002
2 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

Run the Script from any stage by updating data from Oracle Table.

I have 100 Scripts, each containing 10-15 SQL's in them. Each Script run for 40 mins to 1 hour 30 mins. In the event of Failure in any step, if i re-start the Script, it will start running from the beginning. Which is waste of time. So in order handle this, i made the script to run from the... (7 Replies)
Discussion started by: kiran1992
7 Replies

9. Shell Programming and Scripting

Parameterizing to dynamically generate the extract file from Oracle table using Shell Script

I have below 2 requirements for parameterize the generate the extract file from Oracle table using Shell Script. Could you please help me by modifying the script and show me how to execute it. First Requirement: I have a requirement where I need to parameterize to generate one... (0 Replies)
Discussion started by: hareshvikram
0 Replies
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)
All times are GMT -4. The time now is 06:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy