Monday, December 28, 2009
Price of a relationship
Once in his program he talked about Cost of a relationship, it was brain buzzing idea! and since then i believe in "There is always a Price to keep a relationship" d'nt think me a materialistic or even Ishfaq Ahmad...but it is true that in our world, we have to buy every-single bit of our owe objects, we even silent or undisclosed mannerly buy our owing relationships.
Taking friendship under vision, there could be following properties one can presume i.e.
- How it was started?
- What was it's intensity?
- How often you practiced that friendship?
- What is the frequency now?
- What is it's price to keep it going at start?
- What is it's price to keep it going, now?
- How important is this friendship to you?
if you can find answer to above questions, for a particular relationship/friendship, you would probably find "How important a certain relationship/friendship is for you?".
lets take a case study and calculate Price to keep relationship/friendship.
Case: my ever first friendship that i can recall now! i.e. with "Seven Das Chohan"
so lets find the answers...
- How it was started?
He was my class-fellow in 1st grade, Sharing same Desk...
- What was it's intensity?
it was quite smooth, we never felt each other demanding.
- How often you practiced that friendship?
everyday :) as we were class fellows.
- What is the frequency now?
we stayed together until 5th grade, when he was depromoted and later left school to
get admission in a non-Muslim school, and then he just disappeared, so frequency is zero now.
- What is it's price to keep it going at start?
Not much notifiable, mostly sharing home work & lunch box & playing together in recess time...etc.
- What is it's price to keep it going, now?
as we are not in contact anymore, so cost is zero.
- How important is this friendship to you?
it is not important, i am living without it :-|
I am afraid to calculate Price of my current or living friendships/relationship as it could create several issue for me... :) anyhow it would be really interesting for you to take some time from your busy life and calculate the cost you bare to keep a relationship or friendship and then see how important is it!
I have noticed that there are many relationships or friendship i keep, they are costing me a lot, but i am willing to carry on with them, and there are some who's cost is just a phone call or chat or email once in a year, but still they have a great importance to me...
Disclaimer: D'nt break your friendship or relationship after reading this post, it is just to poke you, to think on your dead relationships/friendships or even on those which are going to be dead in near future, you should realize how small price you pay to keep some really enjoyable companies...
Moral, Friends & Relations are the actual assets we carry...
Cheers
Tuesday, December 22, 2009
Musa Khan caste theory
I never understood Qazi Akham statement until i recalled Ghalib's ghalaz famous line "Khaaq main kia soratain hongi key pinha hongai..." i realized his greatness when i came to know about death of Nusrat Fateh Ali Khan, then Dr. Ghulam Murtaza and then Guljee...it might be continuing, so as soon as someone of such caliber leave us, i just recall Ghalib's misra "Khaaq main kia soratain hongi key pinha hongai..."
Monday, December 14, 2009
A hundred years age of unix/oracle admin
so yesterday i started thinking what exactly my heart feels, and i found myself more confused, can you tell me what exactly your heart wants to do? i mean it is really complex, if you try to search your feelings & try to refine what exactly is your desire, you will suddenly find yourself more confused rather clueless...After a while i got a tiny feeling about my profession, what exact i should do ? can you answer this? is it easy to tell anyone what exactly you are suppose to do? puff again confusing...
after few hours, i started to think on my career history and tried to find what exact i adore to do! and surprisingly i found that me, i mean Nayyar, i mean me :) like to be Guile program :-| ok! you d'nt know about guile then please read it...
my first encounter with guile was in 2005, when zeenix gave me a few minutes intro, but i got stock into guile badly, even during my MS second semester, we had to submit final project, i asked Dr. Lutfullah & Zeenix about ideas on guile project, though only zeenix sent me, this (His) project wish-list, as a matter of fact there were quite a few projects, but i selected XML-RPC binding project, and soon after that i prepared so called this project proposal which lately was submitted to Shahid Nawaz, he was our supervisor in MS Projects.
at that time zeenix left for Karachi (Pakistan), so it was hard to get hold of him, i somehow find myself hopeless in start of this project, as no one at Peshawar (Pakistan) was able to teach/help/program guile and it became really hard to get time from my busy schedule to do my own research on guile...during guile intro zeenix told me about #guile at irc.freenode.net if you never have been in irc.freenode.net then you should feel ashamed :-| ... so i started getting into #guile and spending everyday few hours in this chatroom, talking to people, mostly "wingo, rotty & zeenix himself..." with the time i got several good source of learning guile such as,
1. guile ebook - (it is not complete though really interesting and helpful)
2. guile/scheme/lisp video lectures - (Excellent stuff from MIT)
3. #guile itself.
4. if you know any other, please let me know, i will add here ;)
so yesterday, i thought to poke all those folks at #guile and logged in there, check below

