Tuesday, October 30, 2012

SQL to list the number of database files in Oracle Database

Hi there,

 

Found this interesting query which will list you all the DB files holding your database:

 

select    name, bytes

from    (select    name, bytes

    from    v$datafile

    union    all

    select    name, bytes

    from     v$tempfile

    union     all

    select     lf.member "name", l.bytes

    from    v$logfile lf

    ,    v$log l

    where    lf.group# = l.group#) used

,    (select sum(bytes) as poo

    from dba_free_space) free

/

 

Hope it helps,

 

Regards

Fauzi

Thursday, October 11, 2012

How to select distinct Columns from DataTable C#

Following is the code helpful to filter distinct columns from a DataTable

 

DataTable distinctDT = dtSOURCE.DefaultView.ToTable("TAB_NAME", true, "YourCOLUMN");

 

Time to rush back to Visual Studio Bye J