Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Standby Database

Status
Not open for further replies.

stevenriz

IS-IT--Management
May 21, 2001
1,069
thread1177-1077960

I am just playing around setting up a standby database for the unfortunate case where our primary db were to fail. First I built a db server and configured RMAN on it. I have successfully performed a backup using RMAN. Now I would like to test a restore.

My main question is this. What is Data Guard and is it a license we need to purchase? Or is it just a term Oracle uses for high availability?
 
Hi
I will add a bit more info a bit easier to understand
Firstly Data Guard is only available on Enterprise so if you have Standard then you can do standby but its a bit different.

Before doing the dataguard you need to determine why you want to do it and what is your SLA or its really just a pointless exercise.
One thing to know you need a license for your standby server, I have just reconfirmed this from the Oracle partner guide
Do some up front planning as to actually why you want to do dataguard or standby and as there are a few gotchas that you need to determine prior to implementing

Cheers

Technology Consultant, Australia
"So much of what we call management consists of making it difficult for
people to work" --- Peter Drucker
 
Hi thanks!! We would like our SLA approach an hour or less downtime if something were to happen to the db server. This might not be reachable with what we have I don't know. We have clustered app servers and load balancers so we are all set there. It is the db server that is the single point of failure at this time.

Yes I learned from my Oracle rep that data guard is part of enterprise which we do not have. So if we were going to go with a regular standby server, what is entailed? from what I can see with my research, we would take the archive logs from the main server and process them in the standby server. would we periodically, maybe weekly, want to do a full rman backup and process that full backup set on the standby to refresh it? What are the basic steps for this?



 
you do not need to refresh your standby as your archive logs from your primary database are applied to the standby database after each log switch.

They are copied over via thread, for example:-

log_archive_dest_2= SERVICE=PROD59_STANDBY optional REOPEN=60

SERVICE=<tnsnames alias>

so for this example tnsnames.ora would look like this:-


PROD59_STANDBY = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=sundevlunx003)(PORT=1969))
(GLOBAL_NAME=PROD59_STANDBY.world)
(CONNECT_DATA=(SID=PROD59))
)



HTH



Sy UK
 
Thank you for the info. I am still learning this proceedure.

Should the standby db be any certain SID or does that not matter?

Does the standby db need to be mounted in a certain way maybe with the nomount option?

what are the processing commands to apply the archive logs?
 
sid does not have to be the same

process is:-

SQL> startup nomount

SQL> alter database mount standby database

SQL> recover managed standby database disconnect from session


the logs are applied automatically as and when they are copied from the primary.

You can track them being applied by looging in the standby alert log

Sy UK
 
Ok so whenever I want to apply some new logs, I will somehow get the files over to the standby server and put them in some directory and run this command which I will be able to automate at some point. I want to do it by hand on a couple test machines for now.

SQL> recover managed standby database disconnect from session

Once the archive logs are applied successfully, what do I do with them on the primary server? Would I do an RMAN backup?

RMAN> backup database plus archivelog delete input;
 
the logs are copied over automatically to the standby server after every log switch to log_archive_dest_2= SERVICE=PROD59_STANDBY optional REOPEN=60


standby_archive_dest is where they will be copied to on the standby server.

You do not need to do anything once you have issued SQL> recover managed standby database disconnect from session as the standby server will automatically apply the logs as and when they arrive

With regards backing up the database it is entirely up to you. We run hot backups every night and delete input with sysdate -4 so we keep 4 days worth on disk. But this is down to your policies

Sy UK
 
Hi I was going over this again. I don't think the SID can be the same, what would you put in TNSNAMES?? Anyway if it is different and you need to fail over to the standby, how will your applications access the standby unless you change the SID in all your app servers? Sound logical or am I missing something?
Steve
 
Steve,

Just to clarify, you can have several different aliases in the same tnsnames.ora file that refer to the same database instance...That is one of the benefits of the tnsnames.ora-alias convention.

Tnsnames.ora aliases do not need to bear any spelling relationship to the actual SID to which the alias refers.

I understand your failover-naming concern, but one method for dealing with that issue in the case of a failure, is, in fact, to keep the tnsnames.ora alias names the same while swapping the actual references behind the aliases so that none of the connectivity references in your applications need change in order to point to the former standby database that becomes the production database following the failover.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
I have yet to read this out there. Does the standby database receiving archive logs from the Primary NEED to be identical to the standby in terms of hardware, operating system and Oracle version? I can understand the Oracle version, but I don't see any documents stating the hardware and OS need to be identical.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top