- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script archive log transfer to standby db
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-06-2003 07:34 AM
тАО02-06-2003 07:34 AM
Re: Script archive log transfer to standby db
John.
livelogno()
{
remsh ptihp1 'ls -t /archive/oradata/PAULIVE/*.ARC | head -n 1 | cut -c 37-46'
}
stdbylogno()
{
ls -t /archive/oradata/PAULIVE/*.ARC | head -n 1 | cut -c 37-46
}
livelogcount=`livelogno`
stdbylogcount=`stdbylogno`
filestocopy=`expr $livelogcount - $stdbylogcount`
echo $livelogcount
echo $stdbylogcount
echo $filestocopy
for arcfile in `remsh ptihp1 'ls -t /archive/oradata/PAULIVE/*.ARC' | head -n $filestocopy`
do
echo $arcfile
echo `rcp ptihp1:$arcfile $arcfile`
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-06-2003 10:21 AM
тАО02-06-2003 10:21 AM
SolutionHere is the script that I wrote to do what you are talking about. It assumes that you are running with OFA standards (/var/opt/oracle/arch/
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-06-2003 10:24 AM
тАО02-06-2003 10:24 AM
Re: Script archive log transfer to standby db
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2003 01:08 AM
тАО02-07-2003 01:08 AM
Re: Script archive log transfer to standby db
Thanks for the script. My one works but it is probably not the best. I now have 3 scripts 1) to swithch logs on the current system 2) copy log files 3) import log files. All work but I have no logging or error checking so all scripts posted are useful.
As you can see my scripting knowledge is basic and I have a question on your script. Take for example the copy file line
rcp ${j} ${2}:${3}
What do the {} do?
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2003 06:59 AM
тАО02-07-2003 06:59 AM
Re: Script archive log transfer to standby db
I am doing just what you are asking.
On the Primary Server:
I force a log switch.
I copy the archive logs to a safe directory and another directory for the standby server to pickup and write a file there is only there when there are files for the Standby server to get. Then I remove the files from the Archive Log directory.
On the Standby Server:
The scripts checks to see if there are new files get. When there is it gets them from the primary server and then copies then to a save directory and to the archive log directory. Then it tells Oracle to do the "recover standby database". Then it removes the flag from the Primary server so it will get new files ready.
There are many other things that happen in these scripts. Files are compressed; the program will not run if the primary or standby processes are already running. It checks to see what the last log# was so when the standby was updated the log# should match on both servers. Much more.
I'm using rsync, ssh, sftp and gzip. And the two servers are 1000 miles apart. Oh! 1600km
Also using Oracle 8.0.5 and HP-UX 11.0
I'm in the process of rewriting the scrip to clean it up. Would like to see it?
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2003 08:01 AM
тАО02-07-2003 08:01 AM
Re: Script archive log transfer to standby db
I am allways willing to learn something so I would like to see your scripts. However I am using HP-UX 10.20 and I don't think rsync is available.
Thanks,
John.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2003 01:37 PM
тАО02-07-2003 01:37 PM
Re: Script archive log transfer to standby db
ie: Run the following:
export ORACLE=temp
export ORACLE_SID=BLAH
echo ${ORACLE_SID}
echo ${ORACLE}_SID
It is a good idea to use brackets around the variable just to make sure that something doesn't get parsed that you dont want to get parsed.
I will also post the apply script.
Brian
- « Previous
-
- 1
- 2
- Next »