oracle sql package proceudre tirgger function source code 程式碼 原始碼 資料搬遷
當初在做資料搬遷時,要一個一個把DB物件打開再把原始碼複製出來是一件很麻煩的工作,當然Toad也是有相對支持的工具,但這段Script可以幫助你將原始碼取出的方式程式化
SELECT DO.object_name,
DO.object_type,
s.line,
s.SOURCE
FROM dba_objects DO,
SYS.source$ s
WHERE 1 = 1
AND DO.object_name = '&SOURCE_NAME'
AND DO.object_type = 'PACKAGE BODY'
AND DO.object_id = s.obj#
ORDER BY s.line