This was a question in one of the NDTV's forums and I typed in my view on it. Somehow the did not accept my post. So I am posting it here.
----------------------------------------------------------------------------------
No I don't think corruption is the No1 problem for India. It is just a way to blame someone else for our bad state. If we want to talk about real problems we need to address issues like
1) Primary Education
2) Drinking Water
3) Sanitation
4) Nutrition.....
I can go on. These are the real problems of India. If you really think of it how many times did you bribe a person in your life to get something done? Of my 23 years in India the only time that I had bribed a person was to a ticket collector in trains to get a berth. I don’t know if that were earth shattering. I know it would have reduced a miniscule amount for the Railways but I don’t think it is a bigger problem than any one of the ones that I stated above. Corruption is more of a intangible problem and it is going to exist in one form or the other. I think we should focus more on tangible problems than say that "India is not developing fast because of our corrupt politicians". Even the politician is one amongst us.
Thursday, April 14, 2011
Monday, April 11, 2011
ORA-00214: Control file Version Inconsistent on Startup or Shutdown
Early in the morning to do my daily plsqlchallenge question I tried logging into my local database and bam I hit the ORA-00214 error. Well actually I hit this error when I try to start up my database. I guess the error was because I shut my machine down forcefully by plugging off my machine. I guess this was what caused the inconsistencies in the control files. The possible causes for this issue in the documentation were the following:
1) You have restored the control file from backup, but forgot to copy it onto all of the mirrored copies of the control file as listed in the "CONTROL_FILES" parameter in the initialization parameter
2) You have moved one or more copies of the control file to a different location while the database was up and running.
3) You accidentally overwrote one of the copies of the control file with an old copy.
4) The database or the system crashed while the mirrored copies of the control file were being updated, causing them to be out of sync.
5) You are restoring a database backup that was improperly taken with the database up and running ("fuzzy" backup).
In my case it was the error 4 which caused the error.
The solution was easy compared to what it could be. Below are the steps that I took to start up the database.
1) Shutdown the database
a. Shutdown immediate
2) Start up the database with nomount
a. startup nomount
3) Alter the control files to one of the control fiels.
a. ALTER SYSTEM SET CONTROL_FILES=file_name
4) Open the database.
a. Alter database open
With these commands my database was up and running and I am done for the day’s learning. I should definitely link this site for helping me out in fixing my issue.
1) You have restored the control file from backup, but forgot to copy it onto all of the mirrored copies of the control file as listed in the "CONTROL_FILES" parameter in the initialization parameter
2) You have moved one or more copies of the control file to a different location while the database was up and running.
3) You accidentally overwrote one of the copies of the control file with an old copy.
4) The database or the system crashed while the mirrored copies of the control file were being updated, causing them to be out of sync.
5) You are restoring a database backup that was improperly taken with the database up and running ("fuzzy" backup).
In my case it was the error 4 which caused the error.
The solution was easy compared to what it could be. Below are the steps that I took to start up the database.
1) Shutdown the database
a. Shutdown immediate
2) Start up the database with nomount
a. startup nomount
3) Alter the control files to one of the control fiels.
a. ALTER SYSTEM SET CONTROL_FILES=file_name
4) Open the database.
a. Alter database open
With these commands my database was up and running and I am done for the day’s learning. I should definitely link this site for helping me out in fixing my issue.
Tuesday, February 22, 2011
Roots Shoots Buckets and Boots
This is the book that I finished reading this week. It was a cute little book on inspiring kids and adults to do gardening. I love gardens and my idea of a house was not complete without a garden. I always dreamt of this little cottage with a big garden as my ideal home. And my husband always dreamt of a big house I suppose. So we ended up buying a big house with a bit lot with nicely landscaped yard.
And when I bought my house I assumed that I would fill my garden with all the things that a garden can and should have. But I have to admit that I failed miserably at that. I didn’t know where to start in my huge lot. I planted some tomatoes and egg plants last spring but before I got the harvest it became too cold and all I got was a huge numbers of small green tomatoes. I enjoyed what ever little I got but I think that was shame for the mere size of my garden(say lot). So this year I plan to make a better effort and in those I efforts came across this beautiful book “Roots, Shoots, Buckets and Boots”. It has beautiful ideas on how to plant with little kids and explore the nature with your little ones. I am sure I am going to refer to this book in the future as I am really a kid starting on my gardening journey.
It has nice pictures of the ideas of pizza patches and moon light blooms and little mazes. I never new we could do so much in our gardens. It has a few instructions on how to have a compost bin and prepare the soil before panting. It has nice detailed instructions on how to plant the various plants without sounding too boring or rigorous. The list of the 20 plants to have in a garden is a must in every Californian garden I suppose. What I like more about this book is that the author is from California and so the plants she mentioned in her book are mostly suitable for our weather. I am glad I stumbled on this book and I hope I implement at least one tenth of what I read.
My first to do after reading this is to get a compost bin and list of all the 20 must have plants in my garden. Its February now and I am sure I am going to have more fun in my garden. This books did inspire me.
And when I bought my house I assumed that I would fill my garden with all the things that a garden can and should have. But I have to admit that I failed miserably at that. I didn’t know where to start in my huge lot. I planted some tomatoes and egg plants last spring but before I got the harvest it became too cold and all I got was a huge numbers of small green tomatoes. I enjoyed what ever little I got but I think that was shame for the mere size of my garden(say lot). So this year I plan to make a better effort and in those I efforts came across this beautiful book “Roots, Shoots, Buckets and Boots”. It has beautiful ideas on how to plant with little kids and explore the nature with your little ones. I am sure I am going to refer to this book in the future as I am really a kid starting on my gardening journey.
It has nice pictures of the ideas of pizza patches and moon light blooms and little mazes. I never new we could do so much in our gardens. It has a few instructions on how to have a compost bin and prepare the soil before panting. It has nice detailed instructions on how to plant the various plants without sounding too boring or rigorous. The list of the 20 plants to have in a garden is a must in every Californian garden I suppose. What I like more about this book is that the author is from California and so the plants she mentioned in her book are mostly suitable for our weather. I am glad I stumbled on this book and I hope I implement at least one tenth of what I read.
My first to do after reading this is to get a compost bin and list of all the 20 must have plants in my garden. Its February now and I am sure I am going to have more fun in my garden. This books did inspire me.
Songs of Blood and Sword -- A Review
It was on twitter that I got to know first about this person called Fatima Butto. The late Benazir’s daughter, Bhaktawar described her as the best fiction writer in Pakistan in one of her tweets. That was not meant to be praise for sure. Over one of my week end youtube video browsing sessions I stumbled on an interview of Fatima. It was given to one of the Indian news channels while promoting her book. She was a beauty with brains and I was hooked. I think that night I saw almost all the videos of her on youtube. My husband was visibly annoyed with me.
A few days later I searched on my local library’s site if the book “The songs of blood and sword” was available. Bingo it was! It was one of the times when I really have no regrets about immigrating to the US. The libraries here just justify it. I got the almost new looking book from the library. It was big book for a novel with four hundred odd pages. I started reading it and I could not stop. The story was such a one.
Until I read her book I never really knew much about Pakistani politics. All I knew was that one of their prime ministers was hanged and his daughter became the prime minister later. This book gave me a good incite into Pakistani politics. It starts off with the history of Bhuttos. Supposedly they were Rajput warriors who amassed large amounts of lands in the Sindh region and during the British Raj they were helping out the Brits in administration of the region. I was nearly stumped to know that Pakistan has 27 rich(or say feudal) families even to this day and the remaining country dwells in poverty.
The book tells the story of Fathima’s Dad Mir Murtaza Bhutto from the time he was born till he was murdered brutally by the Pakistani police during his sister Benazi’s regimen. It talks about his girl friends and the relationships he had in the past. It has many pages dedicated to the first love of Murtaza, Della a Greek lady whose husband was jailed by the Greek government, but Fathima has very little to say of her own mother Fawzia and the relationship her dad had with her before they were married or for that matter after marriage. May be she felt too uncomfortable to get her biological mom’s side of the story on print. Her love for her mother, Ginwa who raised her was very evident and I somehow got some new reverence for this lady who had to go through so many odds.
As much as I hate Indian politicians, after reading this book I feel that they haven’t screwed up our nation as much as our neighbors have done. She is clearly very critical about US involvement in Pakistani politics. In fact she considers Chinese better friends to Pakistan than the US. From her opinion it is the Pakistani elite or the so called feudal lords in the Pakistani government say PPP (Pakistani People’s Party) that wants to be friends with the US and it is in not helping the general public of Pakistan. In her opinion Pakistan’s very low standing in the Arab world was because of its ties with the US.
Her descriptions of all the events that follow her dad’s death are very gruesome and anyone with a heart tends to feel sympathetic towards her family. I really feel for her and hope that there won’t be anymore Bhutto deaths in the future. This is my first book on Pakistan and I am longing to learn more about this neighbor of my land which has for many centuries been our land. Even now except for the political differences people are almost the same.
A few days later I searched on my local library’s site if the book “The songs of blood and sword” was available. Bingo it was! It was one of the times when I really have no regrets about immigrating to the US. The libraries here just justify it. I got the almost new looking book from the library. It was big book for a novel with four hundred odd pages. I started reading it and I could not stop. The story was such a one.
Until I read her book I never really knew much about Pakistani politics. All I knew was that one of their prime ministers was hanged and his daughter became the prime minister later. This book gave me a good incite into Pakistani politics. It starts off with the history of Bhuttos. Supposedly they were Rajput warriors who amassed large amounts of lands in the Sindh region and during the British Raj they were helping out the Brits in administration of the region. I was nearly stumped to know that Pakistan has 27 rich(or say feudal) families even to this day and the remaining country dwells in poverty.
The book tells the story of Fathima’s Dad Mir Murtaza Bhutto from the time he was born till he was murdered brutally by the Pakistani police during his sister Benazi’s regimen. It talks about his girl friends and the relationships he had in the past. It has many pages dedicated to the first love of Murtaza, Della a Greek lady whose husband was jailed by the Greek government, but Fathima has very little to say of her own mother Fawzia and the relationship her dad had with her before they were married or for that matter after marriage. May be she felt too uncomfortable to get her biological mom’s side of the story on print. Her love for her mother, Ginwa who raised her was very evident and I somehow got some new reverence for this lady who had to go through so many odds.
As much as I hate Indian politicians, after reading this book I feel that they haven’t screwed up our nation as much as our neighbors have done. She is clearly very critical about US involvement in Pakistani politics. In fact she considers Chinese better friends to Pakistan than the US. From her opinion it is the Pakistani elite or the so called feudal lords in the Pakistani government say PPP (Pakistani People’s Party) that wants to be friends with the US and it is in not helping the general public of Pakistan. In her opinion Pakistan’s very low standing in the Arab world was because of its ties with the US.
Her descriptions of all the events that follow her dad’s death are very gruesome and anyone with a heart tends to feel sympathetic towards her family. I really feel for her and hope that there won’t be anymore Bhutto deaths in the future. This is my first book on Pakistan and I am longing to learn more about this neighbor of my land which has for many centuries been our land. Even now except for the political differences people are almost the same.
Database Startup Problem
Last week the database on my local machine went down. I don’t use it much apart from trying out my pl\sql challenge questions. So I didn’t bother about looking into the problem later until today. So today I set out to see what the problem could be. I restarted the oracle service from services. I connected using the sys to the idle instance and tried to open the database. The database seems to have been mounted. But when I ran the below command I got the below error.
Alter database open;
ORA-38760: This database instance failed to turn on flashback database
This is clearly because the flashback log has been filled up. In the init.ora file the parameter db_recovery_file_dest_size was set to a value of 2147483648. When I checked the location of the db_recovery_file_dest the size was about 2GB. So I guess since the memory exceeded the value in the init.ora file the database could no longer write flashback data into the destination location. I tried to delete the files from the flashback destination directory but things did not work out. I shut the database down. Mounted the database, turned off flashback and restarted my database without any issues.
> Shutdown
> Startup no mount
> Alter database mount;
> Alter database flashback off;
> Alter database open;
With the above commands executed successfully, database seems to working like a jiffy.
Alter database open;
ORA-38760: This database instance failed to turn on flashback database
This is clearly because the flashback log has been filled up. In the init.ora file the parameter db_recovery_file_dest_size was set to a value of 2147483648. When I checked the location of the db_recovery_file_dest the size was about 2GB. So I guess since the memory exceeded the value in the init.ora file the database could no longer write flashback data into the destination location. I tried to delete the files from the flashback destination directory but things did not work out. I shut the database down. Mounted the database, turned off flashback and restarted my database without any issues.
> Shutdown
> Startup no mount
> Alter database mount;
> Alter database flashback off;
> Alter database open;
With the above commands executed successfully, database seems to working like a jiffy.
Friday, February 18, 2011
HTML, XHTML, and CSS: Your Visual Blueprint for Designing Effective Web Pages - Book Review
I picked up this book as it was available in my library and I wanted to brush up my html/css skills because the last time I read about html was way back in 2000 when I first created a web site for a college competition. My professional life so far has been mostly involved in databases so I never really got to do much on web applications. But now I work on a web app which uses html/css and Javascript extensively. This book was perfect for me since it was very easy to follow and each page has an exercise which really helps in better understanding the concepts. And for the kind of learner that I am that was perfect.
It gives a good description of html and css and ways to make your site usable for disabled users as well. It also explains the best practices, standards of XHTML and workarounds for cross browser compatibilities. A brief introduction to Javascript is also given at the end of the book which is pretty good for a learner. It also gave some explanation on how to use google maps etc. On the whole this was a really good book to brush up on html/css and written in such a way that you can finish this book in less than a week.
It gives a good description of html and css and ways to make your site usable for disabled users as well. It also explains the best practices, standards of XHTML and workarounds for cross browser compatibilities. A brief introduction to Javascript is also given at the end of the book which is pretty good for a learner. It also gave some explanation on how to use google maps etc. On the whole this was a really good book to brush up on html/css and written in such a way that you can finish this book in less than a week.
Wednesday, January 05, 2011
Query to find the program which does sequential log file read
select
ses.program
from
v$session_event sev,
V$session ses
where
sev.event = 'log file sequential read'
and ses.sid = sev.sid
;
Go here for more detail.
ses.program
from
v$session_event sev,
V$session ses
where
sev.event = 'log file sequential read'
and ses.sid = sev.sid
;
Go here for more detail.
Wednesday, December 22, 2010
Recovering a dropped User.
Jonathan Lewis provided a link on how to recover a dropped user and I went to that link to find out how that was done. This is the link to that site.
I tried it out on the database on my laptop and it works like jiffy. Below is what I did.
This seem to be perfect if we can shutdown and startup the data base so easily. How do we recover if the database can not be shutdown and still the user need to be recovered. I know if it is asking for too much. But since I am a developer and not a DBA down time is still a taboo for me. I am eager to know how this is done traditionally.
I tried it out on the database on my laptop and it works like jiffy. Below is what I did.
create user flashtest identified by flashtest ;
grant connect,resource,dba to flashtest;
conn flashtest/flashtest;
create table emp(ename varchar2(20),city varchar2(20));
insert into emp values('azar','riyadh');
insert into emp values('kareem','dubai');
insert into emp values('azmi','chennai');
insert into emp values('idress','riyadh');
insert into emp values('ajmal','chennai');
commit;
select current_timestamp from dual;
conn / as sysdba
drop user flashtest cascade;
shutdown immediate
startup mount
flashback database to timestamp to_date('22-DEC-10 09.25.30','DD-MM-YY HH24:MI:SS');
alter database open read only;
conn flashtest/flashtest;
select * from emp;
host exp flashtest/flashtest file=emp.dmp log=emp.log direct=y consistent=y statistics='none';
conn / as sysdba
shutdown immediate
startup mount
recover database;
alter database open;
conn sys as sysdba
create user flashtest identified by flashtest;
grant connect,resource,dba to flashtest;
host imp flashtest/flashtest file=emp.dmp log=emp.log full=y
This seem to be perfect if we can shutdown and startup the data base so easily. How do we recover if the database can not be shutdown and still the user need to be recovered. I know if it is asking for too much. But since I am a developer and not a DBA down time is still a taboo for me. I am eager to know how this is done traditionally.
Alert Log
We can obtain the location of the alert log using the below query.
select VALUE from v$parameter where upper(name) ='BACKGROUND_DUMP_DEST';
select VALUE from v$parameter where upper(name) ='BACKGROUND_DUMP_DEST';
Tuesday, December 21, 2010
Nocopy
In today's plsqlchallenge I learned another new thing. It is the NOCOPY option for the parameters in a procedure or a function. I was under the impression that when we pass a variable with the nocopy option the variables changes in the procedures will not be passed over. But that doesn't seem to be correct. When we pass a parameter with the NOCOPY option, no seperate copy of the variable is made in the memory and the passed variable is used to modify. This makes more sense while using collection variables. If for example we pass a VARRAY as in out parameter without the NOCOPY option then the variable is copied to a temporary variable and then the changes are made. In the case of NOCOPY the changes are made to the original variable itself. In case an exception occurs then in the case of NOCOPY the original variable would have changed but in the case where NOCOPY is not specified the orginal value remains intact. Below is the sample code from todays sample quiz.
create or replace package plch_pkg
is
type number_nt is table of number;
procedure pass_nums1 (nums in out number_nt);
procedure pass_nums2 (nums in out nocopy number_nt);
procedure show_nums (nums in number_nt);
end;
/
create or replace package body plch_pkg
is
procedure pass_nums1(nums in out number_nt) is
begin
for indx in nums.first..nums.last
loop
nums(indx):=nums(indx)*2;
raise value_error;
end loop;
end pass_nums1;
procedure pass_nums2(nums in out nocopy number_nt) is
begin
for indx in nums.first..nums.last
loop
nums(indx):=nums(indx)*2;
raise value_error;
end loop;
end pass_nums2;
procedure show_nums(nums in number_nt) is
l_return pls_integer :=0;
begin
for indx in nums.first..nums.last
loop
l_return := l_return+nums(indx);
end loop;
dbms_output.put_line(l_return);
end show_nums;
end plch_pkg;
/
show err
declare
nums1 plch_pkg.number_nt :=plch_pkg.number_nt(1,2,3);
nums2 plch_pkg.number_nt :=plch_pkg.number_nt(1,2,3);
begin
begin
plch_pkg.pass_nums1(nums1);
exception when others then
plch_pkg.show_nums(nums1);
end;
begin
plch_pkg.pass_nums2(nums2);
exception when others then
plch_pkg.show_nums(nums2);
end;
end;
/
Tuesday, November 16, 2010
Alias In Unix
Alias is definitely one of those commands which we would have read about in the beginners books on learning unix. But it took me 10 years to really use this command.
I had to change directories frequently and was tired of typing the whole directoy path and was thinking of a smarter way to accomplish it. I googled for a while and found this method.
alias abc = ‘cd change/to/directory/abc’
And now add the above command to the .profile so that we can just use the abc command when ever we want to move to the directory abc. Its very basic but pretty cool.
I had to change directories frequently and was tired of typing the whole directoy path and was thinking of a smarter way to accomplish it. I googled for a while and found this method.
alias abc = ‘cd change/to/directory/abc’
And now add the above command to the .profile so that we can just use the abc command when ever we want to move to the directory abc. Its very basic but pretty cool.
Tuesday, November 09, 2010
Loading data from a file into the database quickly
Below is a small procedure I created to load the contents of a file quickly into a database.
create or replace directory ext as 'C:\Nirmala\OracleLearning\ext';
create or replace procedure search_file(l_file_name varchar2
, search_string varchar2 default null ) as
l_table_count number;
begin
select count(1)
into l_table_count
from all_tables
where table_name = upper(trim(replace(l_file_name,'.','')));
if(l_table_count=1) then
execute immediate ' drop table '||trim(replace(l_file_name,'.',''));
end if;
execute immediate ' create table '||trim(replace(l_file_name,'.',''))||' (text clob ) organization external (type oracle_loader default directory ext location ('''||l_file_name||'''))';
execute immediate ' create table '||trim(replace(l_file_name,'.',''))||'_perm as select text , rownum line_number from '||trim(replace(l_file_name,'.',''));
end ;
Monday, November 08, 2010
Password Case sensitive in Oracle 11g.
Today I learned a new thing that from Oracle 11g the password has become case sensitive. The user id is still not case sensitive.
In older verison I never had a problem when I entered the password in upper or lower case. I checked on 10g and the password is case insensitive but in 11g it is sensitive. I guess if I read the new features guide I would have already know it. So its time again to remind my self that I need to read it.
In older verison I never had a problem when I entered the password in upper or lower case. I checked on 10g and the password is case insensitive but in 11g it is sensitive. I guess if I read the new features guide I would have already know it. So its time again to remind my self that I need to read it.
Thursday, November 04, 2010
7 Sins to stay away from
Politics without principles.
Wealth without work.
Pleasure without conscience.
Knowledge without character.
Commerce without morality.
Science without humanity.
Worship without sacrifice.
Wealth without work.
Pleasure without conscience.
Knowledge without character.
Commerce without morality.
Science without humanity.
Worship without sacrifice.
Tuesday, November 02, 2010
Word Power Made Easy - 2
fungible
:easily replaceable.
Autarky
:the condition of self-sufficiency, especially economic, as applied to a nation.
:a national policy of economic independence
Zeitgeist
:The taste, outlook, and spirit characteristic of a period or generation.
snivel
:to weep or cry with sniffling.
Schwag
:free merchandise
garter
:Also called, British , sock suspender, suspender. an article of clothing for holding up a stocking or sock, usually an elastic band around the leg or an elastic strap hanging from a girdle or other undergarment.
:a similar band worn to hold up a shirt sleeve.
:a leather strap for passing through a loop at the back of a boot and buckling around the leg to keep the boot from slipping.
foibles
:a minor weakness or failing of character; slight flaw or defect: an all-too-human foible.
paean
:any song of praise, joy, or triumph.
francophile
:friendly to or having a strong liking for France or the french.
kibble
: pet food.
tykes
: any small child.
:easily replaceable.
Autarky
:the condition of self-sufficiency, especially economic, as applied to a nation.
:a national policy of economic independence
Zeitgeist
:The taste, outlook, and spirit characteristic of a period or generation.
snivel
:to weep or cry with sniffling.
Schwag
:free merchandise
garter
:Also called, British , sock suspender, suspender. an article of clothing for holding up a stocking or sock, usually an elastic band around the leg or an elastic strap hanging from a girdle or other undergarment.
:a similar band worn to hold up a shirt sleeve.
:a leather strap for passing through a loop at the back of a boot and buckling around the leg to keep the boot from slipping.
foibles
:a minor weakness or failing of character; slight flaw or defect: an all-too-human foible.
paean
:any song of praise, joy, or triumph.
francophile
:friendly to or having a strong liking for France or the french.
kibble
: pet food.
tykes
: any small child.
Labels:
Words
Wednesday, October 27, 2010
Oracle Database Manual Creation
Finally I create a database manually on my machine. This is no big thing but I consider it an achivement in itself. Below are the steps I followed to create my sample database.
1) Create the init.ora file: I copied the sample init.ora file provided by the Oracle installations which will be located at ORACLE_HOME\dbs folder. I modifed the parameters in the file and created the flash_recovery_area folder.
2) Connect to an idle Instance: I have a default database already installed on my machine when I initially installed Oracle. So I had to shut it down using the "shutdown immediate" command.(The shutdown command was somehow taking a very long time so I restarted the machine and shutdown the instance again.) Then I connected to the idle instance.
3)Start the instance: Start the instance using the below command
1) Create the init.ora file: I copied the sample init.ora file provided by the Oracle installations which will be located at ORACLE_HOME\dbs folder. I modifed the parameters in the file and created the flash_recovery_area folder.
2) Connect to an idle Instance: I have a default database already installed on my machine when I initially installed Oracle. So I had to shut it down using the "shutdown immediate" command.(The shutdown command was somehow taking a very long time so I restarted the machine and shutdown the instance again.) Then I connected to the idle instance.
3)Start the instance: Start the instance using the below command
startup nomount pfile='c:\mynewdb\init.ora' <\code>
4) Create Database Command: Execute the create database command now as shown below.
CREATE DATABASE mynewdb
USER SYS IDENTIFIED BY mynewdb
USER SYSTEM IDENTIFIED BY mynewdb
LOGFILE GROUP 1 ('c:\mynewdb\redo01.log') SIZE 100M,
GROUP 2 ('c:\mynewdb\redo02.log') SIZE 100M,
GROUP 3 ('c:\mynewdb\redo03.log') SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
DATAFILE 'c:\mynewdb\system01.dbf' SIZE 325M REUSE
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE 'c:\mynewdb\sysaux01.dbf' SIZE 325M REUSE
DEFAULT TABLESPACE tbs_1
DATAFILE 'c:\mynewdb\tbs_01.dbf' SIZE 325M REUSE
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE 'c:\mynewdb\temp01.dbf'
SIZE 20M REUSE
UNDO TABLESPACE UNDOTBS
DATAFILE 'c:\mynewdb\UNDOTBS.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;
I ran into the below issues which took quite some time for me to find and fix them.
a)For undo table space, in the init.ora I gave a different name for the undo tablespace and in the create database command I used a different one, because of which my create statement was failing.
b)After I fixed that issue I have still getting some error during the default tablespace creation and I found that in my create statement the default tablespace does not have a datafile associated with it. I added the highlighted line in my create database command and the command worked fine. I am not sure what the issue really is because I took that particular create statement from the Oracle Database Administrator's Guide. Well I am not too bothered about that cause my database is created now(Yay..)
5)TableSpace Creation: Now I created some more tablespaces using the below commands.
CREATE TABLESPACE users LOGGING
DATAFILE 'c:\mynewdb\users01.dbf'
SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL;
CREATE TABLESPACE indx LOGGING
DATAFILE 'c:\mynewdb\indx01.dbf'
SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL;
6)Run Script to Create Data Dictionary Views: Finally I ran the catproc.sql and catalog.sql files located in the \rdbms\admin directories.
Well that completes my database creation manually. I am hoping that my original database installed previously also works fine.
I created a new user in the db and granted the create session and resource privileges. After that I try to connect to the DB but I get the below error
Error accessing PRODUCT_USER_PROFILE
Warning: Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
I connect as system and then run the pupbld.sql file from the sqlplus\admin directory. After that I am able to connect to the directory without any issues.
set ORACLE_SID = mynewdb
Thursday, October 14, 2010
dxdiag
Today I got a new machine(yay!!) and I had to install all my applications again on my machine. I wanted to know wether my machine was a 32 bit machine or a 64 bit one. I right clicked on "my computer" properties but that didn't give me enough information so I had to google and came across this command "dxdiag". When we click start>run and then type "dxdiag" then a diagnostic window opens which gives the details of the hardware on the machine. More can be read from this link on wiki site. But the irony is that even after checking all this I am unable to find whether my machine is a 32 bit one or a 64 bit one. I downloaded the 64 bit versions of Oracle developer and the database hoping that my machine is indeed a 64 bit one. Lets see if all the installs work or not.
Update:
Well supposedly my machine is not a 64 bit machine. I got to know that from the microsoft site. So now I am going to download all the 32 versions and install them again.
Update:
Well supposedly my machine is not a 64 bit machine. I got to know that from the microsoft site. So now I am going to download all the 32 versions and install them again.
Monday, October 04, 2010
Testing my first Javascript on my blog
Its been just two weeks that I started working on Javascript and I am loving every bit of it. I am not an expert yet. What the.. I am not even an intermediate developer of Javascript but I think I will be there sooner than later. I just wanted to check if I can write a little javascript code in my blog. So this posting is a experiment in the direction.
Click here to know who is the model in the above pic.
Click here to know who is the model in the above pic.
Thursday, September 30, 2010
Spooling a Query into a .csv file from sqlplus
This is one of the ways we can spool the output of a query into a .csv file.
set colsep , -- To separate columns with a comma
set pagesize 0 -- only one header row
set trimspool on -- To remove trailing blanks
set linesize 1000 -- It should be the sum of the column widths
set echo off -- Incase you have it on.
set feedback off -- To prevent any feedback rows int he output file.
spool test.csv
select *
from all_users;
spool off
set colsep , -- To separate columns with a comma
set pagesize 0 -- only one header row
set trimspool on -- To remove trailing blanks
set linesize 1000 -- It should be the sum of the column widths
set echo off -- Incase you have it on.
set feedback off -- To prevent any feedback rows int he output file.
spool test.csv
select *
from all_users;
spool off
Monday, August 30, 2010
Swap Space(Virtual Memory)
Today I was trying to install a program on my machine and I got a error stating the swap space was not sufficient. After I goggled a little I found that swap space is nothing but virtual memory and to increase the virtual memory I had to do this . Well I never imagined it would be that simple. Anyways now I am juggling with the real issues related to the program's installation and not something related to my hardware.
Subscribe to:
Posts (Atom)