使用Linux下script工具記錄Oracle輸出
oracle@linux-u72z:~> which script
/usr/bin/script
oracle@linux-u72z:~> script
Script. started, file is typescript
oracle@linux-u72z:~> sqlplus /nolog
/usr/bin/script
oracle@linux-u72z:~> script
Script. started, file is typescript
oracle@linux-u72z:~> sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Aug 17 12:40:18 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn / as sysdba
sConnected.
SQL>select sysdate from dual;
sConnected.
SQL>select sysdate from dual;
SYSDATE
---------
17-AUG-12
---------
17-AUG-12
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
oracle@linux-u72z:~> exit
Script. done, file is typescript
oracle@linux-u72z:~> ls -ltrh
total 1.9G
drwxrwxr-x 3 oracle dba 72 Jul 12 01:22 product
drwxrwxr-x 4 oracle dba 96 Jul 12 01:23 jre
drwxrwxr-x 6 oracle dba 176 Jul 12 01:24 oui
drwxrwxr-x 6 oracle dba 272 Jul 12 01:24 doc
drwxrwxr-x 12 oracle dba 464 Jul 12 18:08 oraInventory
drwxr-xr-x 4 oracle dba 96 Jul 12 23:42 admin
-rw-r--r-- 1 root root 246K Jul 29 08:11 rlwrap-0.37.tar.gz
drwxrwxr-x 8 500 500 752 Jul 29 08:12 rlwrap-0.37
-rw-r--r-- 1 oracle dba 58 Aug 1 17:00 scp1.log
-rw-r--r-- 1 oracle dba 1.9G Aug 1 17:00 radius1120120723_03_1.dmp
-rw-r--r-- 1 oracle dba 0 Aug 1 17:03 radius1120120723_03_1.log
-rw------- 1 oracle dba 8.5M Aug 1 18:00 core
-rw-r--r-- 1 oracle dba 58 Aug 2 17:56 exp.log
drwxr-xr-x 3 oracle dba 152 Aug 3 12:27 oradata
-rw-r--r-- 1 oracle dba 1.2K Aug 6 10:00 tsradius1120120723_03.log
-rw-r--r-- 1 oracle dba 58 Aug 6 10:00 imp.log
-rw-r--r-- 1 oracle dba 0 Aug 16 10:16 kill
drwxr-xr-x 2 oracle dba 288 Aug 16 12:58 test
-rw-r--r-- 1 oracle dba 652 Aug 17 12:40 typescript
oracle@linux-u72z:~> more typescript.
Script. started on Fri Aug 17 12:40:11 2012
oracle@linux-u72z:~> sqlplus /nolog
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
oracle@linux-u72z:~> exit
Script. done, file is typescript
oracle@linux-u72z:~> ls -ltrh
total 1.9G
drwxrwxr-x 3 oracle dba 72 Jul 12 01:22 product
drwxrwxr-x 4 oracle dba 96 Jul 12 01:23 jre
drwxrwxr-x 6 oracle dba 176 Jul 12 01:24 oui
drwxrwxr-x 6 oracle dba 272 Jul 12 01:24 doc
drwxrwxr-x 12 oracle dba 464 Jul 12 18:08 oraInventory
drwxr-xr-x 4 oracle dba 96 Jul 12 23:42 admin
-rw-r--r-- 1 root root 246K Jul 29 08:11 rlwrap-0.37.tar.gz
drwxrwxr-x 8 500 500 752 Jul 29 08:12 rlwrap-0.37
-rw-r--r-- 1 oracle dba 58 Aug 1 17:00 scp1.log
-rw-r--r-- 1 oracle dba 1.9G Aug 1 17:00 radius1120120723_03_1.dmp
-rw-r--r-- 1 oracle dba 0 Aug 1 17:03 radius1120120723_03_1.log
-rw------- 1 oracle dba 8.5M Aug 1 18:00 core
-rw-r--r-- 1 oracle dba 58 Aug 2 17:56 exp.log
drwxr-xr-x 3 oracle dba 152 Aug 3 12:27 oradata
-rw-r--r-- 1 oracle dba 1.2K Aug 6 10:00 tsradius1120120723_03.log
-rw-r--r-- 1 oracle dba 58 Aug 6 10:00 imp.log
-rw-r--r-- 1 oracle dba 0 Aug 16 10:16 kill
drwxr-xr-x 2 oracle dba 288 Aug 16 12:58 test
-rw-r--r-- 1 oracle dba 652 Aug 17 12:40 typescript
oracle@linux-u72z:~> more typescript.
Script. started on Fri Aug 17 12:40:11 2012
oracle@linux-u72z:~> sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Fri Aug 17 12:40:18 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> conn / as sysdba
sConnected.
SQL>select sysdate from dual;
sConnected.
SQL>select sysdate from dual;
SYSDATE
---------
17-AUG-12
---------
17-AUG-12
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
oracle@linux-u72z:~> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
oracle@linux-u72z:~> exit
Script. done on Fri Aug 17 12:40:38 2012
當然還有更強悍的 scriptreplay 工具可以replay script,不過預設一般不帶。。。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-740967/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 記錄輸出結果工具-script
- Linux下使用script命令記錄終端操作顯示Linux
- linux-把終端輸出記錄到文字Linux
- linux 下 android studio 不能輸入中文記錄LinuxAndroid
- MySQL 使用tee記錄語句和輸出日誌MySql
- Linux script 命令記錄(資料庫)操作步驟Linux資料庫
- Oracle 工具包記錄Oracle
- Linux的script命令——隱藏在終端的記錄器Linux
- Linux下的輸入/輸出重定向Linux
- Linux/Uninx下Oracle的oerr工具的使用LinuxOracle
- Linux工具安裝記錄Linux
- linux下使用者操作記錄審計環境的部署記錄Linux
- Linux下輸出excel檔案LinuxExcel
- LINUX下SQLPLUS等工具的歷史記錄功能LinuxSQL
- Hexagon DSP系列記錄(五)——DSP LOG輸出Go
- version-script 控制 so的符號輸出符號
- Linux 個人使用記錄Linux
- linux apache 使用記錄LinuxApache
- linux下的鍵盤記錄Linux
- 01_Numpy學習筆記(下):輸入和輸出筆記
- linux平臺下oracle自動備份(使用exp工具)LinuxOracle
- 工具記錄
- 如何在putty上完全記錄操作linux的日誌_script_tee_screenLinux
- Linux下 kprobe工具的使用Linux
- oracle scriptOracle
- Linux下MySQL多例項部署記錄LinuxMySql
- 日誌記錄 PHP下往linux目錄下寫日誌PHPLinux
- 記錄Mac下使用Charles抓包Mac
- 簡單記錄下wkhtmltoimage的使用HTML
- Linux終端回話記錄和回放工具 - asciinema使用總結LinuxASCII
- Linux下Oracle10.2.0.1升級到oracle10.2.0.4詳細操作記錄LinuxOracle
- oracle實驗記錄 (oracle 10G dataguard(4)redo傳輸&程式)Oracle
- oracle實驗記錄 (expdp/impdp使用)Oracle
- oracle實驗記錄 (使用exp/imp)Oracle
- Linux下mysql的歷史操作記錄LinuxMySql
- 記錄:linux下安裝mysql5LinuxMySql
- Linux輸入輸出重定向Linux
- linux之shell 輸入輸出Linux