Tuesday, July 14, 2009

Oracle 11g Pre Installation on Solaris 10 x64

Yesterday , i was asked to write a Pre Installation task guide for oracle 11g, i went through several sites to get detail of the document. Though oracle 11g can be installed under ASM or Local File system, in our case we took local file system. There isn't any complexity in oracle 11g installation.

Download

References: [1] [2]
Meta Link Note: 743042.1

Cheers

Tuesday, July 7, 2009

create standby when archive logs are lost/corrupt

I have been in such situation where somehow we lost or (most recently) got corrupt the archive logs from production site and we had to synchronize our standby/DataGaurd site. Anyhow the terrible fact about such situation is that we had to recreate standby database, here is the scenario with solution :)

Scenario: Your database is archiving itself to shared storage (of course in RAC) or it is using local disk (in NON-RAC) and somehow your disk get failed and you lost all/(some of) your archive files, or oracle wrote archive log on a corrupt block and a specific archive log file is lost. In either case you lost archives before transferring to standby/Dataguard database.

Consequences: You d'nt have any other was to regenerate that archive file and you are now to a point where you have to recreate that specific standby database.

Protection: In our office, we have a slight protection against such failure i.e. we have a shell cron script that is running after every 5 min. and coping archive log files to a NFS mounted disk. This is very handy in cases when we lost archive log file on disk but it is found in NFS mounted disk. BUT last week we even did'nt had those missing archive log files in NFS mounted disk.

Solution: You have to undergo with following procedure.

Step 1: Create a new rman based backup, EXCLUDING Archive Log Files, Including control file for standby.

Step 2: Copy all archives to standby site, those who are recent then your last backup. i.e. those archive log file that were generated after you made step 1 backup.

Step 3: recreate your standby database just as normal.

PS: you can take help from my post to accomplish step 3.

Request: if you know any other better way then this, d'nt forget to share with me :p

Cheers

Monday, June 29, 2009

Steps to shutdown Dataguard/Standby database for maintenance work

In our office there are certain situations where we have to shutdown Dataguard site, mostly for maintenance work, such as shared disk, server's hardware or any general maintenance at our DR (Disaster Recovery) site.

Point behind shutdown/startup of Dataguard is when Dataguard/Standby database come online it should get synchronized to Production/Primary site.

There may be many ways to achieve our goal, here is my recipe:

SHUTDOWN STANDBY DATABASE

step 1: Disable standby archive writing:
at primary/production database

SQL> alter system set log_archive_dest_state_2=defer scope = both sid = '*';

PS: in case of RAC: this step should be done at just ONE of the RAC node.

step 2: Disable auto recovery at standby site:
at secondary/DR database

SQL> alter database recover managed standby database cancel;
PS: In case of RAC: above command should run on just ONE of the standby RAC node.

SQL> shutdown immediate
PS: in case of RAC: shutdown should be done on ALL standby RAC nodes.

STARTUP STANDBY DATABASE

Step 1: Coping all archive from primary to DR generated during shutdown.

in this step we will copy all archive those were generated after standby database was taken down.

