Articles Comments

Oracle DBA & All IT » Archive

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 : 7044 … Read entire article »

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

kewastUnPackStats(): bad magic 1

วันนี้เอา Bug จิ๊บๆมาฝากกันบน version 11.2.0.1 เผื่อใครเจอแล้วหาทาง workaround กันอยู่ มี message "kewastUnPackStats(): bad magic 1" นี้ใน alert.log   .. Preview : 5083 … Read entire article »

Filed under: Database, DBA, ORA-Error, Oracle, Oracle Tips

การ config EXTPROC บน Oracle11g

วันนี้เอาเรื่องการ config EXTPROC เพื่อให้ developer สามารถใช้ PL/SQL เรียกใช้โปรแกรมภาษาอื่นๆ ได้ เช่น java, c เป็นต้น   .. Preview : 6392 … 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 : 19572 … Read entire article »

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

Hint คำใบ้ช่วย Tuning Performance (Oracle SQL Hints Tuning)

หายไปนานคิดว่าจะเอาเรื่องอะไรมาเขียนดีน๊า… แล้วก็คิดว่าวันนี้เรามาเล่นใบ้คำกับ oracle ดีกว่า ดูซิว่า Database อันชาญฉลาดอย่าง Oracle จะรู้จักคำใบ้ที่เราจัดให้หรือเปล่า หุหุ..   .. Preview : 23245 … Read entire article »

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

วิธีการย้ายที่หรือเปลี่ยนชื่อ Oracle file

     วันนี้ขอเสนอตอนว่า "วิธีการย้ายที่หรือเปลี่ยนชื่อ Oracle file" หรือ "Renaming or Moving Oracle Files" อิอิ วันนี้จะไม่เกริ่นไรมากมายเข้าเรื่องกันเลย โดยเราจะแยกแต่ละชนิดของ file เพื่อให้ง่ายแก่ความเข้าใจ ^^   .. Preview : 8747 … Read entire article »

Filed under: Database, DBA, Oracle

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 : 5384 … Read entire article »

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

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

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

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

ตัวอย่าง Program สำหรับให้ user Kill ตัวเอง

         หลายครั้งที่ User ต้องขัดใจและเสียเวลา หรือว่าเกรงใจในการจะให้ DBA ทำการ Kill Session ที่รัน เนื่องด้วยเหตุผลใดทั้งปวงก็ตาม DBA อย่างเราเนื่องด้วยสิทธิ์การ Kill session นั้นจะต้องได้ Privilege อันสูงส่ง นั่นคือ ALTER SYSTEM ซึ่งถ้าได้ไป ฐานข้อมูลอันเป็นที่รักของเราคงต้องอยู่ในอันตรายอย่างแน่นอน   .. Preview : 10565 … Read entire article »

Filed under: Database, DBA, DBA, Oracle, Oracle Tips, รวม Script ต่างๆ

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

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

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