Oracle 資料庫小技巧整理

2021-09-23 22:37:47 字數 909 閱讀 2423

1、關於監聽程式建立不了(服務內不顯示監聽服務)

這個問題我遇到的是使用者許可權不夠,在命令行內輸入netca,建立服務,發現出現配置檔案不能儲存的io錯誤。

解決方法:

-- 以管理員身份執行命令列,然後執行netca命令建立監聽服務

-- lsnrctl start 啟動監聽服務即可

(lsnrctl status 可檢視監聽服務狀態,lsnrctl stop 可以停止監聽服務)

2、建立使用者

--create user ***  identified by "password";

--grant dba to ***;

3、刪除使用者

drop user *** cascade;

4、取消180天密碼過期

select * from dba_profiles s where s.profile='default' and resource_name='password_life_time';

alter profile default limit password_life_time unlimited;

alter user *** identified by password;

5、pl sql匯出表設計的方法(不包含資料)

--tools-->export user objects

--取消include privileges, include storage和include owner

6、pl sql 只匯出資料

第一種方法:

選中要查詢的表中的資料->右鍵export results -》sqlfile 即可將選中的資料匯出到乙個檔案中

第二種方法(匯出真個表中的資料的方法):

7、資料庫長時間工作後出錯,連線不上,連線慢

8、監聽建立,通用步驟

蒐集oracle資料庫小技巧

1 檢視全庫表狀態 oracle中檢視所有的表 select from tab dba tables dba objects cat 看使用者建立的表 select table name from user tables 當前使用者的表 select table name from all tabl...

資料庫小技巧

1.返回第乙個非空數值 select coalesce null,null,null,w3schools.com null,example.com 返回 w3schools.com select coalesce null,1,2,w3schools.com 返回 1 應用 將乙個欄位中空值全部替換...

資料庫使用小技巧

包括安裝時提示有掛起的操作 收縮資料庫 壓縮資料庫 轉移資料庫給新使用者以已存在使用者許可權 檢查備份集 修復資料庫等。一 掛起操作 在安裝sql或sp補丁的時候系統提示之前有掛起的安裝操作,要求重啟,這裡往往重啟無用,解決辦法 到hkey local machine system currentc...