$scp /opt/oracle/archive/*.arc oracle@DR-Site-IP:/opt/oracle/archive

Step 2:
Startup standby database and configure automatic recovery:

SQL> startup nomount

SQL> alter database mount standby database;
SQL> alter database recover managed standby database disconnect from session;

PS: in case of RAC: repeat following commands on all standby nodes.

SQL> startup nomount
SQL> alter database mount standby database;

step 3: Enable standby archive writing:
at primary/production database

SQL> alter system set log_archive_dest_state_2=enable scope = both sid = '*';
PS: in case of RAC: this step should be done at just ONE of the RAC node.

cheers

Wednesday, June 17, 2009

Hates Air France

I have experienced twice flying from Jo'burg (South Africa) to Paris (France), first trip was aimed to participate in Linuxtag2007 in June while the second was in November 2007 for FAD (Fedora Ambassadors Day).

First Trip Experience: when i reached Jo'burg airport, the Airport authorities announced at eleventh hour "a possible delay in flight"", the flight was planned at 7.30PM and almost 200+ passengers were at the boarding gate, as if you have been in Jo'burg airport, new basement construction at that time had very few seats to rest...so almost all of us were lying on floor, after almost one and half hours suddenly few uniform Airport staff arrived and informed us that the Aircraft has some problem our engineers are working on them...everybody was concern what has happen to aircraft, so they said we d'nt have info...engineers are working on them...we again went on floor and start chatting each other...i was sitting with an ex-Zimbabwe citizen who's parents were British...but lately due to current political problems in Zimbabwe he had to leave country and went back UK, his son was working in Cape Town, so he often use to come SA.

anyhow, we were telling different stories each other and time was slowly passing, suddenly we heard voice "all passengers going to Paris with Airfrance please consult boarding gate counter"...everybody rush to get there...same uniform guy started "Sir, our aircraft is unable to get singnals, due to which it can't take off. our another flight which is planned for 11:45PM is ready, we can only offer our Business class passengers to board on this flight, rest will stay on airport." every economy class passenger started screaming Sir..Sir..! do you will give us Hotel...a big NO :-| you have sleep on floor, yahoooo !!!

somehow, i got a chance to reach near by the guy who was giving boarding passes to Business class, i got a chance to speak with him, i said, Sir...could you please help me ! he said WHAT? i replied, i am economy class passenger but i have a very important meeting at Berlin, if i miss this flight i will never be able to get that meeting. He quickly with anger "We are only shifting Business Class...silence" but i didn't moved from his desk and kept watching all business class getting there boarding...i was holding my boarding pass in my hand such that he could read my name. He suddenly pointed me, Mr...You Mr..i noticed him he was seeing me, "GIVE ME YOUR BOARDING PASS" i handed over him and here we go !!! i was shifted on flight with business class passengers...So after 4 hours delay i was lucky to get a substitute flight.

Second Trip Experience: This time i was traveling for FAD in November 2007, same happen, i reached Jo'burg Airport we got boarding on time...this was very pleasant, i was really happy that thanks God, this time we are flying on time...our aircraft was slowly filling with people, after a while they even closed the aircraft door and started pre take off safety checks...but we noticed that they are not starting aircraft engines...flight was timed 11:45PM we all were waiting inside aircraft to get take off, almost after 1 & half hour, the pilot announced, "Dear passengers, we are having some technical fault in aircraft, and we could not get signals, we are really sorry to inform, you that we have to cancel this flight !" Big BANG !!! flight cancel.

this time i wasn't that lucky i had to sleep on airport floor !!!

Air France AF447 crash: they are again claiming Aircraft was unable to get signals...

Now Air France has used its million of dollars assets to buy media and flush their own narrated stories, so people will think that it is just an incident, but i am sure that they killed these 200+ passengers just due to lack of services...their aircraft are in fucking bad conditions, even if you ever travel on other world class airways you will feel the difference... even in Pakistan the Daewoo bus service is better then Air France.

I am feeling so sorry about the people suffered in this crash and give my deep condolence to their families....

Appeal: Please please...for God sake..if you have an option to avoid Air France, please d'nt leave your chance to be a safe traveler. Air France is playing with its passengers lives.

Photos A447 crash: I have attached two photos that were taken just before A447 crashed...look Air France craft tail went off with just lack of signals....!

These pictures were taken by a passenger, just before he died in crash.



Wednesday, June 10, 2009

Steps to configure Shared Server

Yesterday, Eric asked me to configure Shared Server on one of our DR site database, the idea was to test some application level connectivity issue. Though oracle strongly discourage you to run your database server as shared (MTS) still there are cases such as JAVA based application connection where shared server could be handy.

I found this post very helpful, short & focused.

cheers

Monday, June 1, 2009

Tips to Analyze False Statements

i have been thinking for a while about my sense of identifying false statements, i have an ability to find out false statements in conversation with ease. it might be because my brain has strong statement analysis algorithm, or it could be because the opponent is using really easy to detect false statement algorithm at his brain.

you might think me an idiot...but i will try to explain how my analogy is working, it might not be just as you analyze or it might be helpful for you to fix yours, or at least compare with mine... :)

False Statement Cases:

1. The person is reporting a news which is a public issue e.g. Political, Religious, Sports...etc

if the person is making statement regarding an immediate future decision which is going to be a rule sooner, he will try to state as much correct as he can....But if he is speaking about some Political,Religious,Sportsman personal life, be sure he/she is going to bluff a lot.

For Example:

High degree true statements:

Political - person report about decision on some bill in senate...etc
Religious - speaking about an event in recent past or near future, or telling you some well know versus from holy books...etc
Sports - talking about recent held games score list, or near future happening tournaments date schedule...etc

High degree False statement:

Political - talking about politicians sexual affairs or their corruption stories...or even their bank accounts...etc.
Religious - talking about way past events, those are not well know...reporting you versus of holy books those you heard first time....etc.
Sports - reporting tournament budget or publicity expenditure...sportsman affairs...bank accounts...etc.

2. Narrating some event:

There are two cases in this type of statement,

a - The event happen without your presence.

i. the person reporting is not first person who report you this event.

In such case you already have a scatch in mind about the event, though reporting events in general has lot of false reporting even if it is through print-media, you will get hell lot of false statements. So if you have an idea about some even and someone is reporting the same to you, it give you better chance to compare the new reporting with your past knowledge/information.

ii. the person is reporting you event for the first time.

No doubt mostly in our life, we receive information regarding events where we were not present and someone is give us information for the first time. Mostly when people get idea that you d'nt have information of the event he is reporting you, he/she will try to add false statements as much as he can. this kind of first intro stories are mostly mixture with lots of false statements.

b - The event happen in your presence.

Of course if you are part of an event and someone is reporting you from that event, you have better position to analyze about statement worth. In such situation people mostly take care of reporting false statement, as you were a part of same event.

3. Numbers

If someone is reporting you numbers/figures you have to take care in such situations.

Mostly people use round-off figures that can be a problem for you lately.

e.g. you are making some business deal and your supplier gave you a rough idea of items price in round-off later when you actually buy products, you get heavy lose.

such as 3 <> 2.7 and round-off will make 2.7 to 3 that can cause you loses.

There are some other cases as well in Numbers, For Example, people report a person's wealth in round-off i.e. "Mr. XX is millionaire" but do you think he has exact that figure in his bank account...this kind of statement are mostly false.

Another case is in distance reporting, if you ask how for would be New Yark from Kabul :D they will always make a guess, never heard real distance.

4. Newspaper:

Newspaper is one of the biggest source of false statements, be sure when you read newspaper almost 80% of text is false...most of the newspapers specially in 3rd world are ran by politicians or mafia, so they print only what they want.

you have to take care especially text on current affairs.

5. Drama/Films:

:D do you need me to write for this category !

the most enjoyable part of their shit false story would be "This FILM/DRAMA is based on true story" :D


6. Back Biting:

Mainly more than 80% is false, when a person is talking about someone in his absence, be sure he is biased and he would spread hell lot of shit. In such situation you have to first find reason "why he is reporting this shit in someone's absence" then what benefit he is expecting from this lie/reporting.

BIG TIP make your false statement true:

Just keep all above points in mind before reporting false statement, i am sure you can report high degree false statement almost as that is true.

PS: i would ask all my readers to share their way of identifying false statement.

Cheers

Tuesday, May 26, 2009

DataGuard - Step by Step

1. Intro

Oracle9i Data Guard provides an extensive set of data protection and disaster recovery features to help you to survive disasters, human errors, and corruptions that can incapacitate a database. Based on business requirements, these features can be advantageously combined with other Oracle9i high-availability and disaster recovery features for enhanced levels of high availability and disaster protection.

Oracle9i Data Guard is the management, monitoring, and automation software that works with a production database and one or more standby databases to protect your data against failures, errors, and corruptions that might otherwise destroy your database. It protects critical data by automating the creation, management, and monitoring of the databases and other components in a Data Guard configuration. It automates the otherwise manual process of maintaining a transactional consistent copy of an Oracle production database, called a standby database, that can be used if the production database is taken offline for routine maintenance or becomes damaged.

In a Data Guard configuration, a production database is referred to as a primary database. Using a backup copy of the primary database, you can create from one to nine physical and logical standby databases and incorporate them in a Data Guard configuration. Primary and standby databases can be running on a single node or in a Real Application Clusters environment. Every standby database is associated with only one primary database. However, a single primary database can support multiple physical standby databases, logical standby databases, or a mix of both in the same configuration:

Physical standby databases A physical standby database is physically identical to the primary database, with on-disk database structures that are identical to the primary database on a block-for-block basis. The physical standby database is updated by performing recovery. It can either be recovering data or open for read-only reporting.

Logical standby databases A logical standby database is logically identical to the primary database. The logical standby database is updated using SQL statements. The tables in a logical standby database can be used simultaneously for recovery and for other tasks such as reporting, summations, and queries.

2. Implementation:

2.1 Checking Force Logging:

This check need to be done on both databases i.e. (SID01 & SID02)

SQL> select force_logging from v$database;

If the result of above command shows “NO” then we need run following command.

2.2. Enable Force Logging:

SQL> alter database force logging;

2.3 Checking Archive log mode:

Both databases have to be in Archive Mode. If they are NOT we have to enable Archive mode.

Checking Archive Mode:

SQL> archive log list

Database log mode Archive Mode

Automatic archival Enable

Archive destination /opt/oracle/archive/SID01

Oldest online log sequence 2386

Current log sequence 2388

If you get “Database log mode NO ARCHIVE MODE” it means you have to do following steps to convert it in ARCHIVE MODE.

If your database is already in ARCHIVE MODE skip the following step.

Enabling Archive Mode:

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1=’LOCATION=’SCOPE=BOTH;

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_1=ENABLE SCOPE=BOTH;

SQL> ALTER SYSTEM SET LOG_ARCHIVE_FORMAT =’’ SCOPE= SPFILE;

SQL> ALTER SYSTEM SET LOG_ARCHIVE_START= TRUE SCOPE=SPFILE;

SQL> ALTER SYSTEM SET DG_BROKER_START= TRUE SCOPE=BOTH;

SQL> SHUTDOWN IMMEDIATE;

SQL> STARTUP MOUNT;

SQL> ALTER DATABASE ARCHIVELOG;

SQL> ALTER DATABASE OPEN;

SQL> ARCHIVE LOG LIST;



2.4 Creating RMAN base backup:

SID01:

{

allocate channel canal01 type disk ;

allocate channel canal02 type disk ;

sql 'alter database backup controlfile to trace';

sql 'alter system archive log current';

backup filesperset 4 format “/backup/rman/dumps/SID01/SID01_db_%U.bkp" ( database );

backup format “/backup/rman/dumps/SID01/SID01_stdby_%U.cf" current controlfile for standby keep forever nologs;

backup format "/backup/rman/dumps/SID01/SID01_arch_%U.bkp" archivelog all;

release channel canal01;

release channel canal02

}

SID02:

{

allocate channel canal01 type disk ;

allocate channel canal02 type disk ;

sql 'alter database backup controlfile to trace';

sql 'alter system archive log current';

backup filesperset 4 format “/backup/rman/dumps/SID02/SID02_db_%U.bkp" ( database );

backup format “/backup/rman/dumps/SID02/SID02_stdby_%U.cf" current controlfile for standby keep forever nologs;

backup format "/backup/rman/dumps/SID02/SID02_arch_%U.bkp" archivelog all;

release channel canal01;

release channel canal02

}

2.5 Coping RMAN Backup to DR:

SID01:

SID01:/backup/rman/dumps/SID01 >scp * oracle@10.2.24.52:/backup/rman/dumps/SID01

SID02:

SID02:/backup/rman/dumps/SID02 >scp * oracle@10.2.24.52:/backup/rman/dumps/SID02

2.6 Coping Archive from primary to DR:

SID01:

SID01:/opt/oracle/archive/SID01 >scp *.arc oracle@10.2.24.52: /opt/oracle/archive/SID01

SID02:

SID02:/opt/oracle/archive/SID02 >scp *.arc oracle@10.2.24.52: /opt/oracle/archive/SID02


2.6 Checking tnsnames alias & listener:

You need to check tnsnames alias and listener status on both site from both direction.

SID01:

From Primay to DR:

$tnsping SID01dr

From DR to Primary:

$tnsping SID01prod

SID02:

From Primay to DR:

$tnsping SID02dr

From DR to Primary:

$tnsping SID02prod

2.7 Create pfile for standby on primary

You have to create pfile from spfile at primary database and later copy it to DR site.

SID01:

SQL> create pfile='/tmp/initSID01.ora.standby' from spfile;

SID02:

SQL> create pfile='/tmp/initSID02.ora.standby' from spfile;

2.8 Coping pfile from primary to standby – DR site

SID01:

scp /tmp/initSID01.ora.standby oracle@10.2.24.52:/opt/oracle/admin/SID01/pfile/

SID02:

scp /tmp/initSID02.ora.standby oracle@10.2.24.52:/opt/oracle/admin/SID02/pfile/

2.9 Edit standby parameter file

SID01:

$vi initSID01.ora.standby

output:

*.background_dump_dest='/opt/oracle/admin/SID01/bdump'

*.background_core_dest='/opt/oracle/admin/SID01/bdump'

*.background_user_dest='/opt/oracle/admin/SID01/bdump'

*.compatible='9.2.0.0.0'

*.control_files='/opt/oracle/oradata/SID01/control01.ctl',

'/opt/oracle/oradata/SID01/control02.ctl','/opt/oracle/oradata/SID01dr/control03.ctl'

*.core_dump_dest='/opt/oracle/admin/SID01/cdump'

*.db_block_size=8192

*.db_cache_size=50331648

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='SID01'

*.fast_start_mttr_target=300

*.hash_join_enabled=TRUE

*.instance_name='SID01'

*.java_pool_size=0

*.large_pool_size=33554432

*.log_archive_dest_1='LOCATION=/opt/oracle/archive/SID01'

*.log_archive_format='arch_SID01_%t_%s.arc'

*.log_archive_start=TRUE

*.open_cursors=300

*.pga_aggregate_target=50331648

*.processes=150

*.query_rewrite_enabled='FALSE'

*.remote_login_passwordfile='EXCLUSIVE'

*.shared_pool_size=268435456

*.sort_area_size=524288

*.star_transformation_enabled='FALSE'

*.timed_statistics=TRUE

*.undo_management='AUTO'

*.undo_retention=10800

*.undo_tablespace='UNDOTBS1'

*.user_dump_dest='/opt/oracle/admin/SID01/udump'

*.dg_broker_start='TRUE'

*.standby_archive_dest='/backup/archive/SID01/standby'

*.standby_file_management='AUTO'

*.remote_archive_enable = 'TRUE'

SID02:

$vi initSID02.ora.standby

output:

*.background_dump_dest='/opt/oracle/admin/SID02/bdump'

*.background_core_dest='/opt/oracle/admin/SID02/bdump'

*.background_user_dest='/opt/oracle/admin/SID02/bdump'

*.compatible='9.2.0.0.0'

*.control_files='/opt/oracle/oradata/SID02/control01.ctl',

'/opt/oracle/oradata/SID02/control02.ctl','/opt/oracle/oradata/SID02/control03.ctl'

*.core_dump_dest='/opt/oracle/admin/SID02/cdump'

*.db_block_size=8192

*.db_cache_size=50331648

*.db_domain=''

*.db_file_multiblock_read_count=16

*.db_name='SID01'

*.fast_start_mttr_target=300

*.hash_join_enabled=TRUE

*.instance_name='SID01'

*.java_pool_size=0

*.large_pool_size=33554432

*.log_archive_dest_1='LOCATION=/opt/oracle/archive/SID02'

*.log_archive_format='arch_SID02_%t_%s.arc'

*.log_archive_start=TRUE

*.open_cursors=300

*.pga_aggregate_target=50331648

*.processes=150

*.query_rewrite_enabled='FALSE'

*.remote_login_passwordfile='EXCLUSIVE'

*.shared_pool_size=268435456

*.sort_area_size=524288

*.star_transformation_enabled='FALSE'

*.timed_statistics=TRUE

*.undo_management='AUTO'

*.undo_retention=10800

*.undo_tablespace='UNDOTBS1'

*.user_dump_dest='/opt/oracle/admin/SID02/udump'

*.dg_broker_start='TRUE'

*.standby_archive_dest='/backup/archive/SID02/standby'

*.standby_file_management='AUTO'

*.remote_archive_enable = 'TRUE'

PS: In above text block the important parameters that needs to be changed are in biger fonts.

2.10 Copy initSID01.ora.standby to $ORACLE_HOME/dbs/:

SID01:

cp /opt/oracle/admin/pfile/initSID01.ora.standby $ORACLE_HOME/dbs/initSID02.ora

SID02:

cp /opt/oracle/admin/pfile/initSID02.ora.standby $ORACLE_HOME/dbs/initSID02.ora

2.11 Create executa_duplcate.sh:

SID01:

Vi executa_duplcate.sh

Output:

export ORACLE_SID=SID01

sqlplus /nolog @/opt/oracle/admin/SID01/standby/inicia_SID01_standby.sql

rman @/opt/oracle/admin/SID01/standby/executa_duplicate.rman

sqlplus /nolog @/opt/oracle/admin/SID01/standby/gera_stb_redolog.sql

SID02:

Vi executa_duplcate.sh

Output:

export ORACLE_SID=SID02

sqlplus /nolog @/opt/oracle/admin/SID02/standby/inicia_SID02_standby.sql

rman @/opt/oracle/admin/SID02/standby/executa_duplicate.rman

sqlplus /nolog @/opt/oracle/admin/SID02/standby/gera_stb_redolog.sql

PS: executa_duplcate.sh calls three sub scripts, that should be created in same directory as following:


2.11.1 create inicia_SID02_standby.sql

SID01:

Vi inicia_SID01_standby.sql

Output:

connect / as sysdba;

shutdown abort;

startup nomount pfile='/opt/oracle/admin/SID01/pfile/initSID01.ora.standby';

create spfile='/opt/oracle/admin/SID01/pfile/spfileSID01' from pfile='/opt/oracle/admin/SID01/pfile/initSID01.ora.standby';

shutdown immediate;

startup nomount;

exit;

SID02:

Vi inicia_SID02_standby.sql

Output:

connect / as sysdba;

shutdown abort;

startup nomount pfile='/opt/oracle/admin/SID02/pfile/initSID02.ora.standby';

create spfile='/opt/oracle/admin/SID02/pfile/spfileSID02' from pfile='/opt/oracle/admin/SID02/pfile/initSID02.ora.standby';

shutdown immediate;

startup nomount;

exit;

2.11.2 Create executa_duplicate.rman

SID01:

Vi executa_duplicate.rman

Output:

connect auxiliary / ;

connect target sys/******@SID01prod;

run

{

allocate auxiliary channel canal01 device type disk format '/backup/rman/dumps/SID01/SID01_db_%U.bkp';

allocate auxiliary channel canal02 device type disk format '/backup/rman/dumps/SID01/SID01_db_%U.bkp';

duplicate target database for standby nofilenamecheck dorecover;

release channel canal01;

release channel canal02;

}

exit;

SID02:

Vi executa_duplicate.rman

Output:

connect auxiliary / ;

connect target sys/******@SID02prod;

run

{

allocate auxiliary channel canal01 device type disk format '/backup/rman/dumps/SID02/SID02_db_%U.bkp';

allocate auxiliary channel canal02 device type disk format '/backup/rman/dumps/SID02/SID02_db_%U.bkp';

duplicate target database for standby nofilenamecheck dorecover;

release channel canal01;

release channel canal02;

}

exit;

2.11.3 create gera_stb_redolog.sql

SID01:

Vi gera_stb_redolog.sql

Output:

alter database add standby logfile group 4 ( '/opt/oracle/oradata/SID01/SID01_sblog04_a.dbf' ) size 100M;

alter database add standby logfile group 5 ( '/opt/oracle/oradata/SID01/SID01_sblog05_a.dbf' ) size 100M;

alter database add standby logfile group 6 ( '/opt/oracle/oradata/SID01/SID01_sblog06_a.dbf' ) size 100M;

alter database add standby logfile group 7 ( '/opt/oracle/oradata/SID01/SID01_sblog07_a.dbf' ) size 100M;

SID02:

Vi gera_stb_redolog.sql

Output:

alter database add standby logfile group 4 ( '/opt/oracle/oradata/SID02/SID02_sblog04_a.dbf' ) size 100M;

alter database add standby logfile group 5 ( '/opt/oracle/oradata/SID02/SID02_sblog05_a.dbf' ) size 100M;

alter database add standby logfile group 6 ( '/opt/oracle/oradata/SID02/SID02_sblog06_a.dbf' ) size 100M;

alter database add standby logfile group 7 ( '/opt/oracle/oradata/SID02/SID02_sblog07_a.dbf' ) size 100M;

2.12 run executa_duplcate.sh

SID01:

$./executa_duplcate.sh

SID02:

$./executa_duplcate.sh

2.13 Shutdown and Startup to mount:

SID01:

SQL> shutdown abort

SQL> startup nomount

SQL> alter database mount standby database;

SID02:

SQL> shutdown abort

SQL> startup nomount

SQL> alter database mount standby database;

2.14: Enable Archive Dest for standby at Primary:

At Primary:

SID01:

SQL> alter system set log_archive_dest_2='SERVICE=SID01dr arch' scope=both;

SQL> alter system set log_archive_dest_state_2=enable scope=both;

SID02:

SQL> alter system set log_archive_dest_2='SERVICE=SID02dr arch' scope=both;

SQL> alter system set log_archive_dest_state_2=enable scope=both;

2.15 Enable automatic recovery at standby:

SID01:

SQL> alter database recover managed standby database disconnect from session;

SID02:

SQL> alter database recover managed standby database disconnect from session;


2.16 Define FAL server & client at standby database

SID01:

SQL> alter system set fal_server='SID01prod' scope=both;

SQL> alter system set fal_client='SID01dr' scope=both;

SID02:

SQL> alter system set fal_server='SID02prod' scope=both;

SQL> alter system set fal_client='SID02dr' scope=both;

cheers