- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: shell script access to oracle data
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2004 11:22 PM
тАО02-09-2004 11:22 PM
ie
start script
connect to database
loop
enter serial number
run pl/sql script
check result
end loop
close database connection
run job on serial number list
end script
Regards,
John.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2004 11:30 PM
тАО02-09-2004 11:30 PM
Solution#!/opt/perl/bin/perl
my %collect;
foreach my $db (qw( DBI_1 DBI_2 )) {
my $dbh = DBI->connect (.....);
while (1) {
print "Snr: ";
my $snr = scalar
$snr =~ m/regex-to-check-snr/ or last;
# some dbi stuff
# store results in %collect;
}
$dbh->commit;
$dbh->disconnect;
}
foreach my $key (keys %collect) {
# post processing
}
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2004 11:37 PM
тАО02-09-2004 11:37 PM
Re: shell script access to oracle data
I think 3 choices
1) As is and open Oracle each time;
2)Read all numbers to a flat file and then input and check them
3)Script the whole thing to run in the oracle login . sql pl/sql
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2004 11:40 PM
тАО02-09-2004 11:40 PM
Re: shell script access to oracle data
Can you point me at a resource to start learning perl from.
Thanks,
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2004 11:46 PM
тАО02-09-2004 11:46 PM
Re: shell script access to oracle data
http://perlmonks.org/index.pl?node_id=284175 (where and how to start learning Perl)
My HP ITRC site pages can be found at
Singapore https://www.beepz.com/personal/merijn/
Rotterdam http://www.cmve.net/~merijn/
Seattle http://ww.hpux.ws/merijn/
Enjoy, have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2004 12:32 PM
тАО02-10-2004 12:32 PM
Re: shell script access to oracle data
Why not load the list in the database? You could build the pl/sql script into a procedure, and pass it a variable from inside of a pl/sql block. You could even define your result as an out variable of the code, and check the result in the block:
declare
seriallist is select number from serial;
result varchar2(20);
begin
for seriallist_rec in seriallist loop
checkscript(seriallist_rec,result);
if result != 0 then
dbms_output.put_line(result||' failed!');
end if;
end loop;
end;
/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2004 08:08 PM
тАО02-10-2004 08:08 PM
Re: shell script access to oracle data
I am currently looking at the PERL option. It looks promising but I am having problems with the DBI interface. DBI is looking for perl 5.00503 and my version is 5.00502. I am currently searching the hp web site.
Regards,
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2004 08:26 PM
тАО02-10-2004 08:26 PM
Re: shell script access to oracle data
for perl, also have a look at http://www.cmve.net/~merijn/#Perl
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2004 12:31 AM
тАО02-11-2004 12:31 AM
Re: shell script access to oracle data
I can't get DBI to build. I get the following errors.
(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 422: Unknown option "f" ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Opromote_indirect_calls option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Z option is available only with the C/ANSI C product; ignored.
cpp: "/opt/perl/lib/5.8.2/PA-RISC1.1-thread-multi/CORE/perlio.h", line 108: error 4065: Recursion in macro "PerlIO".
Regards,
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2004 12:44 AM
тАО02-11-2004 12:44 AM
Re: shell script access to oracle data
The perl you have (5.005.x) is OK for building DBI (with some nags), but I am sure you will not be able to build DBD::Oracle with it (for reasons you can read in README.hpux in more recent perl distributions)
Addresses already posted
Enjoy, Have FUN! H.Merijn [ Who wonders what info Yogeeraj had to add ]