Oracle資料如何匯出成文字檔

# sqlplus username/password@TNSName   (1)
SQL> set pagesize 50000   (2)
SQL> set linesize 1000   (3)
SQL> spool member.txt   (4)
SQL> select id ||’[,]‘|| name ||’[,]‘|| age from member;   (5)
SQL> spool off   (6)
說明:
(1) 進入sqlplus。
(4) 將螢幕的內容輸出到member.txt。
(6) 結束輸出螢幕資料到檔案。
(2) 將螢幕長度設為每頁50000行,如果資料超過螢幕,輸出到檔案時,系統會在每頁開頭加入header,所以把螢幕每頁的長度設到超過資料筆數。
(3) 將螢幕寬度設為每行1000個字元,如果資料每行超過螢幕寬度,會自動折行,輸出到檔案就不是一行一筆資料,所以將每行的長度加大。
(5) 從table member抓出欄位id、name、age的資料,各欄位資料以[,]分開,欄位的分隔符號不限一個字元。

資料來源 : 史帝芬心得筆記

Oracle資料如何匯出成文字檔

# sqlplus username/password@TNSName   (1)
SQL> set pagesize 50000   (2)
SQL> set linesize 1000   (3)
SQL> spool member.txt   (4)
SQL> select id ||’[,]‘|| name ||’[,]‘|| age from member;   (5)
SQL> spool off   (6)
說明:
(1) 進入sqlplus。
(4) 將螢幕的內容輸出到member.txt。
(6) 結束輸出螢幕資料到檔案。
(2) 將螢幕長度設為每頁50000行,如果資料超過螢幕,輸出到檔案時,系統會在每頁開頭加入header,所以把螢幕每頁的長度設到超過資料筆數。
(3) 將螢幕寬度設為每行1000個字元,如果資料每行超過螢幕寬度,會自動折行,輸出到檔案就不是一行一筆資料,所以將每行的長度加大。
(5) 從table member抓出欄位id、name、age的資料,各欄位資料以[,]分開,欄位的分隔符號不限一個字元。

資料來源 : 史帝芬心得筆記

Apache 啟動失敗

# /etc/init.d/httpd start
啟動 httpd:httpd: Could not determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
[失敗]

// 查詢error_log (/var/log/httpd/error_log),出現下列錯誤
mod_unique_id: unable to find IPv4 address of “h39-203-70-33.askey.com.tw”

//解決方法 加入host
# vi /etc/hosts
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
203.70.33.39 h39-203-70-33.askey.com.tw localhost