天天看點

oracle11g更新後遇到的問題

實驗環境,oracle11gR2單機測試資料軟體及庫更新,

作業系統linux6.3

oracle版本 11.2.0.1  更新包11.2.0.3

資料庫軟體及庫更新成功後,測試expdp導出全庫實驗,總是提示如下錯誤:

[[email protected] ~]$ expdp oracle/[email protected] directory=DATA_PUMP_DIR dumpfile=daochu.dmp logfile=daochu.log full=yes

Export: Release 11.2.0.3.0 - Production on Mon Oct 28 09:47:18 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

UDE-12154: operation generated ORACLE error 12154

ORA-12154: TNS:could not resolve the connect identifier specified

1.根據提示嘗試的解決辦法:

   sqlplus / as sysdba 連接配接資料庫,GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,DBA,CONNECT,RESOURCE,CREATE SESSION  TO  oracle(使用者名字) 這裡我選擇了建立的oracle使用者。

然後檢查lisenter.ora及tnsnames.ora檔案,發現都正常,但我還是用netca指令重建了監聽,再測試expdp發現還是一樣的問題。

2.最終解決辦法:

su - oracle 使用者下檢視監聽檔案發現如下問題:

[[email protected] admin]$ cat tnsnames.ora

cat: tnsnames.ora: Permission denied

提示權限不夠,之前是在root使用者下檢視的,是以沒留意到這個問題。是以猜測問題出在oracle home目錄的權限問題。

實驗開始的時候我在更新資料庫軟體時oracle提示oracle_home目錄不能與之前的重複即必須建立目錄,後來我選擇了在原oracle_home目錄下建立11.2.3的子目錄,同時11.2.0的子目錄依然存在,依照提示chown -R oracle:oinstall /oracle/*給oracle_home目錄重新賦予權限,再次到oracle使用者下檢視監聽檔案,發現可以讀取。

嘗試expdp 導出全庫,發現導出可以正常運作了。

繼續閱讀