반응형
/********************************************************************************************
-- Title : [9i] DB 메타 정보 TXT나 CSV로 뽑기
-- Reference : 유0라님
-- Key word : 텍스트 엑셀
********************************************************************************************/
-- 아래는 세라가 보내준 자료
set timing off
set pagesize 0
set feedback off
set colsep '^'
spool ./test/test.txt
select * from test;
spool off
-- Title : [9i] DB 메타 정보 TXT나 CSV로 뽑기
-- Reference : 유0라님
-- Key word : 텍스트 엑셀
********************************************************************************************/
-- 아래는 세라가 보내준 자료
set timing off
set pagesize 0
set feedback off
set colsep '^'
spool ./test/test.txt
select * from test;
spool off
-- 아래는 00은행 문서화 자료
SQL> spool coldbackup.sh
SQL> select 'cp '||source||' /backup_disk/'
from (
select name source from v$datafile
union all
select member from v$logfile
union all
select name from v$controlfile
union all
select name from v$tempfile
)
from (
select name source from v$datafile
union all
select member from v$logfile
union all
select name from v$controlfile
union all
select name from v$tempfile
)
SQL> spool off
SQL> ed coldbackup.sh
SQL> ed coldbackup.sh
반응형