Showing posts with label Oracle DBA Handy. Show all posts
Showing posts with label Oracle DBA Handy. Show all posts

Wednesday, February 8, 2012

Disable "Save Password" in SQL Developer

Handy information for people who connect to various databases, yet share their workstations. You may have SQL Developer where you tend to store passwords, and to prevent accidental connection to your databases when others use the machine, it is safe to disable the "Save password" option on your SQL Developer.

Edit the sqldeveloper/bin/sqldeveloper.conf and add this:
AddVMOption -Dsqldev.savepasswd=false



Tuesday, October 5, 2010

Installing Oracle 11gR2 - Linux x86 - owb/external/oc4j_applications/applications/WFMLRSVCApp.ear not found

Installing Oracle 11gR2 on Linux x86.  It is deemed a simple task as long as we unlearn the way we install previous versions of Oracle and pick this up.

Both Disk1 and Disk2 should be unzipped in to same location .. what I mean is.. unzipping both will result in single directory named database. Launch installer from this location.

Otherwise, resolving kernel parameters and package dependencies are rather simple.

Monday, August 16, 2010

Calculating size of a table in Oracle

Before calculating the size of a table, one should understand how a table is stored.

A table is physically stored in a datafile on disk. Oracle reserves a defined space before writing the data. The data file is organized in to chunks called segments, which further contains chunks named extents and each extent is organized in to most atomic units called the blocks. The size of the block is determined by the Oracle init parameter named "db_block_size".


The data dictionary stores the details of filled and free blocks or extents. (You should do a step called "analyze" to gather the table statistics)
something like analyze table MYTAB compute statistics;
This might take long time depending on your tablesize.

And now you are ready to query the data dictionary tables to find the size occupied by the table.

select sum(blocks) from user_extents
where segment_name = 'TABLE_NAME'
and segment_type = 'TABLE';

or 

select blocks,EMPTY_BLOCKS,avg_space,
avg_row_len,NUM_FREELIST_BLOCKS  from user_tables
where table_name='TABLE_NAME';


My personal choice is the first query.

Final steps ...
1. Know the block size by running "show parameter db_block_size" in sqlplus.
2. Multiply the block size by sum(blocks), and you get the table size.

Wednesday, July 21, 2010

SQL Server 2008 for the Oracle DBA

For those who have lived long enough working Oracle, and if you wish to learn SQL server 2008 by mapping feature set to Oracle database, then this is the video for you.

http://technet.microsoft.com/en-us/sqlserver/dd548020.aspx

Quick Summary from the link:
This 15 modules, level 300 course provides students with the knowledge and skills to capitalize on their skills and experience as an Oracle DBA to manage a Microsoft SQL Server 2008 system. This workshop provides a quick start for the Oracle DBA to map, compare, and contrast the realm of Oracle database management to SQL Server database management.

Tuesday, February 2, 2010

How to know the sessions active in your Oracle database ?

The following query should give you the summary of users and the number of sessions held by them.

SQL> select schemaname, session_count from 
(select distinct schemaname, count(sid) as session_count from v$session group by schemaname) 
order by session_count desc;


-- To know the total number of sessions in progress...
SQL> select count(*) from v$session;