10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello All,
just wanted to export multiple tables from oracle sql using unix shell script to csv file and the below code is exporting only the first table.
Can you please suggest why? or any better idea?
export FILE="/abc/autom/file/geo_JOB.csv"
Export= `sqlplus -s dev01/password@dEV3... (16 Replies)
Discussion started by: Hope
16 Replies
2. Forum Support Area for Unregistered Users & Account Problems
Hi,
I am trying to create a table through shell scripting . I used a command sqlplus -s to connect to sqlplus and user as sysdba. but there is a problem in it. can anyone please solve this .
#!/bin/bash
$(`sqlplus -s / as sysdba <<eof
create table sample (id,int);
insert into sample... (1 Reply)
Discussion started by: Unregistered
1 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I need to get all the members information from an oracle table whose flag value is enabled. Later on i need to perform several computation based upon the flag value and other columns. For example,
Member ID Flag Frequency date
1 ... (2 Replies)
Discussion started by: Krishraj
2 Replies
4. Shell Programming and Scripting
My Code is
get_week_date()
{
`sqlplus -s ${DQM_SQL_LOGON}@${DQM_SID} << EOF
SET ECHO OFF
SET FEEDBACK OFF
SET PAGES 0
SET SERVEROUTPUT ON
SET VERIFY OFF
SET TRIMSPOOL ON
(update file_level_qc fq set FQ.DATA_FILE_NAME='Hyvee_Pharmacy_Solutions_201304_v1.txt'... (2 Replies)
Discussion started by: karthick.cho
2 Replies
5. Shell Programming and Scripting
Buddies, I am writing the below script 'tab.sh' to monitor the tablespaces in Database:-
-------------------------------
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=orcl
sqlplus system/oracle as sysdba <<EOF
spool... (5 Replies)
Discussion started by: sandip250382
5 Replies
6. Shell Programming and Scripting
I am working in production support in an leading bank and more of my job is more in oracle/plsql. I am learning unix shell scripting and have started development in the same.I would like to know regarding the scope of these two in the industry.Also would like to know about other scripting... (2 Replies)
Discussion started by: jesthomas
2 Replies
7. Shell Programming and Scripting
Hi All,
I'm completely new to shell scripting and i've found some old code (10 years), which would be suitable for me to facilitate database shutdowns throughout our systems. I'm on AIX 6 and i'm using 11gr2 Oracle.
The problems seems to be with while read portion of this code:
FLAG_SET=0... (2 Replies)
Discussion started by: Bluegenes
2 Replies
8. Shell Programming and Scripting
Hi,
Please see contains both files created for automating the data from oracle through shell.
1)a_p.ksh
#!/bin/ksh
LOG=/home/A_P.log
MESSAGE=/home/MESSAGE_A_P.txt
mail_list=/home/AP_MAIL_LIST.txt
data=/home/spooled_A_P.log
echo "`date` Starting execution for A_P COUNT" > $LOG
... (2 Replies)
Discussion started by: fidelis
2 Replies
9. Shell Programming and Scripting
Hello folks,
Please find the below code:(sample5.sh -> filename)
echo "Selecting dat afrom Cause code"
echo "set appinfo Causecode
$preamble
set serveroutput on size 10000
select * from RMI003_CAUSE_CODE /" | sqlplus -S $username@$hoststring/$password >> test2.dat
When i tried executing... (5 Replies)
Discussion started by: sundar_ravi4
5 Replies
10. Shell Programming and Scripting
Hi guys,
I have searched all the forums and searched the net as much as possible, but I carn't find any tutorials about shell scripting with Oracle. Has anyone come across any?
Thanks for reading and in advance of posts,
B14... (2 Replies)
Discussion started by: B14speedfreak
2 Replies
BBHOSTGREP(1) General Commands Manual BBHOSTGREP(1)
NAME
bbhostgrep - pick out lines in bb-hosts
SYNOPSIS
bbhostgrep --help
bbhostgrep --version
bbhostgrep [--noextras] [--test-untagged] [--bbdisp] [--bbnet] TAG [TAG...]
DESCRIPTION
bbhostgrep(1) is for use by extension scripts that need to pick out the entries in a bb-hosts file that are relevant to the script.
The utility accepts test names as parameters, and will then parse the bb-hosts file and print out the host entries that have at least one
of the wanted tests specified. Tags may be given with a trailing asterisk '*', e.g. "bbhostgrep http*" is needed to find all http and https
tags.
The bbhostgrep utility supports the use of "include" directives inside the bb-hosts file, and will find matching tags in all included
files.
If the DOWNTIME or SLA tags are used in the bb-hosts(5) file, these are interpreted relative to the current time. bbhostgrep then outputs
a "INSIDESLA" or "OUTSIDESLA" tag for easier use by scripts that want to check if the current time is inside or outside the expected uptime
window.
OPTIONS
--noextras
Remove the "testip", "dialup", "INSIDESLA" and "OUTSIDESLA" tags from the output.
--test-untagged
When using the BBLOCATION environment variable to test only hosts on a particular network segment, bbtest-net will ignore hosts that
do not have any "NET:x" tag. So only hosts that have a NET:$BBLOCATION tag will be tested.
With this option, hosts with no NET: tag are included in the test, so that all hosts that either have a matching NET: tag, or no
NET: tag at all are tested.
--no-down[=TESTNAME]
bbhostgrep will query the Xymon server for the current status of the "conn" test, and if TESTNAME is specified also for the current
state of the specified test. If the status of the "conn" test for a host is non-green, or the status of the TESTNAME test is dis-
abled, then this host is ignored and will not be included in the output. This can be used to ignore hosts that are down, or hosts
where the custom test is disabled.
--bbdisp
Search the bb-hosts file following include statements as a BBDISPLAY server would.
--bbnet
Search the bb-hosts file following include statements as a BBNET server would.
EXAMPLE
If your bb-hosts file looks like this
192.168.1.1 www.test.com # ftp telnet !oracle
192.168.1.2 db1.test.com # oracle
192.168.1.3 mail.test.com # smtp
and you have a custom Xymon extension script that performs the "oracle" test, then running "bbhostgrep oracle" would yield
192.168.1.1 www.test.com # !oracle
192.168.1.2 db1.test.com # oracle
so the script can quickly find the hosts that are of interest.
Note that the reverse-test modifier - "!oracle" - is included in the output; this also applies to the other test modifiers defined by Xymon
(the dialup and always-true modifiers).
If your extension scripts use more than one tag, just list all of the interesting tags on the command line.
bbhostgrep also supports the "NET:location" tag used by bbtest-net, so if your script performs network checks then it will see only the
hosts that are relevant for the test location that the script currently executes on.
USE IN EXTENSION SCRIPTS
To integrate bbhostgrep into an existing script, look for the line in the script that grep's in the $BBHOSTS file. Typically it will look
somewhat like this:
$GREP -i "^[0-9].*#.*TESTNAME" $BBHOSTS | ... code to handle test
Instead of the grep, we will use bbhostgrep. It then becomes
$BBHOME/bin/bbhostgrep TESTNAME | ... code to handle test
which is simpler, less error-prone and more efficient.
ENVIRONMENT VARIABLES
BBLOCATION
If set, bbhostgrep outputs only lines from bb-hosts that have a matching NET:$BBLOCATION setting.
BBHOSTS
Filename for the Xymon bb-hosts(5) file.
FILES
$BBHOSTS
The Xymon bb-hosts file
SEE ALSO
bb-hosts(5), hobbitserver.cfg(5)
Xymon Version 4.2.3: 4 Feb 2009 BBHOSTGREP(1)