i was lucky to find wingo & zeenix both online and did a small chat :)
Later i confesses at #guile "hacking guile for a week is hundred years life of a unix/oracle admin ;)"
cheers
Thursday, December 10, 2009
Ultrasound aur Molvi

for example, two diagonal line will have always same angle on opposite sides.
i.e. in figure a=b & c=d , is't it interesting ?
there was another one, which is really interesting i.e.

Two parallel line will never colloid each other :)
this is really interesting, in our surrounding you will observe it in everyday happening, if two things are in parallel they have no chance to colloid, if and only if they keep themselves parallel.
i remember my childhood days, when we were use to go for Juma(Friday) Prayers & were listening to our Molvi's speech on several issues, he was sometime very scientific as he turn his speech direction to science & Islam, most of the time he was proving that what science is saying is exactly according to Islam, to consolidate his arguments, he was mostly giving us examples.
such as, drinking water in Islamic way, sleeping, fasting etc... as a matter of fact, there are many :)
But sometimes he become really annoyed with scientist around the world and he was saying about "What science CANNOT achieve", then his speech became more interesting because he was use to explain several issue where scientist were hopeless at that time.
The most frequently used example was "Baby Gender detection, before birth" he was use to say us, look innocent muslims...all these scientist are working on many big inventions, they even went in space & moon, but they are still unable to detect baby's gender before it's birth!
This is true at that time we were really amazed by his example...and most of the Juma (Friday) prayer crowd was praising his knowledge & way of convincing us towards religion.
But what happen just few years after, science & scientist were able to detect baby's gender through Ultrasound technology, even more they now reached to a technology level, where through medical exams they can even predict the baby's abilities & disabilities, beyond that they are now producing human organs & test tube babies, genetic engineering is a known field to everyone...
This is fact, that his example was not reference from any authentic Islamic book, it was his own perception about science & he just without giving it a second thought threw to us, but what happen next, he disturbed people's belief with his own false statements, now imagine what a person of that time will think about Islam, did Scientist proved Islam is wrong? or Islam is outdated ? or even Islam has nothing to do with science ?
keep in mind that this statement was widely used in Islam & Science lectures throughout Pakistan and it was very popular argument among Molvi Hazrat.
i wish our Molvlies should take some time and think about mathematical laws, if you are parallel you have no chance of collision.
cheers
Tuesday, December 8, 2009
Braindump Batoor
i brought my notebook and started calling through my VOIP account, their number was busy, as it was very late in Pakistan, i was expecting to get through easily but it was'nt as i expected...anyhow after almost 30 min continues tries i got connected, they were at that time playing JAL songs, i guess their producer/director received my call and as soon as he came to know i am calling from Africa, he shouted on everybody, "We are going back, Batoor ... Batoor, get ready, we are going back on SOLAR..." i am not sure if SOLAR is some camera angle thingy...anyhow he asked me to wait a second, in few neno seconds i was online with Batoor :D
I started very well, though i was dam exited as it was my ever first call to any TV channel, i just said "Hello Batoor, i am Nayyar Ahmad, from Southern Africa" and BANG....! i lost his voice... i was able to listen him, but he complaint, Nayyar i CAN'T listen you, can you please come up again...and then my call dropped, holy cow, it was first time i came online with any known person on TV Live show, and i lost connection.... though i was lucky as soon as i tried again, i got connected, but same guy who picked my before complaint, Nayyar we can't hear you properly, please call us next time.... i was just able to leave a message for Batoor i.e. "Batoor, its me, Nayyar, your teacher at IMSCIENCES"....tont tont tont...call dropped.
So later when i went to bed, i started thinking, what i really remember about Batoor, lets dump it somewhere or even blog it...so in future if i get chance to speak about him, i will just open this post and read :)
things i can recall about him are:
1. He was in BCS 4 semester when i took over their class.
2. He was mostly wearing round neck t-shirts, and loose jeans.
3. He was mostly speaking in English.
4. He was always late in class, especially i saw him coming late in first period.
5. His father died, when he was my student, and we (his class fellows & me) spoke a while in class when he came from vacations.
6. He was mostly downloading lyrics of English songs, those he was using in his late night FM radio show.
7. Once when i blocked that lyrics site in proxy server, he came to me with Asad(his class fellow) for request to open that site only on that small lab, where they were mostly sitting.
8. He met once me in RMI (Rehman Medical Center), he came to take some lab report of his grand father/mother (i am not sure).
9. He once showed me his hand written one page resume, that he wrote for VJ at Khyber TV, when Khyber TV got famous.
10. i listened him several times on FM radio, where he use to dedicate songs to his teachers and class fellows :)
this is all what i can recall about him.
This is really strange, as we being teachers, when teaching students, we are seeing them as Doctors, Engineers, IT Professionals...etc, but later when they get into some shape they are surprisingly different.
Cheers
Wednesday, November 25, 2009
Waseem ki Bermuda Triangle
Few months ago, Waseem (ex-house mate) visited me with another friend (both are of almost same caliber in religious beliefs), though Waseem recently converted from SUNI MUSLIM to SHIA for many unknown reason :) anyhow we went to an open restaurant near by beach & were exchanging views on several topics, somehow Waseem started praising his new boss who is again a SHIA Muslim and so called PPP (Pakistan People Party) member though he lost in recent election but he is an active member of his kind. So Waseem started saying many things about him, and suddenly he turned to his boss's vast Islamic knowledge, he said, my boss has explained me Where POSSIBLY be The IMAM MEHDI. if you read carefully the Wikipedia link, even me, was unable to find the exact location where Muslims are expecting him to arrive! but his boss is confirmed & presented his own theory!
According to Waseem's boss, Imam Mehdi is in Bermuda Triangle ! a minute of silence...
Just out of my curiosity, even though i had already read about Bermuda Triangle, i asked him what is Bermuda Triangle? that made him in driving seat. He started like...
Bermuda Triangle is in an ocean (remember he was'nt clear where exactly it is!) and it has a big water Twister, anything including ships , airplanes etc... when pass through that triangle, they get disappear, even birds cannot fly over that triangle, our Imam Mehdi is seating there and waiting for his time, he does not allow anything to fly our him. Sooner or later he will come out, though according to his boss there are already many indication of his arrival! I was reluctant to make any comments on his boss narrated tale but at the same time, i was thinking why he is such firm believer of this kind of rumor, just because his boss has quoted or Waseems likes telling stories, or this is human nature, or something else?
if for a second you keep your belief aside & start thinking on, what if someone tells you that miles in depth of water, there is a human being living, in this current time, you will take it as a joke, imagine today NASA & other research center already have reached to heights of space in search of life, they never thought about going under Bermuda triangle ? answer to me is simple, their scientist are not idiots.
If you take ten minutes and read brief about Bermuda triangle, for example following is a paragraph taken from Wikipedia.
"The area is one of the most heavily-sailed shipping lanes in the world, with ships crossing through it daily for ports in the Americas, Europe, and the Caribbean Islands. Cruise ships are also plentiful, and pleasure craft regularly go back and forth between Florida and the islands. It is also a heavily flown route for commercial and private aircraft heading towards Florida, the Caribbean, and South America from points north."
According to statistics of accident happened in the area with movements of ships & airplanes, it is QUITE SAFE ZONE.
I was since then thinking often why Waseem belief undoubtedly on his boss's philosophy who is not even graduated from any sort of educational institute, who was an illegal immigrant in Japan & made money by selling Japanese used cars, Who fought under recently elections winning party (PPP) banner & he might be seating in future Pakistan's National or Provisional Assembly.
until last week, when i read Paul Graham's this essay where he gave a brilliant thought about people's identity, according to him, Politics is a part of our identity, while during reading of his article i realize that Politics & Religion both serve same in our identity, and the article even covers our Religious affiliation (*this correction is made after Zeenix comment*), which make us discuss it without having it's proper knowledge.
i would request you, not to take this post as non-Islamic or against some SHIA belief, but think on your identity, think on your belief, see how low actually we know about that Topics we discuss, should we try to avoid spreading such belief, instead of defending them without any research!
Cheers
Wednesday, November 18, 2009
missing email accounts in Contact Book, MS Outlook
We were facing an idiot issue with our outlook contact book, when we created new email accounts they were not updating in outlook's contact book, another issue that i saw was, when i tried to download fresh contact book in outlook, it gave me error something "an object not found...blah blah" so here is the solution.
Symptoms:
1. you cannot see new email accounts in outlook contact book.
2. when you refresh/download new contact book at outlook, it gives you error.
Cause:
you "offline address list" in exchange is not properly configured.
Solution:
1. open Exchange System Manager
2. open "Recipients" tab.
3. click on "Offline Address List"
4. under right pane, you will see an object "Offline Address List" right click on it and select "Properties".
5. under General tab, click on "add" navigate in newly open window and select "Global Address List"
6. click OK.
7. right click on "Offline Address List" again and select Rebuild.
soon after these steps you will be able to see all missing email accounts, while you will no more face errors on refresh/download contact book.
cheers
Tuesday, November 3, 2009
slow/delay in ssh login at Solaris/Linux
1. Before asking username/login prompt
2. After asking username/login prompt
3. After taking password.
interestingly on all three cases the culprit is your DNS/name-resolution service.
Solutions:
1. mostly probably your DNS is not accessible or unable to resolve remote host's hostname.
2. if DNS is working then your host file is the issue! it should be correctly written.
3. check your client/workstation hostname is resolvable at server.
3rd is really tricky as if /etc/ssh/sshd_config is configured to ask for reverse dns (rDNS) request server will try to resolve client/workstation's hostname at server, and if your DNS is not configured to resolve client-side machine hostname, you will get delay on login.
The easiest solution to all login delay would be editing /etc/ssh/sshd_config and disbaling "useDNS" parameter by setting it "useDNS no".
cheers
Tuesday, October 20, 2009
Fix! FATAL: system is not bootable, boot command is disabled
Err:
FATAL: system is not bootable, boot command is disabled
Cause:
I broke in console prompt before memory initialization completed !
Solution:
{1} ok printenv auto-boot?
auto-boot? = true
{1} ok setenv auto-boot? false
auto-boot? = false
{1} ok reset-all
cheers
Monday, October 19, 2009
Fix, /opt/iplanet/ldap/slapd-hostname/start-slapd: not found
So i simply shoot
#svcadm -v restart network/iplanetldap
but found that service did'nt started :(
anyhow with further investigation i found following,
Symptoms:
when you will run svcadm -v restart network/iplanetldap you will get following error in log file i.e.
Error:
# cat /var/svc/log/network-iplanetldap:default.log
[ Oct 18 23:02:34 Executing start method ("/opt/iplanet/ldap/slapd-hostname/start-slapd") ]
/sbin/sh: /opt/iplanet/ldap/slapd-hostname/start-slapd: not found
Hint:
HOSTNAME in error was wrong! so i found the cause, that somehow ldap daemon startup script is not getting correct hostname of the machine.
Fix:
Run following command to check store configuration for ldap daemon.
Step 01: #svccfg export network/iplanetldap > /tmp/ldap-old-config.xml
this will create a file “/tmp/ldap-old-config.xml” you should vi/edit this file & correct hostname inside.
Output of the file is:
bash-3.00# vi /tmp/ldap-old-config.xml
edit following lines:
name='stop' type='method' exec='/opt/iplanet/ldap/slapd-hostname/stop-slapd' timeout_seconds='60'
Step 02: svccfg import /tmp/ldap-old.xml
Step 03: svcadm -v restart network/iplanetldap
Step 04: svcadm -v clear network/iplanetldap
Step 05: svcs -l network/iplanetldap
cheers
Thursday, October 8, 2009
System Administration Best Practices for System Admin Team
this document is not final word from sysadmin world, there may be some best practice points missing, i would appreciate, if you can come up with your suggestions for improvement of this document.
Download:
cheers
Sunday, October 4, 2009
Confidence!
"Confidence is the most important thing you can teach someone... if you can teach them confidence, you don't have to teach them anything else."
i agree with his father!
cheers
Friday, October 2, 2009
gunzip, uncompress file.gz to another/different directory
initially i was checking gunzip manual but didn't found any option to do this kind of task, though at freenode someone told me to use zcat instead of gunzip! e.g.
$zcat filename.gz > /path/to/unzipped/file
so sometimes instead of reading command's manual we need to check command's capabilities ;)
cheers
Wednesday, September 16, 2009
WARNING::lib=/opt/oracle/extapi/64/asm err:9 rc:Directory does not exist
error snap:
WARNING::lib=/opt/oracle/extapi/64/asm err:9 rc:Directory does not exist
location:skgdllOpenDi
errbuf=2
msgbuf=No such file or directory
Solution:
it is a warning not an error, safely ignore it!
Reference:
[1] Metalink Note. 727204.1
cheers
error, Switch to short timeout for ipc polling
symptoms:
you are receiving in /u01/app/diag/asm/+asm/+ASMSID/trace files
e.g.
Switch to short timeout for ipc polling
a session (kjzhi) is registered
session (kjzhi) is about to end
Registered session (kjzhi)[11][4][0][1] is cleaned up
Switch to long timeout for ipc polling
cause:
it is not your fault :) you require to run Patch id: 6678289
in case if you are using SPARC you may have to install SUN Patch id 123908-01 (or later) before doing Patch 6678289.
Reference:
[1] Metalink Note: 750773.1
[2] Metalink Note: 353150.1
Cheers
CRS-0184: Cannot communicate with the CRS daemon, Hunted!
Error:
CRS-0184: Cannot communicate with the CRS daemon
Logs:
$ less /u01/app/crs/log/nodename/crsd/crsd.log
output:
2009-09-09 09:52:49.154: [ COMMCRS][2]clsc_connect: (10076b610) no listener at (ADDRESS=(PROTOCOL=ipc)(KEY=OCSSD_LL_nodename_))
2009-09-09 09:52:49.154: [ CSSCLNT][1]clsssInitNative: failed to connect to (ADDRESS=(PROTOCOL=ipc)(KEY=OCSSD_LL_nodename_)), rc 9
2009-09-09 09:52:49.156: [ CRSRTI][1] CSS is not ready. Received status 3 from CSS. Waiting for good status ..
Reason:
sometimes when CRS server reboot it try to create sockets under /tmp/.oracle or /var/tmp/.oracle and there are already previous socket files...which are protecting to create new sockets.
Solution:
using root user remove all files under /tmp/.oracle or /var/tmp/.oracle
restart CRS on faulty node or even reboot that machine!
cheers
Tuesday, September 15, 2009
IPMP Error, All Interfaces in group ipmpsync have failed
error snap:
Cannot meet requested failure detection time of 10000 ms on (inet ce0) new failure detection time for group "ipmp0" is 188510 ms
Improved failure detection time 47127 ms on (inet ce1) for group "ipmp0"
All Interfaces in group ipmpsync have failed
after small googling i found this post, where this kinda behavior is explained, in fact, it is expected due to network overhead, as IPMP regularly after a small interval test its configured interfaces, and due to any reason if it is unable to test the availability it will report subject interface as down, and will increase the time interval with predefined amount of time...in case if this behavior continues it will declare interface down and possibly will failover that specific interface to any other available node.
We can manually increase or decrease the IPMP testing period/interval by modifying "FAILURE_DETECTION_TIME" to any value in milliseconds, inside /etc/default/mpathd file.
Then you need to run
pkill -HUP in.mpathd
You can continue to increase this value and once you define a rational amount of time where you stop getting this error, you can continue to work on network/communication tuning and find out the network overheads!
Cheers
Monday, September 7, 2009
Error in Voting/OCR disk during CRS installation
now during CRS installation in the screen where you have to supply Voting/OCR disk you might get following error i.e.
The specified shared raw partition /dev/rdsk/ora_ocr_raw_280m may not have correct permission. Verify that the partition is owned by Oracle User.
and when you check your disk's permission, it is telling you something else !
$ls -ltr /dev/rdsk/ora_ocr_raw_280m
crw-rw---- 1 oracle oinstall 85, 8194 Sep 6 08:51 /dev/rdsk/ora_ocr_raw_280m
does it mean the permission is correctly set ? NO NOT YET ;)
you need to check the permission of actual device ! i.e.
# ls -ltr ../../devices/scsi_vhci/ssd@g50060e800000000000005ba500000020:a,raw
crw-r----- 1 root sys 118, 504 Aug 28 16:35 ../../devices/scsi_vhci/ssd@g50060e800000000000005ba500000020:a,raw
so from here you can see that the actual device is owned by root:sys which is causing this permission error...you need to change the permission of actual device to oracle:oinstall. i.e.
#chown -R -h oracle:oinstall ../../devices/scsi_vhci/ssd@g50060e800000000000005ba500000020:a,raw
# ls -ltr ../../devices/scsi_vhci/ssd@g50060e800000000000005ba500000020:a,raw
crw-r----- 1 oracle oinstall 118, 504 Sep 4 14:55 ../../devices/scsi_vhci/ssd@g50060e800000000000005ba500000020:a,raw
NOTE: in both voting & ocr you should use slice 0 of the disk.
cheers
Thursday, September 3, 2009
Concept behind IP Network Addressing in crs installation, rac
You must enter unique values for the public node name, the private node name and the virtual hostname for all nodes in the cluster. The name, YOUR-HOSTNAME , that you entered is being used by more than once for the same node.
AND
The virtual hostname(s), YOUR-HOSTNAME, you have specified appears to be already assigned to another system on the network. Please ensure that the virtual hostname(s) that you use for each of the nodes in the cluster are not in use currently.
after reading the ORACLE official documentation and testing the provided machine's configuration i found that, my installation server had name resolution problem, firstly our DNS was resolving hostname on wrong IP and later when they changed it to resolve from /etc/hosts it was unable to resolve from this file...anyhow later with investigation i was able to give a brief idea that how CRS IP Network Configuration should look like, its simple ! here it is:
Concept:
You should have three IPs/Hostname i.e.
1. Public Hostname/IP (Physical Interface):
Public Hostname should register in DNS or /etc/hosts file and should be accessible i.e. one can ping it.
2. VIP Hostname/IP(Logical Interface):
VIP Hostname/IP should register in DNS or /etc/hosts file and should NOT be accessible i.e. one CANNOT ping it.
NOTE: in case of IPMP VIP should be LOGICAL interface.
3. Private Hostname/IP(Physical Interface):
Private Hostname should register in DNS or /etc/hosts file and should be accessible i.e. one can ping it.
cheers
Thursday, August 27, 2009
Poem, for Qazi Muhammad Ahkam.
i hope he will like it too!
inspiration that you made to me
is the objective of life to me
i do all to get until you
you are always ahead of me
you were a source of light to me
i found you all, in me
Khizar has a presence to me
if it's true, it is you to me.
[1] Khizar: the angel, considered to help or bring God's blessings...
[2] Qazi Muhammand Ahkam: he is my best teacher, taught me Physics & life & motivation... :)
cheers
Wednesday, August 26, 2009
Ph.d Student recommendation or Reference letter, template
Download link
Cheers
group.dba does not exist, projmod error
after realizing that there is of course some steps messing i consult uncle google ;) and found a post , where i found the missing block i.e. projadd command, in fact we need to first add a project only then after we can projmod (modify) it. here is the command:
#projadd -U oracle -K "project.max-shm-memory=(priv,10G,deny)" group.dba
cheers
Friday, August 21, 2009
Concept behind IPMP confiugration for RAC's Public & Interconnect, Solaris
Consider you have 4 Network cards in your machine i.e.
1. c0 ---> Public IP Interface
2. c1 ---> Public IP Interface (standby)
3. c2 ---> Private Interconnect IP Interface
4. c3 ---> Private Interconnect IP Interface (standby)
so consider if you have subnet (172.168.1.0) for Public Interface and (10.2.1.0) as private interconnect subnet, i am not considering netmask and other IP/Network configuration in my example, but you should keep in mind that all Public IP's for RAC network configuration should be in single/same Subnet, while all Interconnect IP's should also be in single/same subnet.
So now 1st to configure Public Interface you need three/3 IPs e.g.
172.168.1.1, 172.168.1.2 & 172.168.1.3
so you will assign them like:
1. c0 ---> will be assign 172.168.1.1 --- called Physical IP
2. c0:1 ---> will be assign 172.168.1.2 --- called Test IP
3. c1 ---> will be assign 172.168.1.3 --- called Test IP
all three should be in same/single IPMP group.
for private interconnect, you need also three IPs e.g.
10.2.1.1, 10.2.1.2 & 10.2.1.3
1. c2 ---> will be assign 10.2.1.1 --- called Physical IP
2. c2:1 ---> will be assign 10.2.1.2 --- called Test IP
3. c3 ---> will be assign 10.2.1.3 --- called Test IP
all three should be in same/single IPMP group other then Public IPMP group. You should NOT keep Public & Interconnect IPMP group names similar, otherwise it can cause serious network problems and even ORACLE discourage doing this.
References:
1. Metalink Note: 283107.1
2. Metalink Note: 368464.1
Cheers
really impressive SPAM
here it is:
Hi Nayyar
Sorry for the delay in responding. Our international launch has been
exciting and very busy.
Here is the link for more information on FDI International
http://giconn.net
This will give you a presentation on the company. Please email me with a
good time to call to you so we can discuss the I information more in detail
and discuss us partnering together. I am 6 hours behind.
Your Partner in Success,
Lynette Jones Lewis
Direct Line: (410) 428 - 5014
Fax: (877) 267 - 3063
i would like to know, if you receive such email, will you try to give it a read or no?
cheers
Thursday, August 6, 2009
ORA-01157: cannot identify/lock data file
ERROR at line 1:
ORA-01157: cannot identify/lock data file 29 - see DBWR trace file
ORA-01110: data file 29:
'/opt/oracle/product/oracle9i/dbs/C:oracleproduct10.2.0oradatapentahoptho_ts.dbf
'
from above datafile name you have realized that its a kinda jerk :s someone has made a datafile with no sense and then he/she have removed the file by O.S command, but he/she did'nt updated database about it !
So during the test when we were starting this database it came untill mount stage and then got stuck !!! i.e.
Problem:
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 29 - see DBWR trace file
ORA-01110: data file 29:
'/opt/oracle/product/oracle9i/dbs/C:oracleproduct10.2.0oradatapentahoptho_ts.dbf
'
so to fix it, i did following:
Solution:
SQL>alter database datafile 29 OFFLINE DROP;
SQL>alter database open;
cheers
Thursday, July 30, 2009
howto autostart database & listener under Solaris & Linux
here is a small howto:
step 1: Modify oratab
For Solaris:
$vi /var/opt/oracle/oratab
For Linux:
$vi /etc/oratab
at the end of oratab file, you will see following lines :
SID1:/opt/oracle/product/oracle9i:N
SID2:/opt/oracle/product/oracle9i:N
replace above with:
SID1:/opt/oracle/product/oracle9i:Y
SID2:/opt/oracle/product/oracle9i:Y
step 2: Creating dbora.sh script
$vi /etc/init.d/dbora.sh
write following content in it:
#!/sbin/sh
ORACLE_HOME=/opt/oracle/product/oracle9i
ORACLE_OWNER=oracle
if [ ! -f $ORACLE_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start') # Start the Oracle databases and listeners
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
;;
'stop') # Stop the Oracle databases and listeners
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut"
;;
esac
step 3: configure O.S to run dbora.sh on bootup/shutdown
For Solaris:
Link the dbora.sh to /etc/rc directories:
ln -s /etc/init.d/dbora.sh /etc/rc0.d/K10dbora
ln -s /etc/init.d/dbora.sh /etc/rc2.d/S99dbora
or
cp /etc/init.d/dbora.sh /etc/rc0.d/K10dbora
cp /etc/init.d/dbora.sh /etc/rc2.d/S99dbora
Note:we did cp on solaris 9. not sure but ln was not working.
For Linux:
$chkconfig --level 345 dbora.sh on
step 4: create pfile under $ORACLE_HOME/dbs --- OPTIONAL
if your database do not have pfile under $ORACLE_HOME/dbs you need to create by following command.
connect as "sysdba"
SQL> create pfile='$ORACLE_HOME/dba/initSID.ora' from spfile;
cheers
Wednesday, July 15, 2009
ORA-00018 maximum number of sessions exceeded
I followed this thread. to resolve it, though the terrible part of the story is, it can only be solved by bouncing the instance... So we had to wait until working hours :(
SPECIAL NOTE: if you are having this problem in RAC environment, then you should give a look to Riyaj Post
cheers
Tuesday, July 14, 2009
Oracle 11g Pre Installation on Solaris 10 x64
Download
References: [1] [2]
Meta Link Note: 743042.1
Cheers
Tuesday, July 7, 2009
create standby when archive logs are lost/corrupt
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 way 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
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:
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.
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
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
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.
Wednesday, June 10, 2009
Steps to configure Shared Server
I found this post very helpful, short & focused.
cheers
Monday, June 1, 2009
Tips to Analyze False Statements
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= SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_1=ENABLE SCOPE=BOTH; SQL> ALTER SYSTEM SET LOG_ARCHIVE_FORMAT =’ 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