10-23-2008
sry.., but i need to run this across db2
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am a novice Unix scripter and need a little advice/help on a script I've written that's causing some problems. We are using Solaris 9 on a Sun box and the script is invoked with the korn shell. I have a two-part question: I wrote a shell script that calls and executes 3 separate sql scripts,... (3 Replies)
Discussion started by: E2004
3 Replies
2. Shell Programming and Scripting
I've a script that fetches various values from the database as below:
#! /bin/ksh
$conn="user/pwd@service_name"
`sqlplus -s << $conn EOF1
@xyz.sql
@pqr.sql
@abc.sql
EOF1`
The output of the script should generate txt files containing the results from queries which are further... (6 Replies)
Discussion started by: manthasirisha
6 Replies
3. Shell Programming and Scripting
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
Hi there,
I am trying to write a shell script as root on AIX 5.3 where I change user to db2inst1, connect to our db2 database, run a sql select query and export the result of the query to a file.
The code I have so far is as follows:-
#!/usr/bin/ksh
su - db2inst1 -c "db2 connect to... (0 Replies)
Discussion started by: candlino
0 Replies
5. Shell Programming and Scripting
I have some alphbetical codes in that (1 Reply)
Discussion started by: kavithakuttyk
1 Replies
6. Shell Programming and Scripting
Can anyone please help me with an unix shell script to connect a DB2 database. My requirement is just to display the no of records present in a table of a DB2 database through Unix Shell script. Thx - Ram (1 Reply)
Discussion started by: onlyraja
1 Replies
7. Programming
Hi Everyone,
I'm basically trying to rewrite a korn shell script that currently runs and execute a db2 SQL and then it presents the output below to the users. I wonder how I can achieve the same in Java using GUI's. Any advise / comments would be highly appreciated. Thanks.
DBNAME ... (1 Reply)
Discussion started by: arizah
1 Replies
8. Shell Programming and Scripting
Hi!
I would like to do a single connection to sqlplus and execute some querys.
Actually I do for every query one connection to database
i.e
echo 'select STATUS from v$instance;
exit' > $SQL_FILE
sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT
echo 'select VERSION from v$instance;... (6 Replies)
Discussion started by: guif
6 Replies
9. Shell Programming and Scripting
Hi All,
Please help me out in executing the following db2 querry in unix
db2 "select AP_RQ_ACQ_INST_ID || ',' || txn_classifier || ',' || AP_RS_RESP_CD || ',' || (count(*) AS COUNT1) || ',' || (SUM(AP_RQ_TXN_AMT) AS TOTAL_AMT) from TXN_RECORD where
CREATE_TS > '2010-11-22 11:00:00.008645' ... (1 Reply)
Discussion started by: dudd9
1 Replies
10. UNIX for Advanced & Expert Users
Hi Experts:
I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
Discussion started by: huasheng8
3 Replies
LEARN ABOUT OPENDARWIN
bos_getrestart
BOS_GETRESTART(8) AFS Command Reference BOS_GETRESTART(8)
NAME
bos_getrestart - Displays the automatic restart times for server processes
SYNOPSIS
bos getrestart -server <machine name> [-cell <cell name>]
[-noauth] [-localauth] [-help]
bos getr -s <machine name> [-c <cell name>] [-n]
[-l] [-h]
DESCRIPTION
The bos getrestart command displays two restart times from the /etc/openafs/BosConfig file on the server machine named by the -server
argument:
o The general restart time at which the BOS Server process automatically restarts itself and all processes marked with status "Run" in
the BosConfig file. The default is Sunday at 4:00 a.m.
o The binary restart time at which the BOS Server automatically restarts any process for which the time stamp on the binary file in the
/usr/lib/openafs directory is later than the last restart time for the process. The default is 5:00 a.m. Use the bos getdate command to
list a binary file's timestamp, and the -long flag to the bos status command to display a process's most recent restart time.
Use the bos setrestart command to set the restart times.
OPTIONS
-server <machine name>
Indicates the server machine for which to display the restart times. Identify the machine by IP address or its host name (either fully-
qualified or abbreviated unambiguously). For details, see bos(8).
-cell <cell name>
Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see bos(8).
-noauth
Assigns the unprivileged identity "anonymous" to the issuer. Do not combine this flag with the -localauth flag. For more details, see
bos(8).
-localauth
Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The bos command interpreter presents the ticket
to the BOS Server during mutual authentication. Do not combine this flag with the -cell or -noauth options. For more details, see
bos(8).
-help
Prints the online help for this command. All other valid options are ignored.
OUTPUT
The output consists of two lines:
Server <machine_name> restarts at <time>
Server <machine_name> restarts for new binaries at <time>
Possible values for <time> include:
o "never", indicating that the BOS Server never performs that type of restart.
o "now", indicating that the BOS Server performs that type of restart only each time it restarts.
o A specified day and time, indicating that the BOS Server performs that type of restart once per week. Example: "sun 4:00 am".
o A specified time, indicating that the BOS Server performs that type of restart once per day. Examples: "11:00 pm", "3:00 am".
EXAMPLES
The following example displays the restart times for the machine "db2.abc.com":
% bos getrestart db2.abc.com
Server db2.abc.com restarts at sun 4:00 am
Server db2.abc.com restarts for new binaries at 2:15 am
In the following example, the issuer abbreviates the machine name "fs1.abc.com" to "fs1", relying on the cell's name server to resolve the
name. The output echoes the abbreviated form.
% bos getrestart fs1
Server fs1 restarts at sat 5:00 am
Server fs1 restarts for new binaries at 11:30 pm
PRIVILEGE REQUIRED
None
SEE ALSO
BosConfig(5), KeyFile(5), bos(8), bos_getdate(8), bos_setrestart(8), bos_status(8)
COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2012-03-26 BOS_GETRESTART(8)