Articles Comments

Oracle DBA & All IT » Programming

SQL*Loader DATE Format -ตัวอย่างที่3

วันนี้จะมาเล่าเกี่ยวกับการเอาข้อมูล date จาก file เข้า table ซึ่งหลายๆคนอาจจะเคยเจอปัญหาเข้าเข้าไม่ได้บ้าง format ไม่ตรง ซึ่งสำหรับ SQL*Loader สามารถที่จะ fix format ได้ ซึ่งจะทำให้ข้อมูลที่เราโหลดเข้า Table ถูกต้องยิ่งขึ้น   .. Preview : 4633 … Read entire article »

Filed under: Database, Oracle, Programming, Utilities

Trigger in Oracle

หลายๆคน อาจจะยังงงงวย ว่า Trigger มีเอาไว้ทำอะไร แล้วทำงานอย่างไร? วันนี้จึงถือโอกาสหยิบยกมาแนะนำกัน เผื่อมีใครจะนำไปใช้ประโยชน์จากมันได้บ้าง TRIGGER พูดง่ายๆคือ โปรแกรมๆ นึงที่ผูกติดไว้กับ Table นึง เพื่อจับตาดูเหตุการณ์ที่เกิดขึ้นกับ Table นั้นๆ แล้วถ้าเกิดเหตุการณ์นั้นๆ เราจะให้ทำอะไรต่อไป   .. Preview : 7964Related Search:trigger oracle คือ … Read entire article »

Filed under: Database, DBA, Function, Oracle, Oracle Tips, Programming, Utilities

PL/SQL developer: Dynamic Performance Tables not accessible

เฮ่อ.. หลังจากหนีน้ำท่วมมานาน เปิดงานมา User ก็หา Error มาฝากเลย เลยเอาวิธีแก้มาไว้ให้ดูกันจ้า.. Login into PL/SQL Developer with a new user, or execute the sql refer to the dynamic table, you may get the error below.   .. Preview : 7043Related Search:dynamic performance tables not accessibledynamic performance tables not accessible automatic statistics disabled for this session … Read entire article »

Filed under: Database, Developer, Oracle, Programming, Utilities

การ config EXTPROC บน Oracle11g

วันนี้เอาเรื่องการ config EXTPROC เพื่อให้ developer สามารถใช้ PL/SQL เรียกใช้โปรแกรมภาษาอื่นๆ ได้ เช่น java, c เป็นต้น   .. Preview : 6391Related Search:pl sql developer วิธีใช้ … Read entire article »

Filed under: Database, DBA, DBA, Developer, Function, Oracle, Programming, Utilities

Decode = IF-THEN-ELSE (The Oracle decode function)

Decode = IF-THEN-ELSE decode function สามารถที่จะใช้ใน SQL มีค่าเท่ากับ IF-THEN-ELSE เป็นทางเลือกหนึ่งที่ไม่ต่างจากการใช้ CASE ใน statement Syntax: decode( expression , compare_value, return_value, [,compare, return_value] … [,default_return_value] )   .. Preview : 19564Related Search:decode sqldecode oracleoracle decodedecode oracle คือsql decodedecode sql คือdecode คือSELECT DECODE … Read entire article »

Filed under: Database, Function, Oracle, Oracle Tips, Programming, Tuning Performance

ORA-14551 cannot perform a DML operation inside a query

      Error… Error… มาแล้วจ้า..  อิอิ เสียงตามสายจาก SA ที่รักถามไถ่มาว่า ทำไมๆๆ เรียกใช้ Function ที่ด้านในมี Update Statement ทำไมถึง Error ORA-14551: cannot perform a DML operation inside a query .. Preview : 5383Related Search:ora-14551 … Read entire article »

Filed under: Database, DBA, Function, ORA-Error, Oracle, Programming

Interval partitioning หมดปัญหาเรื่องการลืมสร้าง Partition เตรียมไว้

         วันก่อนนึกครื้มๆ ก็เลยนั่งอ่าน New Feature เล่นๆ ดูว่าตัวไหนน่าสนใจเอามาใช้ให้เป็นประโยชน์ได้บ้าง แล้วก็เหลือบไปเห็น Interval Partitioning (automated partition creation) อืม… น่าสนใจแฮะ เหมาะกับคนขี้ลืมอย่างเรามาก ถ้ามันมี auto แบบนี้สบายเลย ไม่ต้องมานั่งทำทุกเดือน หรือทำเผื่อไว้ล่วงหน้า แจ๋วแฮะ.. วันนี้เลยเอามาฝากเพื่อนๆกัน .. Preview : 11099 … Read entire article »

Filed under: Database, DBA, New Feature, Oracle, Programming, Tuning Performance

SQL Trace จับ Query Statement ที่มีปัญหา..

วันนี้แอบเอาเรื่องการใช้ SQL Trace มาช่วยในการจับปรับ SQL ที่มีปัญหา หลายๆครั้งที่ developer พัฒนา application ขึ้นมาแล้วบางครั้งทำงานช้า แต่ไม่รู้ว่าช้าที่ statment ไหน DBA อย่างเราก็สามารถที่จะช่วยเหลือได้ โดยการ เปิด Trace session app นั้นๆ ซึ่งจะเก็บ statement ที่ทำทั้งหมดใน app นั้น แต่ Function นี้จะใช้ได้ก็ต่อเมื่อ Session นั้นรันอยู่   .. Preview : 11638Related Search:sqltrace … Read entire article »

Filed under: Database, DBA, Oracle, Programming, Tuning Performance

การใช้งาน vi editor บน unix

Vi คืออะไร (What is vi?) Vi (visual editor) คือ editor พื้นฐานในระบบปฏิบัติการ Unix ซึ่งเป็นโปแกรม editor ใช้สำหรับ เพิ่ม ลบ แก้ไข ไฟล์ข้อมูลใดๆ โดยมีคำสั่งพื้นฐานดังนี้ UNIX vi editor มี  2 โหมด: Command mode เป็นคำสั่งสำหรับทำการใดๆกับไฟล์  Insert mode ใช้สำหรับการใส่ข้อมูลลงไฟล์ กดปุ่ม <Esc> (Escape) สำหรับยกเลิกการใช้โหมด insert   NOTE: ทั้ง UNIX และ vi เป็น case-sensitive. (ตัวเล็กตัวใหญ่ต่างกัน)   .. Preview : 15123Related Search:vi editor คือวิธีการใช้ vivi modeการใช้งาน vivi unixvi editor … Read entire article »

Filed under: Programming, Unix