#!/bin/bash
clear scr
echo "************************************************"
echo "****Find out the Table Metadata Structure*******"
echo "************************************************"
echo -e "\n"
sqlplus -S / as sysdba<<EOF
set heading off
set echo off
Set pages 999
set long 90000
spool table_metadata.txt
select dbms_metadata.get_ddl('TABLE','EMP','SCOTT') from dual;
select dbms_metadata.get_ddl('INDEX','EMP_IDX','SCOTT') from dual;
spool off;
EOF
clear scr
echo "************************************************"
echo "****Find out the Table Metadata Structure*******"
echo "************************************************"
echo -e "\n"
sqlplus -S / as sysdba<<EOF
set heading off
set echo off
Set pages 999
set long 90000
spool table_metadata.txt
select dbms_metadata.get_ddl('TABLE','EMP','SCOTT') from dual;
select dbms_metadata.get_ddl('INDEX','EMP_IDX','SCOTT') from dual;
spool off;
EOF
No comments:
Post a Comment