First post; Extracting data from Oracle WSM


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting First post; Extracting data from Oracle WSM
# 1  
Old 06-27-2012
First post; Extracting data from Oracle WSM

Hello all,

I'll try to be as descriptive as possible, but the issue was described extremely vague to me. Essentially, we were running a performance test today and ran into configuration mismatch issues with our Oracle Web Services Manager, which in the end caused delays in our efforts. I believe it is possible to create a validation script which would confirm all of the registered services in WSM are actually valid, however my intermediate knowledge of bash scripting has me somewhat perplexed. At a high level, the script needs to:

-Pull the target WSDL's out of the Oracle WSM database
-Loop through each and confirm accessibility within ( for all you Oracle fans out there) Soa 11g
-Report back the overall status


I understand it's fairly specific, but any help would be appreciated. Thanks.
# 2  
Old 06-30-2012
Welcome to the forum.

Not aware of all the things you explained.

Quote:
-Pull the target WSDL's out of the Oracle WSM database
How do you get them?

If you could post the pseudo/high level code, we could help you in automation.
# 3  
Old 07-02-2012
Thanks for the response. I was able to run he code successfully, and get output. Now it will just be a matter of getting it to loop through multiple databases, and also reformat the output into something that is usable.
Code:
 
#!/bin/bash
set -x

#variables
dbs="database"
 
which sqlplus > /dev/null 2>&1
if (( $? > 0 ))
then
   export ORACLE_HOME="/l01/apps/oracle/soa_as_1"
   export PATH=$ORACLE_HOME/bin:$PATH
fi
 
#loop through the database and confirm accessibility to SOA 11g
for dbinst in ${dbs}
do
        if [ ${dbinst} == "database" ]; then prefix="dev"; password="password"; fi
 
sqlplus orawsm/${password}@${dbinst} <<EOF
select service_wsdl_url from services
where service_status = 'A';
EOF
 
echo "Done"
 
done

Moderator's Comments:
Mod Comment Please view this code tag video for how to use code tags when posting code and data.

Last edited by vbe; 07-02-2012 at 01:24 PM..
# 4  
Old 07-03-2012
Alright, so I got the output I'm looking for, as well as the script to loop through multiple databases. Once the script is run, the sql query returns a large number of results for each database, so the user needs to scroll back in order to view if each connection was valid or not. Now what I need is possibly another script to run following this one, displaying which database connections were VALID or INVALID to the user. One thought I had would be to run this script which would print the data to a text file, then follow up with another the user could run which would pull the useful information from the text file, and display it on the screen. Thoughts?

Code:
 
#!/bin/bash
set -x
 
#variables
dbs="ixabc101 ix123101"
 
which sqlplus > /dev/null 2>&1
if (( $? > 0 ))
then
   export ORACLE_HOME="/l01/apps/oracle/soa_as_1"
   export PATH=$ORACLE_HOME/bin:$PATH
fi
 
#loop through the database and confirm accessibility to SOA 11g
for dbinst in ${dbs}
do
    if [ ${dbinst} == "ixabc101" ]; then prefix="dev"; password="abc11g"; fi
    if [ ${dbinst} == "ix123101" ]; then prefix="test"; password="12311g"; fi
 
#run sql query against database
echo "Now running WSDL validation for ${dbinst}..."
sqlplus orawsm/${password}@${dbinst} <<EOF
    set heading off;
    set feedback off;
    set pagesize 0;
    set newpage 0;
    select service_wsdl_url from services
    where service_status = 'A';
EOF
 
echo ${URL}|sed s/8001/8142/|xargs
 
if (( $? == 0 )); then echo "VALID";
else
    echo "NOT VALID";
fi
done


Last edited by hammockboard007; 07-03-2012 at 02:39 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

UNIX spool command not extracting complete record from the Oracle table

Hello All, I'm trying to spool an oracle table data into a csv file on unix server but the complete record is not being extracted. The record is almost 1000 characters but only 100 characters are being extracted and rest of the data getting truncated. I'm setting below options : SET... (4 Replies)
Discussion started by: venkat_reddy
4 Replies

2. Shell Programming and Scripting

extracting data

I have a txt file of the following format >ab_ qwerty >rt_ hfjkil >Ty2 hglashglkasghkf; >P2 aklhfklflkkgfgkfl >ui_ vnllkdskkkffkfkkf >we32 vksksjksj;lslsf'sk's's .... ..... I want to split this big file based on the header (>) (5 Replies)
Discussion started by: Lucky Ali
5 Replies

3. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

4. UNIX for Advanced & Expert Users

telnet to an aix box and run wsm

hi I am runnign suse linux and want to telnet to an aix box and run wsm GUI from my linux box. How can I do that.. can anyone help to confiure X11 or Xwindows setup on mu suse linux and or on aix box thanks Antony (3 Replies)
Discussion started by: antointoronto
3 Replies

5. AIX

wsm does not load

Hi when I try to open wsm from the remote side I am not able to load wsm it gives me the error host cannot find the address xx.xx.xx.xx can anyone help? (0 Replies)
Discussion started by: antointoronto
0 Replies

6. AIX

WSM does not load

Greetings, I have a problem with WSM on one AIX machine. After starting the WSM Server, when I try to connect with my browser to: http://host:9090/wsm.html The only thing I get is: + find /var/websm/data/wservers/ -type f -print -name * + 2> /dev/null + head -1 + read portFile... (4 Replies)
Discussion started by: aixn00b
4 Replies

7. Shell Programming and Scripting

Get data from 3 differrnt oracle DB & then compare data

Hi All, I have a requirement to write a shell script for the following... we have 3 different database.... lets say A, B, C From these 3 DBs, i need to get data.. all have 3 different table...a,b, c A.a => Emp_code, count(*) B.b => emp_code, count(*) C.c => emp_code, copunt(*) Once get this... (4 Replies)
Discussion started by: Amit.Sagpariya
4 Replies

8. UNIX for Dummies Questions & Answers

Howto capture data from rs232port andpull data into oracle database-9i automatically

Hi, i willbe very much grateful to u if u help me out.. if i simply connect pbx machine to printer by serial port RS232 then we find this view: But i want to capture this data into database automatically when the pbx is running.The table in database will contain similar to this view inthe... (1 Reply)
Discussion started by: boss
1 Replies

9. AIX

Web-based System Manager (WSM)

Hello everyone, Would any of you know what group I need to be a member of to be able to change system settings via WSM? I have tried adding myself to couple of groups (adm, sucurity, system) but so far no good. I am able to see what settings are applied, but cannot change them. Thanks in... (3 Replies)
Discussion started by: juniorG
3 Replies
Login or Register to Ask a Question