Thursday, December 20, 2012

http://www.google.com/search?q=kuwait+weather&sourceid=ie7&rls=com.microsoft:en-us:IE-SearchBox&ie=&oe=

 

 

 

Thanks & Regards


Varusai Fauzi Mohammed

|Kuwait Oil Company (KOC) |

|Systems Analyst | Research & Technology |

|Email: FVARUSAI@kockw.com | Web: www.kockw.com |

|Tel: +965 238 72496 | Fax: +965  23982370 |

|P.O Box 9758 | Ahmadi | Postal Code 61008 | Kuwait |

  Please consider the environment before printing

 

 

Monday, November 5, 2012

Oracle: syntax to Alter materialized view

Alter materialized view MV_NAME

refresh complete

start with trunc(sysdate)+17/24

next trunc(sysdate) - to_number(to_char(sysdate - 1, 'd')) + 5;

 

 

Thanks & Regards

Fauzi

 

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

Monday, April 30, 2012

Oracle: To Display list of table spaces

SELECT dd.tablespace_name tablespace_name, dd.file_name file_name, dd.bytes/1024 TABLESPACE_KB, SUM(fs.bytes)/1024 KBYTES_FREE, MAX(fs.bytes)/1024 NEXT_FREE

FROM sys.dba_free_space fs, sys.dba_data_files dd

WHERE dd.tablespace_name = fs.tablespace_name

AND dd.file_id = fs.file_id

GROUP BY dd.tablespace_name, dd.file_name, dd.bytes/1024

ORDER BY dd.tablespace_name, dd.file_name;

Monday, April 9, 2012

Oracle SQL Thread: Convert String to Datetime

Found this link useful

 

https://forums.oracle.com/forums/thread.jspa?threadID=598694

 

select to_date('2007-01-01 12:00:01 AM','yyyy-mm-dd hh:mi:ss pm') as dt from dual;

 

Wednesday, March 28, 2012

ORA-22858: invalid alteration of datatype, ORA-22858: invalid alteration of datatype

When we try to modify a datatype from varchar2(400) to Clob in a Oracle table, we’ll get the following error:

 

The following steps is the work-around to solve this issue:

 

ALTER TABLE SCHEMANAME.TABLENAME ADD NEWCOLUMN CLOB;

 

UPDATE SCHEMANAME.TABLENAME SET NEWCOLUMN = OLDCOLUMN;

 

ALTER TABLE SCHEMANAME.TABLENAME drop COLUMN OLDCOLUMN;

 

ALTER TABLE SCHEMANAME.TABLENAME rename COLUMN NEWCOLUMN TO OLDCOLUMN;

 

 

To Search for a text in All the files in a folder in Windows 7

Hello,

 

In windows 7 - I want to search for all files containing "A word or phrase in the file". The standard XP search box, But I was not able to get the result until I did the following steps.

 

Hope it is helpful for people who is looking for the same feature.

 

http://answers.microsoft.com/en-us/windows/forum/windows_7-files/in-windows-7-i-want-to-search-for-all-files/aadfe1f1-4a33-406b-8e72-bb920efa4f30

 


 

Monday, March 26, 2012

ORA-01461: can bind a LONG value only for insert into a LONG column

Salam,

         

To this issue showed me stars!

 

We are using Devart dotconnect to connect to oracle database.

 

In the Dataset, in the Table adapter the max length is set to -1 by default. And in the Auto generated Abstract class the string datatype length is set to 1024 by default. Now to fix this if we change the max length column alone will not be sufficient. We need the rebuild the method again and then move the DataSet to production to make the changes come into effect!

 

Best Regards

 

Thursday, March 22, 2012

List tables and their corresponding tablespace name and data file [Oracle]

SELECT T.TABLE_NAME,T.TABLESPACE_NAME,DF.FILE_NAME FROM DBA_TABLES T, DBA_DATA_FILES DF

 

SELECT T.TABLE_NAME,T.TABLESPACE_NAME,DF.FILE_NAME FROM DBA_TABLES T, DBA_DATA_FILES DF WHERE T.TABLESPACE_NAME = DF.TABLESPACE_NAME AND T.OWNER LIKE 'USER';

 

Wednesday, March 21, 2012

Grants for a User in Oracle Database

SELECT owner, table_name, select_priv, insert_priv, delete_priv, update_priv, references_priv, alter_priv, index_priv  
 
FROM table_privileges 
 
WHERE grantee = <theUser> 
 
ORDER BY owner, table_name;

Oracle: Search for column names in Oracle DataBase

I am looking for a SQL to find in tables in which a Column is present. The following SQL was helpful:

 

SELECT TABLE_NAME, COLUMN_NAME FROM ALL_TAB_COLUMNS WHERE COLUMN_NAME LIKE '%COL X%'

Sunday, March 18, 2012

Oracle: How to get All Schemas size in Server

The Following SQL is helpful to list the size of All Schemas present in Oracle Database

 

select owner, sum(bytes)/1024/1024 tsize

from dba_segments

group by owner

order by tsize desc

 

Trust its helpful…

 

Regards

Fauzi

FW: Allah calls to the home of peace

 

 

Hope you all are in good health. May almighty Allah shower us all with His blessings and guide us on the right & straight path, Aameen.

 

 

....:: 10. Yunus-Jonah (Makkah) ::....

Arabic


WaAllahu yadAAoo ila darialssalami wayahdee man yashao ila siratinmustaqeemin

TAMIL Translation  | Allama A.K.Abdul Hameed Baagavi(Rah)


 

Malayalam Translation | Cheriyamudam Abdul Hammed Madani & Kunchi Muhammed Parapur


ENGLISH Translation – Dr. Muhammad Taqi-ud-Din Al-Hilali, Ph.D. & Dr. Muhammad Muhsin Khan

 

[10:25] Allah calls to the home of peace (i.e. Paradise, by accepting Allah's religion of Islamic Monotheism and by doing righteous good deeds and abstaining from polytheism and evil deeds) and guides whom He wills to a Straight Path.

 

ENGLISH TAFSIR  - TAFSIR IBN ABBAS


(And Allah summoneth) all created beings by means of the profession of divine Oneness (to the abode of peace) the Peace (al-Salam) is Allah and His abode is Paradise, (and leadeth whom He will to a straight path) an established religion with which He is pleased, i.e. Islam.

 

URDU Translation | Dr. Col Muhammad Ayub


 



 

 

 

                       

Thursday, March 15, 2012

Oracel: How to create Sequence & Trigger

Following the syntaxes to create Sequence & Triggers

 

To Create Sequence:

===================

 

CREATE SEQUENCE "SchemaName"."Table1_LOG_SEQ" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1

 

 

To Create Trigger:

==================

 

CREATE TRIGGER SchemaName.Table1_LOG_TRIGGER

BEFORE INSERT ON SchemaName.Table1_LOG

FOR EACH ROW

BEGIN

SELECT Table_LOG_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL;

END;

 

Tuesday, March 13, 2012

Online HTML and CSS Table Border Style Wizard

Hi Reader,

 

I was looking for an online resource which can automatically generate styles for the tables which we create during web page development.

 

The following website was very much useful J

 

http://www.somacon.com/p141.php

 

Best Regards

Fauzi

Oracle SQL: How to find session that is blocking any object: For Monitoring

--List the session that is blocking any object: for Monitoring

 

select O.object_name,O.object_type,S.sid,S.UserName,S.MACHINE, S.serial#,L.oracle_username,L.os_user_name,L.locked_mode

from dba_objects O,v$locked_object L,v$session S

where O.object_id = L.object_id and S.sid = L.session_id

 

Thanks & Regards

Fauzi