Source code for backing up a package in Oracle

Source: Internet
Author: User

You need to specify the packagesSource codeBackup export:

Sets long 10240000
Spool c: \ package. SQL
Select text from all_source where ....
Spool off

 

-- Find the required package name

Select *
From all_objects t
Where T. object_type = 'package'
And owner = 'apps'
And trunc (T. last_ddl_time)> to_date ('2017-3-11 ', 'yyyy-MM-DD ')
And trunc (T. Created)> to_date ('2017-3-15 ', 'yyyy-MM-DD ')
Order by T. Created

 

-- Find the corresponding text based on the package name.

Select X .*
From all_source x
Where X. Owner = 'apps'
And exists
(Select 1
From all_objects t
Where T. object_type = 'package'
And owner = 'apps'
And trunc (T. last_ddl_time)> to_date ('2017-3-11 ', 'yyyy-MM-DD ')
And trunc (T. Created)> to_date ('2017-3-15 ', 'yyyy-MM-DD ')
And X. Name = T. object_name)

 

And then export it to the text.

20110926

View which packages or procedure references a table

Select X .*
From all_source x
Where instr (X. Text, 'table _ name')> 0

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.