select * from user_objects where object_type in('FUNCTION','PACKAGE','PROCEDURE';select text from user_source where name = yourstoreprocedurename;

解决方案 »

  1.   

    谢谢!还有一个问题,如何得到一个表的DDL语句?
      

  2.   

    为何要得到它,创建时不是已写在文档中?
    这一步是dba工作.
      

  3.   

    我是在偷懒,想做一个工具把一个用户下的表等所有对象的DDL导出来,不想一个一个做。然后在另外的库一句话就建立这些表来。
      

  4.   

    use the delphi's tool SQL explorer.
    or use power designer.
      

  5.   

    or use the export with the parameter ROWS=N, it will export all of the data structure, including table definition, index, trigger, procedure...etc.exp username/password@service_name file= rows=n
      

  6.   

    wenzhulz(触丝)的exp方法能得到,但是不是我想要的,我希望象PL/SQL Developer一样得到一个表的DDL,而且不用一个一个去取。SYS.all_source视图也象user_source一样,没有保存表的信息。这些视图user_tables、user_indexes保存部分表信息,但是要自己来组合成一个DDL,太麻烦了,偷懒是偶的本性了,大家想想办法吧,对你也有用呢。