I create a remote standby database.I am using auto archive log transfer from primary to standby database.My concern is
if i add a datafile on primary database will it create on standby
No, it will not. The information about the creation of the new datafile will be recorded in the redo logs, so the controlfile of the standby will be updated accordingly, but the file will not be created on the standby siteautomatically. You have to copy the new file manually from primary to standby site.
You have to copy it immediately after creating it on the primary site, before the redo log that contains the information of the newly generated datafile gets transfered to the standby site. If standby system can't find the file when it updates the controlfile with the information of this new file the recovery process will terminate and you'll have to restart it after manually adding the datafile to the instance.
It is the similar principle also when you want to rename the file on your primary site.
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
you will have to create a dummy file and place on that location before that Archive log reaches the standby database. In other words the file should be there on the standby database for logs to be applied. I guess it only updates the controlfile when you add a new tablespace or datafile.
Check the "Backup and Recovery Guide" Chapter 16 "Managing a Standby Database"
Here is part of it --
Adding a datafile to your primary database generates redo data that, when applied at your standby database, automatically adds the datafile name to the standby control file. If the standby database locates the new file with the new filename, the recovery process continues. If the standby database is unable to locate the new datafile, recovery terminates.
If the recovery process stops, perform the procedure below. Note that if you do not want the new datafile in the standby database, you can take it offline using the following syntax:
ALTER DATABASE DATAFILE 'filename' OFFLINE DROP;
To add a tablespace or datafile to the primary database and transmit to the standby:
Create a tablespace on the primary database as usual. For example, to create new datafile t_db2.f in tablespace TBS_2 issue;
CREATE TABLESPACE tbs_2 DATAFILE 't_db2.f' SIZE 2M;
Copy the newly created empty datafile to the standby site. For example, if the databases are on the same host, you might enter:
% cp t_db2.f /private1/stby/t_db2.f
Start the standby instance without mounting it. For example, enter:
STARTUP NOMOUNT pfile=/private1/stby/initSTANDBY.ora
Mount the standby database, then place it in managed recovery mode:
ALTER DATABASE MOUNT STANDBY DATABASE;
RECOVER MANAGED STANDBY DATABASE
Switch redo logs on the primary to initiate redo archival to standby database:
ALTER SYSTEM SWITCH LOGFILE;
After all archived redo logs have been applied, cancel managed recovery:
RECOVER MANAGED STANDBY DATABASE CANCEL
Applying CREATE TABLESPACE redo adds the new filename to the standby control file. The following alert.log entry is generated;
WARNING! Recovering data file 2 from a fuzzy file. If not the current file it might
be an online backup taken without entering the begin backup command.
Successfully added datafile 2 to media recovery
Datafile #2: '/private1/stby/t_db2.f'
Create the datafile on the standby database. For example, issue;
ALTER DATABASE CREATE DATAFILE '/private1/stby/t_db2.f' AS '/private1/stby/t_db2.f';
Place the standby in managed recovery mode:
RECOVER MANAGED STANDBY DATABASE
Continue normal processing on the primary database. The primary and standby databases are now synchronized
Hope this helps,
thanks, for the reply.thats what also i read from the doc.It just struck me when they say oracle8i new feature .Automated standby database ,its not fully auto.
one has to manually transfer new datafile,manually activate it,
whenever primary goes down......
Click Here to Expand Forum to Full Width