Monday, February 7, 2011

Controlfile recreation with backup

We recreate controlfile when
1. Control file is corrupted
2. Rename a database
3. change the number of maxlogfiles

Take a trace of the current control file

SQL>alter database backup controlfile to trace;

The trace file of the control file is saved in the background_dump_destination in Oracle 11g.

[ To know the background_dump_destination just type
SQL>show parameter background; ]

Now in a separate terminal view the trace at the background_dump_destination


copy the code to create control file into a sql file [ preferably in the instance directory /home/app/oracle/oradata/TEST ] for example

[oracle@localhost trace]$ vi control_file.sql

STARTUP NOMOUNT
CREATE CONTROLFILE REUSE DATABASE "TEST" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/home/app/oracle/oradata/TEST/redo01.log' SIZE 50M BLOCKSIZE 512,
GROUP 2 '/home/app/oracle/oradata/TEST/redo02.log' SIZE 50M BLOCKSIZE 512,
GROUP 3 '/home/app/oracle/oradata/TEST/redo03.log' SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
'/home/app/oracle/oradata/TEST/system01.dbf',
'/home/app/oracle/oradata/TEST/sysaux01.dbf',
'/home/app/oracle/oradata/TEST/undotbs01.dbf',
'/home/app/oracle/oradata/TEST/users01.dbf',
'/home/app/oracle/oradata/TEST/example01.dbf',
'/home/app/oracle/oradata/TEST/big_ts.dbf',
'/home/app/oracle/oradata/TEST/auto_ext.dbf'
CHARACTER SET WE8MSWIN1252
;

save and exit

gracefully shutdown the database [ in the case of deleting the control file while the database is up and running, shutdown abort is the only option ]

Now start the databse in nomount state and

run the script
SQL>@/home/app/oracle/oradata/TEST/create_control_file;

startup nomount
ORACLE instance started.

Total System Global Area 535662592 bytes
Fixed Size 1337720 bytes
Variable Size 251659912 bytes
Database Buffers 276824064 bytes
Redo Buffers 5840896 bytes
SQL> @/home/app/oracle/oradata/TEST/create_control_file.sql
ORA-01081: cannot start already-running ORACLE - shut it down first

Control file created.


Monday, July 28, 2008

My First Post

Namaskar,



This is my first post on the blog. I hail from a middle class family in Hyderabad.

Let me dedicate this very first post to those who have helped me reach a milestone where I am today. My parents are the first whom I salute for giving me life, teaching me good and making me a person with good manners. They always gave me liberty in chosing the best for me and supervised my every attempt and guided me to do the things with utmost perfection. My uncle (my father's brother ) is always a dynamic personality who inspired me in the times of distress and dismay. The other people very important in my life are Mr.Lingamaiah, D.D.Sharma, his daughter Ms.Sailaja, Mr.Gangulu etc.

I did my SSC in Vidy Bharathi High School which is one of the best schools in BHEL.I pursued my Intemediate studies in Naveena Jr.College hostel(Hastinapuram, Hyderabad). I was competent in studies and actively took part in extra curricular activities and won several prizes.

I was admitted into Deccan College of Engineering and Technology for my bachelors in Electrical and Electronics Engineering. But I still repent for leaving the golden chance of selecting the Computer Science Engineering in JNTU Ananthapur and Mechanical Engineering in CBIT,VASAVI colleges. So, now I suggest people not to leave a chance, if given,of studying a good course at a good college even if it is far from your locality. It seems to be difficult in the begining but later you will appreciate the right decision at right time though sour to think of it.



It is rightly said by Dr. Sarvepalli RadhaKrishnan that "Roots Of Education Are Bitter But The Fruit Is Sweet"



Later in my Engineering I got exposed to Computer Science subjects which were interesting and demanded ones intellectual ability. So, I thought of doing my MS in computer Science. In the efforts to accomplish it I took a course in JAVA in NIIT (leading IT trainers in the world). Ialso learnt some SQL commands which I needed in data management and supplementing my softwares with a data base. With this academic background I applied for MS in Universities in USA. Luckily got an admit from Texas A&M University, Corpus Christi. And I just went forward with this university. At this time it is worth mentioning my friend Vinay and his brother Vijender's efforts in making my dreams come true.Because without their help and support I would not even think of MS in USA and that too in Comp Sci...

Thanks a lot for their serious efforts in showing a new direction to my career and their cooperation in getting things done smoothly and with less efforts.