query สำหรับดึง source code ใน oracle

เนื่องจากบทความที่แล้ว เป็น query สำหรับดู DEPENDENCY ของ object

สำหรับ query ที่ใช้สำหรับดึง code ในส่วนของ source code ที่เป็น view คือ

SELECT text
FROM all_views
WHERE view_name= ?

สำหรับ ที่เอาไว้ดึง function + procedure คือ

SELECT text
FROM all_source
WHERE name= ? and type = ?
order by line

TIP: เราสามารถเขียน program สำหรับดึงข้อมูลต่างๆ มาสร้างเป็น script ไว้สำหรับทำเป็น database deploy ได้ครับ กรณีที่มัน dependency กันลองต่อยอดดูนะครับ

This entry was posted in Oracle and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>