[20141024]使用emacs連線使用oracle資料庫
[20141024]使用emacs連線使用oracle資料庫.txt
--前一陣子跟別人學習了使用emacs連線資料庫.自己做一個簡單記錄.
1.首先需要安裝emacs.這個步驟忽略.
2.使用emacs開啟檔案.
--我使用它在命令列沒有檔案.當然也可以有檔案.
--首先學習如何退出,
--
3.連線oracle資料庫:
有兩種方法連線,實際上都是一樣的呼叫sqlplus命令.
方法1:
方法2:
--
--根據提示輸入user,pass,database等資訊.但是不能使用scott/tiger@orcl這樣的格式.資料庫格式可以使用ezconnect格式.
4.連線上後出現2個分離的螢幕.
--方法2會出現兩個分離的視窗.
--按ctrl+x 1 關閉上面的螢幕.這樣就好像putty登入linux,進入sqlplus的介面.3個
--現在開始使用了.
--設定linesize避免折行.避免sqlplus輸出出現折行情況:
set linesize 2000
--打入
--也可以輸入在.emacs檔案中:(我不懂這些)
(setq-default truncate-lines t)
(setq truncate-partial-width-windows nil) ;; for vertically-split windows
5.打入命令就可以了.可以上下移動重複執行命令.
6.編輯想換行可以使用
7.如何退出:
--這樣可以把操作的內容儲存為一個檔案.
--我個人還有一個小技巧,儲存的檔案可以使用vim開啟這樣檢視非常方便,如果在emacs再次儲存,在vim裡面再次載入就ok了.
8.優點和缺點:
--缺點
--不能在裡面使用edit命令,會出現亂碼,呼叫emacs也沒用.linux下。windows下沒有這種問題。
--實際上沒有rlwrap+sqlplus方便。
--優點
--可以使用編輯器上下左右移動。檢視顯示結果。輸出的命令也可以回車執行。例子:
SCOTT@test01p> select 'select * from emp;' from dual ;
'SELECT*FROMEMP'
-----------------
select * from emp;
SCOTT@test01p> select * from emp;
....
9.感覺emacs太複雜了.我的.emacs設定:(儲存在C:\Users\Administrator\AppData\Roaming目錄下)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-enabled-themes (quote (manoj-dark)))
'(inhibit-startup-screen t))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family #("新宋體" 0 3 (charset chinese-gbk)) :foundry "outline" :slant normal :weight normal :height 115 :width normal)))))
;; add by lfree ,no wrap.
;; for vertically-split windows
(setq-default truncate-lines t)
(setq truncate-partial-width-windows nil)
;; set windows size
(setq default-frame-alist
'((height . 60) (width . 220) (menu-bar-lines . 20) (tool-bar-lines . 0)))
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-1309032/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用instantclient連線oracle資料庫clientOracle資料庫
- 使用oracle Transparent gateway 連線 sybase 資料庫OracleGateway資料庫
- 使用ssh tunnels加密連線oracle資料庫加密Oracle資料庫
- 使用Sequelize連線資料庫資料庫
- 使用JPA連線資料庫資料庫
- 使用C#連線資料庫C#資料庫
- 使用Python連線資料庫Python資料庫
- 資料庫連線池的使用資料庫
- 使用hostname方式連線資料庫!資料庫
- PROXOOL資料庫連線池使用資料庫
- 在IBM WASCE中使用Oracle資料庫連線池IBMOracle資料庫
- Django使用pymysql連線MySQL資料庫DjangoMySql資料庫
- 使用PETAPOCO連線MYSQL資料庫MySql資料庫
- Laravel 使用多個資料庫連線Laravel資料庫
- 使用ABP EntityFramework連線MySQL資料庫FrameworkMySql資料庫
- idea使用資料庫連線工具Idea資料庫
- MFC 使用VS 連線 MySQL資料庫MySql資料庫
- 使用psql連線Postgres資料庫SQL資料庫
- 【資料庫】使用DBever連線人大金倉資料庫資料庫
- Oracle資料庫中的表連線方式及使用場合Oracle資料庫
- WMB 使用Compute節點連線Oracle資料庫例項Oracle資料庫
- 使用instantclient和PL/SQL連線oracle遠端資料庫clientSQLOracle資料庫
- 資料庫–如何連線RDS例項,使用雲資料庫?資料庫
- python使用cx_Oracle連線oracle資料庫獲取常用資訊PythonOracle資料庫
- Oracle連線MongoDB資料庫OracleMongoDB資料庫
- Oracle資料庫連線方式Oracle資料庫
- Java連線oracle資料庫JavaOracle資料庫
- 使用RMySQL包來連線MySQL資料庫MySql資料庫
- java資料庫連線池dbcp的使用Java資料庫
- 使用DBever連線人大金倉資料庫資料庫
- 【MySQL】自定義資料庫連線池和開源資料庫連線池的使用MySql資料庫
- 請關掉你的資料庫連線!並且請使用資料庫連線池資料庫
- [20181224]使用odbc連線oracle資料庫.txtOracle資料庫
- 使用 Spring Boot 2.4配置Oracle的UCP資料庫連線池Spring BootOracle資料庫
- 【Oracle】Python 連線Oracle 資料庫OraclePython資料庫
- 使用Enterprise Architect 7 連線Oracle資料庫反向生成資料模型Oracle資料庫模型
- java Jdbc連線oracle資料庫連線測試JavaJDBCOracle資料庫
- Python 連線 Oracle資料庫PythonOracle資料庫