set head off
set lin 150 set pages 0 set long 10000 select TEXT from user_source t where t.name = upper('get_car_status_new') order by TYPE, LINE;=======================
set pages 0
set longchunksize 3000 set long 2000000000 set head off set linesize 1000 set feedback off set trim on set trims on set echo off set term off set autotrace on set serveroutput on■ パッケージのソースを表示
select dbms_metadata.get_ddl('PACKAGE','BSA_PKG','CLARO') from dual;■ トリガーのソースを表示
select dbms_metadata.get_ddl('TRIGGER','UPDATE_STATUS_BROS_WEB','CLARO') from dual;■ タイプのソースを表示
select dbms_metadata.get_ddl('TYPE','BSA_PRICE_TYP','CLARO') from dual;■ 関数のソースを表示
select dbms_metadata.get_ddl('FUNCTION','GET_BIKE_STATUS','CLARO') from dual;■ レビューのソースを表示
select dbms_metadata.get_ddl('VIEW','BSA_CHECKLIST_VW','BPPROTO') from dual;■ プロシージャーのソースを表示
select dbms_metadata.get_ddl('PROCEDURE','BSA_PROC_FTP_MGMT','CLARO') from dual;■ シーケンスのソースを表示
select dbms_metadata.get_ddl('SEQUENCE','SEQ_SHARESTOCK_ID','CLARO') from dual;■ 通し番号のソースを表示
select dbms_metadata.get_ddl('SYNONYM','BSA_VW_ACS_SUM_DAILY','CLARO') from dual;■ MATERIALIZEDレビューのソースを表示
select dbms_metadata.get_ddl('MATERIALIZED_VIEW','BSA_BIZ_TOOL_EST_CNT','CLARO_MV') from dual;■
SELECT OBJECT_TYPE FROM USER_OBJECTS WHERE OBJECT_NAME='';■
SELECT OWNER AS UNAME,OBJECT_NAME FROM ALL_OBJECTS WHERE OBJECT_TYPE='' AND OWNER LIKE '' ;■
SELECT COLUMN_NAME FROM ALL_TAB_COLUMNS WHERE OWNER='' AND DATA_TYPE='' AND TABLE_NAME='';■
select query from all_mviews where mview_name = upper('BSA_BIZ_TOOL_MASTER');■
SELECT TABLE_NAME || '|'|| COMMENTS FROM USER_TAB_COMMENTS;■
select a.constraint_name||','||a.column_name from user_cons_columns a, user_constraints b where a.constraint_name = b.constraint_name and b.constraint_type = 'P' and a.table_name ='TABLE';■オラクルソースを取得(获取Oracle source all)
spool foo_package.sqlcolumn TEXT FORMAT a4000set linesize 4000set pagesize 0set head offset feed offselect text from user_sourcewhere name = 'FOO' and type = 'PACKAGE'order by line;spool offquit
set head off
set lin 150 set pages 0 set long 10000select text from user_source;
select text from user_source where type='TRIGGER'; select count(*) from user_source;
select object_type from user_objects where OBJECT_NAME ='table';
select dbms_metadata.get_ddl('SYNONYM','table','UMS_OWNER') from dual;