- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- archiving problem of oraarch files on unix server
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
11-23-2011 03:57 AM
11-23-2011 03:57 AM
archiving problem of oraarch files on unix server
Hi,
hi,
I am having an archiving script running on Blade860 server having hpux 11.31 installed on it.
We are having an archiving script in production server for the archiving of ".dbf" files that is scheduled to run on every hour (the crontab entry has been hashed out, so it is not running at present)
In production server the format of file is "sample file:(1_46226_652110140.dbf)" and in DR server files are shipped as
(MPFarch1_46226_652110140.dbf). (Think this was done while Data guard configuration)
>>The old .dbf files from production server are getting deleted or moved to some other place that we are not able to figure out. Can anyone please confirm on this.
>>I want to have a unix script so that we can first ship the files to DR server and then the archiving should happen.
I am also giving the archiving script that we have currently hashed out in the server.
#!/usr/bin/csh
source $HOME/.dbenv_`hostname`.csh >/dev/null
l /oracle/$ORACLE_SID/oraarch/$ORACLE_SID* >& /dev/null
if ( "$status" > "0" ) then
exit 2
endif
rm /oracle/$ORACLE_SID/scripts/last_archives.log
rman cmdfile=/sapbasis/common_scripts/Rman2.cmd > /oracle/$ORACLE_SID/scripts/last_archives.log
rman cmdfile=/sapbasis/common_scripts/Rman3.cmd
if ( "$status" > "0" ) then
mailx -s "SAP archive backup of $ORACLE_SID failed. Please check rman log" declarkson@babcock.com </oracle/$ORACLE_SID/scripts/last_archives.log
exit 1
endif
(Can anyone explain the meaning of this script also as i m new to scripting)
Please give the suggestions on this or reply if any other information is required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2011 04:09 AM - edited 11-23-2011 04:10 AM
11-23-2011 04:09 AM - edited 11-23-2011 04:10 AM
Re: archiving problem of oraarch files on HP-UX server
>(Can anyone explain the meaning of this script also as I'm new to scripting)
First of all that C shell script should be rewritten in a real shell, ksh/sh.
>source $HOME/.dbenv_`hostname`.csh >/dev/null
This sources the variables in that .csh file.
>l /oracle/$ORACLE_SID/oraarch/$ORACLE_SID* >& /dev/null
This lists the files matching that pattern and sends to /dev/null.
>if ( "$status" > "0" ) then
exit 2
endif
If there are no files, exit.
>rm /oracle/$ORACLE_SID/scripts/last_archives.log
Remove the .log.
>rman cmdfile=/sapbasis/common_scripts/Rman2.cmd > /oracle/$ORACLE_SID/scripts/last_archives.log
>rman cmdfile=/sapbasis/common_scripts/Rman3.cmd
Run rman twice.
>if ( "$status" > "0" ) then
mailx -s "SAP archive backup of $ORACLE_SID failed. Please check rman log" declarkson@babcock.com </oracle/$ORACLE_SID/scripts/last_archives.log
exit 1
endif
If the last rman failed, send mail with a subject and the contents of the .log to the listed mail alias.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2011 05:16 AM
11-23-2011 05:16 AM
Re: archiving problem of oraarch files on HP-UX server
Hi Dennis,
Thanks for your reply.
I am having concerns about one statement in the script that i am mentioning here :
>l /oracle/$ORACLE_SID/oraarch/$ORACLE_SID* >& /dev/null
This lists the files matching that pattern and sends to /dev/null.
I am having .dbf files in our production server that are generated as logs in /oracle/MP1/oraarch/*.dbf directory. The old .dbf files from this path are getting removed or moving to some other place that we are not aware of. The above archiving script is also we have hashed out and it is not running.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2011 05:49 AM
11-23-2011 05:49 AM
Re: archiving problem of oraarch files on HP-UX server
>>l /oracle/$ORACLE_SID/oraarch/$ORACLE_SID* >& /dev/null
>I am having .dbf files in our production server that are generated as logs in /oracle/MP1/oraarch/*.dbf directory.
What is the value of $ORACLE_SID? It would have to match MP1 before that l(1) command did something.
Is it defined in $HOME/.dbenv_`hostname`.csh?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2011 05:52 AM
11-23-2011 05:52 AM
Re: archiving problem of oraarch files on HP-UX server
The value of $ORACLE_SID is MP1. It is defined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2011 06:15 AM
11-23-2011 06:15 AM
Re: archiving problem of oraarch files on HP-UX server
>The value of $ORACLE_SID is MP1. It is defined.
Then that script may be processing files like: /oracle/MP1/oraarch/MP1*.dbf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2011 09:12 PM
11-23-2011 09:12 PM
Re: archiving problem of oraarch files on HP-UX server
In production server in the /oracle/MP1/oraarch folder the files are generated as 1_46259_652110140.dbf(sample file) and they are shipped in DR server as MPFarch1_46259_652110140.dbf. The format of the file is changing after shipping. I thought this may be the configuration of Dataguard but i m not sure about this. We are renaming these files in DR server.
Also the old .dbf files are getting removed from the production server. That also we want to know.