A SHORT MEANINGFUL STORY
A contractor, who had made a fortune building homes, told his supervisor of 35 years,
"i'm going to build one last house and u will build it for me coz i'll b gone for a year.
use the best material --money is no consideration ..make it the greatest house we've ever built"......
having given these instruction , the man left ..
the supervisor thought that this was a great oppurtunity to make a fortune .
He used the cheapest material inside but made the house look beautiful frm outside..
after a year ,the contractor returned,he inspected the house and asked the supervisor what he thought of the house .
The supervisor replied"it's the best house i've ever built"
THE CONTRACTOR HANDED OVER THE DEED TO HIM AND SAID
"THIS IS MY PARTING GIFT TO U"
MORAL --- we shud Develop a high standard of personal ethics ....and always do
the right things ,even if no one is watching us.
Murtuja.
I would prefer to be a honest failure than to be a corrupt success..
Oracle DBA Blog
Thursday, May 22, 2008
Thursday, April 17, 2008
Can't connect to MySQL (10061)
Add this line to my.cnf file
bind-address = 127.0.0.1
restart mysql service
nowconnect mysql from command prompt
mysql -u root -p
Password
mysql>use mysql;
mysql>UPDATE user SET password=password("newpassword") WHERE user="root";
mysql>FLUSH PRIVILEGES;
bind-address = 127.0.0.1
restart mysql service
nowconnect mysql from command prompt
mysql -u root -p
Password
mysql>use mysql;
mysql>UPDATE user SET password=password("newpassword") WHERE user="root";
mysql>FLUSH PRIVILEGES;
Thursday, April 10, 2008
lsnrctl status is not returing service name in RAC
Problem:
ORA-12154: TNS:could not resolve the connect identifier specified
lsnrctl status is not returing service name
Fix:
alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = blr-catfish-rac1-vip) (PORT = 1521))' scope=both sid='ORCL1';
ORA-12154: TNS:could not resolve the connect identifier specified
lsnrctl status is not returing service name
Fix:
alter system set local_listener='(ADDRESS = (PROTOCOL = TCP)(HOST = blr-catfish-rac1-vip) (PORT = 1521))' scope=both sid='ORCL1';
Monday, April 7, 2008
How to avoid hot block contention for small look-up tables ?
Find out block contention .
While run the query found HOTBLOCK of tables and indexes on the schema.
Identified like :
==========
1.
SQL> SELECT p1 "file#", p2 "block#", p3 "class#"
FROM v$session_wait
WHERE event = 'buffer busy waits';
file# block# class#
---------- ---------- ----------
1045 99752 130
1045 99752 130
1045 99752 130
1045 99752 130
1045 99752 130
1045 99752 130
6 rows selected.
2.
SQL> SELECT relative_fno, owner, segment_name, segment_type
FROM dba_extents
WHERE file_id = &file
AND &block BETWEEN block_id AND block_id + blocks - 1; 2 3 4
Enter value for file: 1045
old 3: WHERE file_id = &file
new 3: WHERE file_id = 1045
Enter value for block: 99752
old 4: AND &block BETWEEN block_id AND block_id + blocks - 1
new 4: AND 99752 BETWEEN block_id AND block_id + blocks - 1
RELATIVE_FNO OWNER
------------ ------------------------------
SEGMENT_NAME
--------------------------------------------------------------------------------
SEGMENT_TYPE
------------------
22 SCAADM
SCA_TMS_LOV_MAP
TABLE
==========
Table : SCA_TMS_LOV_MAP
alter table table_name minimize records_per_block;
verify
dbms_stats.gather_table_stats(ownname => user, tabname => v_table , estimate_percent => 100,
method_opt => 'for all indexed columns size auto',
degree => 4 ,cascade => v_cascade );
select table_name,num_rows,blocks from user_tables where table_name ='table_name '
While run the query found HOTBLOCK of tables and indexes on the schema.
Identified like :
==========
1.
SQL> SELECT p1 "file#", p2 "block#", p3 "class#"
FROM v$session_wait
WHERE event = 'buffer busy waits';
file# block# class#
---------- ---------- ----------
1045 99752 130
1045 99752 130
1045 99752 130
1045 99752 130
1045 99752 130
1045 99752 130
6 rows selected.
2.
SQL> SELECT relative_fno, owner, segment_name, segment_type
FROM dba_extents
WHERE file_id = &file
AND &block BETWEEN block_id AND block_id + blocks - 1; 2 3 4
Enter value for file: 1045
old 3: WHERE file_id = &file
new 3: WHERE file_id = 1045
Enter value for block: 99752
old 4: AND &block BETWEEN block_id AND block_id + blocks - 1
new 4: AND 99752 BETWEEN block_id AND block_id + blocks - 1
RELATIVE_FNO OWNER
------------ ------------------------------
SEGMENT_NAME
--------------------------------------------------------------------------------
SEGMENT_TYPE
------------------
22 SCAADM
SCA_TMS_LOV_MAP
TABLE
==========
Table : SCA_TMS_LOV_MAP
alter table table_name minimize records_per_block;
verify
dbms_stats.gather_table_stats(ownname => user, tabname => v_table , estimate_percent => 100,
method_opt => 'for all indexed columns size auto',
degree => 4 ,cascade => v_cascade );
select table_name,num_rows,blocks from user_tables where table_name ='table_name '
Thursday, April 3, 2008
Oracle TKPROF
This link will explain you what is tkprof ? how to generate tkprof?
http://www.oracle-base.com/articles/8i/TKPROFAndOracleTrace.php
http://www.oracleutilities.com/OSUtil/tkprof.html
Once you generated tkprof then you need to interpret it’s out put
http://www.adp-gmbh.ch/ora/tuning/tkprof/count_cpu_elapsed.html
http://www.adp-gmbh.ch/ora/tuning/tkprof/query_current.html
http://www.jlcomp.demon.co.uk/tkprof_01.html
http://www.oracle-base.com/articles/8i/TKPROFAndOracleTrace.php
http://www.oracleutilities.com/OSUtil/tkprof.html
Once you generated tkprof then you need to interpret it’s out put
http://www.adp-gmbh.ch/ora/tuning/tkprof/count_cpu_elapsed.html
http://www.adp-gmbh.ch/ora/tuning/tkprof/query_current.html
http://www.jlcomp.demon.co.uk/tkprof_01.html
Sunday, January 27, 2008
The skill of searching
The skill of searching is one of the most important skills you need these days to survive.
The communication on the net is another one.
Ignorance is the opposite.
Just to kick-start your skilling:
when searching:
clearly state the question/request:
in your case: "I need a sql to delete duplicate rows in oracle table"
cut the overhead out:
delete duplicate rows
Go through some of the items on top, and if you didn't find the answer - then your keywords are wrong.
When all other fails - ther eare many other search engines.
My personal preference is Google, but feel free to use any other. When searching on the generic search engine, you should include the keyword "Oracle".
Let's see if this is good for you:
http://www.google.com/search?q=oracle+delete+duplicate+rows
If you didn't find the answer in the first five references - your list of keywords is wrong!
If you want to learn moer about the searching from master Fravia:
http://www.searchlores.org/
Also - it pays to educate in the general communication skills on the net.
Seatch on netiquette on google:
http://www.google.com/search?hl=en&lr=&q=netiquette
then read a bit.
When ready - come back with some real questions.
Good luck
The communication on the net is another one.
Ignorance is the opposite.
Just to kick-start your skilling:
when searching:
clearly state the question/request:
in your case: "I need a sql to delete duplicate rows in oracle table"
cut the overhead out:
delete duplicate rows
Go through some of the items on top, and if you didn't find the answer - then your keywords are wrong.
When all other fails - ther eare many other search engines.
My personal preference is Google, but feel free to use any other. When searching on the generic search engine, you should include the keyword "Oracle".
Let's see if this is good for you:
http://www.google.com/search?q=oracle+delete+duplicate+rows
If you didn't find the answer in the first five references - your list of keywords is wrong!
If you want to learn moer about the searching from master Fravia:
http://www.searchlores.org/
Also - it pays to educate in the general communication skills on the net.
Seatch on netiquette on google:
http://www.google.com/search?hl=en&lr=&q=netiquette
then read a bit.
When ready - come back with some real questions.
Good luck
Monday, January 7, 2008
determine the service pack that's installed on your SQL Server
Execute the following command:
SELECT @@VERSION
SELECT SERVERPROPERTY('ProductLevel')
SELECT @@VERSION
SELECT SERVERPROPERTY('ProductLevel')
Subscribe to:
Posts (Atom)