Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Export stored procedures and functions in system tables

2026-02-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

The following statement exports all the names of stored procedures used in the HIS system to a text file, and then runs to generate the corresponding synonyms

-

Select

'CREATE OR REPLACE PUBLIC SYNONYM' | |'"| | object_name | |'" | | 'FOR' | |

'"| | owner | |'" | |'. | |'. | |'"| | object_name | |'" | |';'

From dba_procedures

Where owner in (select username from dba_users where account_status = 'OPEN' and default_tablespace like' TSP%')

And object_type = 'PROCEDURE'

-

The following statement exports all the names of the functions used in the HIS system to a text file, and then runs to generate the corresponding synonyms

Select

'CREATE OR REPLACE PUBLIC SYNONYM' | |'"| | object_name | |'" | | 'FOR' | |

'"| | owner | |'" | |'. | |'. | |'"| | object_name | |'" | |';'

From dba_procedures

Where owner in (select username from dba_users where account_status = 'OPEN' and default_tablespace like' TSP%')

And object_type = 'FUNCTION'

-

The following statement exports all the names of the tables used in the HIS system to a text file, and then runs to generate the corresponding synonyms

Select

'CREATE OR REPLACE PUBLIC SYNONYM' | |'"| | SYNONYM_NAME | |'" | | 'FOR' | |

'"| | TABLE_OWNER | |'" | |'. | |'. | |'"| | TABLE_NAME | |'" | |';'

From dba_synonyms

Where TABLE_OWNER in (select username from dba_users where account_status = 'OPEN' and default_tablespace like' TSP%')

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

  • How to integrate Swagger2 in SpringBoot

    In this issue, the editor will bring you about how to integrate Swagger2 in SpringBoot. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article. The first step is to add dependency

    12
    Report