Oracle DBA & All IT » รวม Script ต่างๆ
มหากาพย์ export/import ตอนที่ 3 ภาคจบ export by partition
มหากาพย์ export/import ตอนที่ 3 ภาคจบ export by partition วันนี้มาปิดมหากาพย์ export/import ด้วย export by partition หุหุ อย่าคิดว่ามหากาพย์จะยาวนะ เอาแค่ 3 ตอนก็น่าจะครอบคลุมทุกกระบวนท่ากันแล้วเนอะ ไม่เกริ่นแระมาเริ่มกันเลยดีกว่า ตัวอย่าง script สำหรับ export by partition แบบธรรมดา exp file=exp_par.dmp log=exp_par.log userid=system/password@db1 fromuser=scott touser=scott tables=scott.TABLENAME:PARTITION_NAME .. Preview : 1898 … Read entire article »
Filed under: Database, DBA, DBA, Oracle, รวม Script ต่างๆ
มหากาพย์ export/import ตอนที่ 2 export by SQL
มหากาพย์ export/import ตอนที่ 2 export by SQL เนื่องจากมีหลายคนถามมาว่า export แบบไม่เอาทั้ง table ได้มั้ยยย ก็ขอบอกเลยว่าได้จ้า มาดูกันว่าทำไง เรื่องของการ export data แบบใส่เงื่อนไขในการ export เลือกเฉพาะข้อมูลที่ต้องการออกมา คล้ายๆกับการ Select * from Where …… ตัวอย่าง Scipt ที่ใช้ในการ export สำคัญที่ parameter query exp file=exp_data.dmp log=exp_data.log query="where employee_name= 'SCOTT' " full=N tables=hr.employees userid=system/password@db1 Tip: ในส่วน query นั้น column ที่เรานำมา where จะต้องมีอยู่ใน table ที่เราเลือกที่จะ export ออกมา สามารถมีมากว่า 1 table ได้ แต่ขอให้มี column name เหมือนกันเท่านั้นเอง .. Preview : 3721 … Read entire article »
Filed under: Database, DBA, DBA, Oracle, Oracle Tips
มหากาพย์ export/import ตอนที่ 1 Compress and Split File
มหากาพย์ export/import ตอนที่ 1 Compress and Split File หายไปนานมาก….กกกก เลยอยากจะมาเสนอวิธีการ export/import แบบต่างๆ ไว้เป็นแนวทางให้เพื่อนๆไปทำกัน สำหรับ datapump โปรดติดตามตอนต่อไปหลังจากเสร็จสิ้นมหากาพย์นี้ หุหุ วันนี้กลับมาแนะนำวิธีการ export dmp file แบบ compress and split file เพื่อการประหยัดพื้นที่บน storage .. Preview : 3130 … Read entire article »
Filed under: Database, DBA, DBA, Oracle, Unix, รวม Script ต่างๆ
Synonyms คืออะไร??
หลายๆคนอาจจะเคยเจอปัญหาเช่นนี้… 21:13:58 SQL> select * from emp; select * from emp * ERROR at line 1: ORA-00942: table or view does not exist .. Preview : 20106Related Search:synonyms คือsynonym คืออะไรsynonym ตัวอย่างsynonymsynonyms คืออะไรsynonymคือตัวอย่าง synonymsynonyms ตัวอย่างsynonym มีอะไรบ้างsynonymsคืออะไร … Read entire article »
Filed under: Database, DBA, DBA, ORA-Error, Oracle Tips, Tuning Performance
SQL*PLUS – SET Statement
วันนี้รวบรวมคำสั่ง SET Statement ใน SQL*Plus มาฝากกัน เผื่อใครกำลังหาคำสั่งที่เหมาะ บางครั้งมีประโยชน์สำหรับการ Spool file ออกมาเป็น Report ที่เราต้องการ ส่วนไหนที่ไม่ต้องการให้แสดง เราก็ set off ซะ อันไหนอยากให้โชว์ เราก็ on ซะ แค่นี้เราก็จะได้ Report ที่สวยงามตามที่เราต้องการแล้ว ^^ .. Preview : 7761 … Read entire article »
Filed under: Database, DBA, DBA, Developer, Oracle, Oracle Tips, Utilities, รวม Script ต่างๆ
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 : 7044Related 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
ตัวอย่าง Program สำหรับให้ user Kill ตัวเอง
หลายครั้งที่ User ต้องขัดใจและเสียเวลา หรือว่าเกรงใจในการจะให้ DBA ทำการ Kill Session ที่รัน เนื่องด้วยเหตุผลใดทั้งปวงก็ตาม DBA อย่างเราเนื่องด้วยสิทธิ์การ Kill session นั้นจะต้องได้ Privilege อันสูงส่ง นั่นคือ ALTER SYSTEM ซึ่งถ้าได้ไป ฐานข้อมูลอันเป็นที่รักของเราคงต้องอยู่ในอันตรายอย่างแน่นอน .. Preview : 10564Related Search:synonym คือตัวอย่าง oracle … Read entire article »
Filed under: Database, DBA, DBA, Oracle, Oracle Tips, รวม Script ต่างๆ
แก้ปัญหา buffer overflow ใน SQL*Plus ,PL/SQL และ PL/SQL developer tools
วันนี้จะมาพูดถึง buffer overflow ใน pl/sql และการรันจาก pl/sql developer tools ถ้าเจอปัญหาอย่างนี้เราสามารถที่จะแก้ไขได้อย่างไร .. Preview : 8943Related Search:buffer overflowpl/sql developer … Read entire article »
Filed under: Developer, ORA-Error, Oracle Tips, Utilities