剛到酒店,就接到客戶電話說某資料庫的一個資料檔案報IO錯誤,通過vpn查看發現如下:Sun Oct 30 23:19:27 BEIST 2016Trace dumping is performing id=[cdmp_20161030231927]Sun Oct 30 23:19:27 BEIST 2016Errors in file /oracle/app/10.2/admin/xxxx/bdump/xxxx2_smon_11863216.trc:ORA-00376: file 595
這裡簡單記錄一下,此次國慶加班恢複的某客戶的2套Oracle RAC資料庫,整個恢複過程中,2套rac差不多,因此這裡以其中一套資料庫的恢複過程為例進行簡單分析說明。資料庫由於為非歸檔,由於掉電導致重啟之後系統無法正常open。在正常open的過程中,報錯如下錯誤:SQL> alter database open;alter database open*ERROR at line 1:ORA-00600: internal error code, arguments:
先說基本用法:先按11G之前進行conn / as sysdba;create user test identifed by test;ORA-65096: 公用使用者名稱或角色名稱無效.查官方文檔得知“試圖建立一個通用使用者,必需要用C##或者c##開頭”,這時候心裡會有疑問,什麼是common user?不管先建成功了再說create C##user test identifed by test;建立成功SQL>show con_name;CON_NAME---------------
Oracle 資料庫中查詢重複資料:select * from employee group by emp_name having count (*)>1; Oracle 查詢可以刪除的重複資料select t1.* from employee t1 where (t1.emp_name) in (SELECT t2.emp_name from employee t2 group by emp_name having count (*)>1)
比如現在有一人員表 (表名:peosons)若想將姓名、社會安全號碼、住址這三個欄位完全相同的記錄查詢出來 複製代碼 代碼如下:select p1.* from persons p1,persons p2 where p1.id<>p2.id and p1.cardid = p2.cardid and p1.pname = p2.pname and p1.address =
建立一個dblink,命名為dblink_name,從A資料庫連到B資料庫,B資料庫的IP為192.168.1.73,連接埠為1521,執行個體名為oracle,登入名稱為tast,密碼為test。 一菜單方式: 開啟plsql,點擊【File】-【New】-【Database link】,開啟如下圖所示視窗填好各項資訊後,點擊【Apply】即可完成Database Link的建立。 二SQL方式-- Drop existing database link drop public