- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- update standard error message to oracle database
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
Forums
Discussions
Discussions
Discussions
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
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-05-2006 07:12 PM
02-05-2006 07:12 PM
update standard error message to oracle database
I have a backup script that redirects all the standard input, errors to a logfile. We are trying to implement, to update the same information within oracle database.
How can i get the errors to be updated as a record within my table.
I tried
err=$?
and update the value of $? to database, but this always returns 0
but within my log i can view errors like EXIT STATUS 122 etc.
I want to include this exact error message
please advice,
AJi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2006 11:28 PM
02-05-2006 11:28 PM
Re: update standard error message to oracle database
*? is 0 because it changes every time
You need to play with putting the output to a variable and writing that
Something like
xx=$(/tmp/dol 2>&1;echo error $?)
echo $xx
/tmp/dol: fiel: not found. error 127
Then you can put xx into the errorlog and the database
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2006 12:27 AM
02-06-2006 12:27 AM
Re: update standard error message to oracle database
Let me put a part of my backup script:
------------------------------------------
exec 1> $logfile
exec 2>&1
/usr/openv/netbackup/bin/bpbackup -p policy_prod -h hp1 -s default -t 0 -w /appcon1_nfs/PRD/archive/*.arch
SeqID=15
exitcode=$?
$updateinfo/updatestats.sql $SeqID $exitcode
------------------------------------------
All errors is logged into logfile properly.
But not goes to the database, it returns 0
Please advice how can i modify my script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2006 03:52 AM
02-06-2006 03:52 AM
Re: update standard error message to oracle database
SeqID=15
exitcode=$?
$updateinfo/updatestats.sql $SeqID $exitcode
------------------------------------------
The assignment of "SeqID" was successful, so the return code is 0.
Swap the exitcode and SeqID assignments and it should work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2006 07:41 PM
02-06-2006 07:41 PM
Re: update standard error message to oracle database
122 not EXIT STATUS 122,
But in my logifile, i get the entire status - EXIT STATUS 122
regards,
Aji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2006 01:31 AM
02-07-2006 01:31 AM
Re: update standard error message to oracle database
You will either have to look-up the error message text in the oracle's message catalogs, or parse it out of the log file if you want the full text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2006 01:34 AM
02-07-2006 01:34 AM
Re: update standard error message to oracle database
if the message is always "EXIT STATUS "
try
exitcode='EXIT STATUS '$?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2006 01:49 AM
02-07-2006 01:49 AM
Re: update standard error message to oracle database
the message is not always "EXIT STATUS "
it contains the error description also.
It is not oracle related, it is related to our backup software,
Thanks in advance,
AJi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2006 02:24 AM
02-07-2006 02:24 AM
Re: update standard error message to oracle database
tail the logfile at the end and write that to the database
Steve Steel