Friday, September 21, 2007

Some thing about Shared Pool

Here's a good presentation, explaining the internal structure of shared pool and how lock, pin and latch are handled.

http://www.perfvision.com/papers/unit6_shared_pool.ppt

Friday, July 06, 2007

Set SQL*Plus Prompt

Since most DBAs will use SQL*Plus more than any tools else, it will be convenience if you can set your SQL*Plus prompt to show your current login user and SID instead of this "SQL>". Especially if you have mulitple instances running under same Oracle installation.

To do this, you need to include following in your glogin.sql

set term off
define sql_prompt=idle
column user_sid new_value sql_prompt
select lower(user) '@' '&_CONNECT_IDENTIFIER' user_sid from dual;
set sqlprompt '&sql_prompt> '
set term on

When you login you will see this,

sqlplus scott/tiger
scott@dev


If you are on 10g, it becomes much easier by only this,

set sqlprompt '_user@&_connect_identifier>'


Monday, June 25, 2007

Getting a job as a Junior DBA - series

Unfortunately, due to some unspecified events happened early 2008, Howard decide to withdraw his contribution to Oracle community. More info here
The interview series link is no longer valid. I wish I had cut/pasted it :(

One of the most common Q I saw new DBA ask in Oracle forum is what kind of questions employer will ask during a job interview? I tried to sum a few questions I have been asked during job interviews as a job candidate.

Howard Rogers has nice serie in his blog from interviewer's prospective.
Getting a job as a Junior DBA

Frankly if you ask me, I don't want to work for him :) However that doesn't change the fact it's a nice reading.

Heterogeneous Distributed Database Systems

How to maintain a regular data replication between other type of databases with Oracle is a pretty frequently asked question in DBA world.

Consider setup Heterogeneous Distributed Database Systems to solve the problem.

John Palinski has a good post about it here

Saturday, June 23, 2007

Shared Pool Structures

A useful link to a white page about shared pool

Understanding Shared Pool Memory Structures

Also to toubleshoot any ORA-4031 error, metalink has a good note,

Troubleshooting and Diagnosing ORA-4031 Error (previously FAQ: ORA-4031):
Note:396940.1

Thursday, June 21, 2007

Find out Rollback Segment with active transactions

Use this script to find out how many active transactions link with a rollback segment.

SELECT NAME, XACTS "ACTIVE TRANSACTIONS"
FROM V$ROLLNAME, V$ROLLSTAT
WHERE V$ROLLNAME.USN = V$ROLLSTAT.USN

Secure your Password

You should run following script $ORACLE_HOME/rdbms/admin/utlpwdmg.sql
to secure your Password via Default Profile after DB creation. Or expect to see a lot of Policy Violations in your EM dbconsole for the instance.
I don't know why Oracle didn't make these setting 'Default' in the first place.
You could modify the CREATE FUNCTION verify_function part to fit your need.

alter profile default
limit failed_login_attempts 3
password_grace_time 10
password_life_time 45
password_lock_time unlimited
password_reuse_max 180
password_reuse_time unlimited password_verify_function VERIFY_FUNCTION;