Oracle之cmd 常用命令

2021-08-07 13:16:19 字數 1720 閱讀 8847

在操作oracle  資料庫時, 有些人會喜歡偏向cmd 操作,下面介紹一些比較常用的oracle dos命令!

1、win+r調查執行視窗,輸入cmd回車

2、鏈結本地資料庫

輸入 sqlplus / as sysdba

sqlplus user/password@sid

3、建立名為「test」的表空間,其初始大小為512m,支援自動擴充套件,每次增量為32m;

4.建立名為「test_ww」的使用者 密碼為test123

create user test_ww  identified by test123 default tablespace sxsj;
5、為「test_ww」使用者授權sxsj為使用者密碼·

grant resource,dba,connect to test_ww;

6、退出

quit

2、匯入的命令是:imp 使用者名稱/密碼@網路服務名 file=***.dmp full=y;

2.

1 將d:\daochu.dmp 中的資料匯入 test資料庫中。

imp 

system/manager@test

file=d:\daochu.dmp full=y;

2.2將d:\daochu.dmp中的表table1 匯入

imp system/manager@test file=d:\daochu.dmp tables=(table1) ;

3、匯出的命令是:

exp 使用者名稱/密碼@網路服務名 file=***.dmp tables=(表名);

3.1 將資料庫test完全匯出,使用者名稱system 密碼manager 匯出到d:\daochu.dmp中

exp system/manager@test file=d:\daochu.dmp full=y;

3.2 將資料庫中system使用者與sys使用者的表匯出

exp system/manager@test file=d:\daochu.dmp owner=(system,sys);

3.3 將資料庫中的表inner_notify、notify_staff_relat匯出

exp aichannel/aichannel@testdb2 file= d:\data\newsmgnt.dmp tables=(inner_notify,notify_staff_relat); 檢視

oracle

資料庫的編碼

select * from nls_database_parameters where parameter ='nls_characterset';

oracle客戶端編碼

select * from nls_instance_parameters where parameter='nls_language';
檢視oracle

資料庫的版本及其他資訊

select * from product_component_version;

CMD常用命令

c users administrator where where r dir q f t pattern.描述 顯示符合搜尋模式的檔案位置。在預設情況下,搜尋是在當前目錄和 path 環境變數指定的路徑中執行的。引數列表 r 從指定目錄開始,遞迴性搜尋並顯示符合指定模式的檔案。q 只返回退出 不顯...

CMD常用命令

刪除資料夾命令 rd s q d logs test 刪除檔案命令 del f s q d logs test.txt 開啟telnet服務的命令 net start telnet 只能開啟沒有被禁用的服務 sc config telnet start demand sc config telnet...

cmd常用命令

命令 命令解析 arp a 檢視快取記憶體中的所有專案 arp a ip 實體地址 向arp專案快取記憶體中輸入乙個靜態專案 arp d ip 刪除乙個靜態專案 attrib 檔名 a r s h 新增某檔案存檔,唯讀,系統,隱藏屬性 attrib 檔名 a r s h 去掉某檔案的存檔,唯讀,系統...