ORA-12528:
TNS:listener: all appropriate instances are blocking new connections
ORA-12528問題是因為監聽中的服務使用了動態服務,實例雖然啟動,但沒有注冊到監聽。實例是通過PMON進程注冊到監聽上的,而PMON進程需要在MOUNT狀態下才會啟動。所以造成了上面的錯誤。
解決這個問題,有三種方法:
1、把監聽設置為靜態;
2、在tnsnames.ora中追加(UR=A);
3、重新啟動服務;
方法1、通過修改listener.ora的參數,把listener.ora動態注冊設置為靜態注冊,然后重新啟動監聽
# listener.ora Network Configuration File: $ORACLE_HOME\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = [IP])(PORT = 1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = [DBNAME])
(ORACLE_HOME = [$ORACLE_HOME])
(SID_NAME = [SID])
)
)
靜態注冊的風險:如果在instance運行中,lisener重新啟動,就找不到instance了。靜態注冊需要先啟動lisener,再啟動instance。且靜態模式下,lisener status顯示的是unknown
方法2、啟動到nomount狀態,通過修改tnsnames.ora的參數
# tnsnames.ora Network Configuration File: $ORACLE_HOME\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
SYK =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = [IP])(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = SYK)
(UR=A)
)
)
然后連接上數據庫
SQL>alter database mount;
SQL>alter database open;
方法3、重啟ORACLE或者重啟ORACLE服務
在oracle帳戶下依序執行如下命令:
sqlplus / as sysdba;//在其它帳戶(如root)下執行可能會報錯(ORA-01031)因為這些帳戶沒有在dba組中
shutdown immediate;
startup;
http://blog.sina.com.cn/s/blog_636415010100x3lc.html
oracle實例名: error while loading shared libraries: libskgxp10.so: cannot open shared object file: No such file or directory
是環境變量LD_LIBRARY_PATH的問題。
在10g以后,一般情況下環境變量中沒有必要設置LD_LIBRARY_PATH,但是一旦將ORACLE_HOME遷移到其他目錄,則環境變量中還需要添加這個變量。
Linux和Unix支持TAR方式遷移ORACLE_HOME,如果有需要將ORACLE_HOME放到其他路徑下,那么一般都會使用tar的方式將整個路徑拷貝到目標目錄。
但是遷移后,如果直接嘗試sqlplus啟動,可能報錯:
[orat3@hpserver2 ~]$ sqlplus / as sysdba
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
而設置LD_LIBRARY_PATH后,問題解決:
[orat3@hpserver2 ~]$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib
[orat3@hpserver2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Sun Mar 18 16:10:57 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
還有一種類似的錯誤:
[orat0@hpserver2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Sun Mar 18 16:12:03 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
oracleorcl10g: error while loading shared libraries: libskgxp10.so: cannot open shared object file: No such file or directory
ERROR:
ORA-12547: TNS:lost contact
Enter user-name:
oracleorcl10g: error while loading shared libraries: libskgxp10.so: cannot open shared object file: No such file or directory
ERROR:
ORA-12547: TNS:lost contact
Enter user-name:
oracleorcl10g: error while loading shared libraries: libskgxp10.so: cannot open shared object file: No such file or directory
ERROR:
ORA-12547: TNS:lost contact
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[orat0@hpserver2 ~]$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib
[orat0@hpserver2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Sun Mar 18 16:12:18 2012
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
錯誤的表相雖然不同,但是解決方法是相同的。
http://blog.itpub.net/4227/viewspace-718879/
ORA-00204:ORA-00202:ORA-27091
Oracle數據庫啟動報如下錯誤:
ORA-00204: error in reading (block 3, # blocks 8) of controlfile
ORA-00202: controlfile:'/app/oracle/OraHome1/database/datafiles/control1.ctl'
ORA-27091: skgfqio: unable to queue I/O
SVR4 Error: 25: Inappropriate ioctl for device
Additional information: 3
說明control1.ctl文件有問題啦!
想把這個文件mv到別的目錄做個備份,但I/O error,果然是壞了!
一般控制文件有3個,除非3個都壞了,不然可以用好的替換壞的:
rm control1.ctl
cp control2.ctl control1.ctl
再重新啟動Oracle就OK啦!
http://blog.sina.com.cn/s/blog_49c1dffa0100teu5.html
ORA-01031: insufficient privileges
出錯的場景:
(1)用sqlplus "/ as sysdba"登陸
(2)登陸成功后在執行相關操作
第二種情況沒什么說的,沒權限,賦權即可
第一情況的解決辦法:
要sqlplus "/ as sysdba"進行登陸必須滿足如下條件:
(1)linux/unix下有環境變量ORACLE_SID,windows不要求
(2)配置環境變量ORACLE_HOME
(3)linux/unix下$ORACLE_HOME/bin/oracle文件在u,g下有s權限(讓非oracle用戶可以擁有相當於oracle帳戶 的,賦值方法chmod u+s,g+s $ORACLE_HOME/bin/oracle)
(4)執行此操作的用戶必須在dba用戶組中
(5)sqlnet.ora文件必須支持sqlplus /as sysdba,否則會報如下錯誤:
Tips:
Linux/unix下非oracle用戶下不建議使用sqlplus "/ as sysdba"登陸,建議使用sqlplus /nolog后使用conn 命令或sqlplus username[@sid]登陸
http://blog.sina.com.cn/s/blog_622a00690100zklx.html
sqlnet.ora中配置操作系統驗證的相關說明:
1、在windows下,SQLNET.AUTHENTICATION_SERVICES必須設置為NTS或者ALL才能使用OS認證;不設置或者設置為其他任何值都不能使用OS認證。
<Windows>
sqlnet.ora文件為空時采用Oracle密碼文件驗證
SQLNET.AUTHENTICATION_SERVICES= (NTS) 基於操作系統驗證;
SQLNET.AUTHENTICATION_SERVICES= (NONE) 基於Oracle密碼文件驗證
SQLNET.AUTHENTICATION_SERVICES= (NONE,NTS) 二者並存,注意是半角,否則不識別
2、在linux下,在SQLNET.AUTHENTICATION_SERVICES的值設置為ALL,或者不設置的情況下,OS驗證才能成功;設置為其他任何值都不能使用OS認證。
<Unix/Linux>
默認情況下Unix/Linux下的sqlnet.ora文件是沒有SQLNET.AUTHENTICATION_SERVICES參數的,
此時是操作系統驗證和Oracle密碼驗證並存,加上SQLNET.AUTHENTICATION_SERVICES這個參
數后,不管SQLNET.AUTHENTICATION_SERVICES設置為NONE還是NTS還是(NONE,NTS),都是
基於Oracle密碼驗證。
The information in this document applies to:
Oracle Net Services - Version: 10.1.0.3
This problem can occur on any platform.
Symptoms
The listener fails to start with the following errors:
TNS-12537: TNS:connection closed
TNS-12560: TNS:protocol adapter error
TNS-00507: Connection closed
Linux Error: 29: Illegal seek
Generic to Unix platforms.
出現下圖錯誤是因為/etc/hosts中沒有配置localhost的映射
出現下圖錯誤是因為
(情況1)/etc/hosts中的localhost映射配置錯誤
(情況2)$ORACLE_HOME/network/admin/listener.ora中HOST的值配置錯誤
Cause
Wrong syntax in hosts file and also due to the the tnslsnr process was enhanced in
10.1.0.3 to support FAN(Fast Application Notification) via
ONS (Oracle Notification Services). This new code opens a socket open on localhost.
Therefore"localhost" should be defined on the system.
This new code opens a socket open on localhost. Therefore "localhost" should be defined on the
system.
Fix
Change /etc/hosts file to include
127.0.0.1 localhost.localdomain localhost
http://blog.itpub.net/35489/viewspace-84958/
造成ORA-12560: TNS: 協議適配器錯誤的問題的原因有三個:
1.監聽服務沒有起起來
windows平台個一如下操作:開始---程序---管理工具---服務,打開服務面板,
啟動oraclehome92TNSlistener服務。
2.database instance沒有起起來
windows平台如下操作:開始---程序---管理工具---服務,打開服務面板,
啟動oracleserviceXXXX,XXXX就是你的database SID.
3.ORACLE_SID設置的不對
(1)regedit,然后進入HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0將該環境變量ORACLE_SID設置為XXXX,XXXX就是你的databaseSID.
(2)我的電腦,屬性--高級--環境變量---系統變量--新建,變量名=oracle_sid,變量值=XXXX,XXXX就是你的database SID.
(3)在使用sqlplus前,在command line下輸set oracle_sid=XXXX,XXXX就是你的database SID.
http://blog.sina.com.cn/s/blog_49d5466301016jqe.html
sqlplus / as sysdba 與 sqlplus "/ as sysdba" 的區別是什么?
10G的sqlplus稍微改進了一點,
下面是摘抄10G新特性的一段:
必須使用引號嗎?為什么,不!
在 Oracle9i 中取消了對內部登錄的支持之后,全世界許多 DBA 表示反對:他們應當如何在命令行上輸入 SYS 的口令並保持安全性?嗯,答案是在操作系統提示符中使用引號:
sqlplus "/ as sysdba"
引號的使用令人遺憾,但還是被大家所接受(雖然有些怨言)。在 Oracle Database 10g 中不需要這樣了。現在您可以在 OS 命令提示符下,輸入以下命令,不需要引號
sqlplus / as sysdba
作為 SYSDBA 登錄。這種改進不僅意味着您少輸了兩個字符,還有一些額外的好處,例如在 Unix 之類的操作系統中不需要 escape 字符。
http://www.itpub.net/thread-661977-1-1.html
如果一個Oracle帳戶為dba,則可以在sqlplus中使用conn user@網絡服務名 as sysdba
Net Configuration Assistant
ORA-12533
是tnsnames.ora配置錯誤
tnsnames.ora的位置%ORACLE_HOME%\network\admin\tnsnames.ora
tnsnames.ora通過手工改來配置時,需要遵守以下規則:
在oracle帳戶下使用$ORACLE_HOME/bin/dbstart啟動oracle實例時,一種錯誤的解決辦法:
/etc/oratab文件解析:
[oracle@node1 ~]$ vi /etc/oratab
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
orcl:/u01/app/oracle/product/10.2.0/db_1:N
最后的N或者Y表示是否允許dbstart來啟動數據庫,如果為N則實例不能通過dbstart啟動,表現為sqlplus連接實例時顯示Connected to an idle instance.
如果為Y則實例可以通過dbstart啟動,sqlplus連接后數據庫即為open狀態。
http://blog.chinaunix.net/uid-23177306-id-2531086.html
[oracle@localhost bin]$ vi dbstart
#!/bin/sh
#
# $Id: dbstart.sh 22-may-2008.05:05:45 arogers Exp $
# Copyright (c) 1991, 2008, Oracle. All rights reserved.
#
###################################
#
# usage: dbstart $ORACLE_HOME
#
# This script is used to start ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
# This script will start all databases listed in the oratab file
# whose third field is a "Y". If the third field is set to "Y" and
# there is no ORACLE_SID for an entry (the first field is a *),
# then this script will ignore that entry.
在linux系統下,用root用戶采用dbstart腳本直接啟動oracle服務或監聽
第一個問題:啟動服務的同時沒有啟動監聽
[root@localhost ~]# su - oracle -c "dbstart"
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /oradata/oracle/112/bin/dbstart ORACLE_HOME
Processing Database instance "orcl": log file /oradata/oracle/112/startup.log
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener這個提示說明
啟動oracle服務的同時沒有啟動oracle監聽服務,因此如果想在啟動oracle服務的同時i啟動監聽
就需要修改dbstart,將ORACLE_HOME_LISTNER值設為$ORACLE_HOME(原來是為$1)
[root@localhost ~]# vi /oradata/oracle/112/bin/dbstart
注:dbshut一樣的道理,如果想關閉數據庫服務的同時關閉監聽服務也是將dbshut文件中的ORACLE_HOME_LISTNER值設為$ORACLE_HOME
http://www.cnblogs.com/lanzi/archive/2012/04/15/2450930.html
http://www.cnblogs.com/lanzi/archive/2012/04/15/2450928.html
3.賦予自啟動腳本執行權限
chmod 775 /etc/init.d/orcl
4. 增加配置服務
[root@localhost ~]# /sbin/chkconfig --add orcl
“服務不支持 chkconfig”:——這個提示是因為oracle自啟動腳本前面必須要有以下這兩行
#chkconfig: 2345 00 01
#description:oracle 11g service
當然如果不采用這個命令進行配置服務,也可以手動方式創建文件鏈接來完成,如下所示:
ln -s /etc/init.d/orcl /etc/rc.d/rc2.d/S99orcl
ln -s /etc/init.d/orcl /etc/rc.d/rc3.d/S99orcl
ln -s /etc/init.d/orcl /etc/rc.d/rc4.d/S99orcl
ln -s /etc/init.d/orcl /etc/rc.d/rc5.d/S99orcl
ln -s /etc/init.d/orcl /etc/rc.d/rc0.d/K01orcl
ln -s /etc/init.d/orcl /etc/rc.d/rc1.d/K01orcl
ln -s /etc/init.d/orcl /etc/rc.d/rc6.d/K01orcl

原因:
listener.ora中配置錯誤:
SID_LIST_LISTENER=(
(SID_DESC=
(SID_NAME=實際的$ORACLE_SID)
(ORACLE_HOME=實際的$ORACLE_HOME)
(PROGRAM=實際的$ORACLE_SID)//此處配置錯誤,實際使用的實例不需要配置這個,這行去掉或改為(global_dbname=實際的$ORACLE_SID)即可
)
)
關於ora-12518的其他情況及處理辦法:
http://www.cnblogs.com/chinhr/archive/2011/10/11/2207528.html
關於listener.ora配置內容:
Oracle文檔上是這樣寫的
The LISTENER entry defines the listening protocol address for a listener named LISTENER,
and the SID_LIST_LISTENER entry provides information about the services statically supported by the listener LISTENER.
Example 10-1 Example listener.ora File
LISTENER= (DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=sales-server)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)
)))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(SID_NAME=plsextproc)
(ORACLE_HOME=/oracle10g)
(PROGRAM=extproc)))“
the SID_LIST_LISTENER entry provides information about the services statically supported by the listener LISTENER”這句話要如何理解呢?
感覺上Listener是提供了“protocol address”
然后SID_LIST_LISTENER提供了在“protocol address”上跑的具體應用。 這樣的理解對嗎?
It's better to do some reading on dynamic registration, which your 10g version supports. Once you understand that, you'll understand what static registration is and why it's rarely needed.
http://www.itpub.net/thread-1517929-1-1.html
TNS-01155: 在 LISTENER.ORA 中指定的 SID_LIST_LISTENER 參數不正確
近日在配置Oracle 10G的流復制環境時,遇到一個問題,關閉數據庫(shutdown immediate)后,通過SQL Plus連接數據庫:conn sys/his@orc0 as sysdba,出現如下錯誤:
ORA-12514: TNS: 監聽程序當前無法識別連接描述符中請求的服務
通過重啟服務的方式啟動數據庫,再次連接卻能成功登錄,也就是說在關閉數據庫狀態下無法連接服務器。
開始以為是系統環境變量Oracle_SID的配置問題,因為機器有多個實例,一陣折騰后還是不能連接。后來查資料得知:
Oracle9i以后,后台進程PMON自動在監聽器中注冊在系統參數SERVICE_NAMES中定義的服務名,SERVICE_NAMES默認為DB_NAME+DOMAIN_NAME。監聽配置文件listener.ora中可以不必指定監聽的服務名。但是,當數據庫處於關閉狀態下PMON進程沒有啟動,也就不會自動注冊監聽的實例名,所以使用sqlplus sys/his@orc0 as sysdba 會出現ORA-12514錯誤。
如果在listener.ora文件中指定監聽的實例名,則即使數據庫處於關閉狀態,仍然可以連接。
listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = G:/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = G:/oracle/product/10.2.0/db_1)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = zyk)(PORT = 1521))
)
)
以上粗體部件為增加的內容,修改后重啟監聽服務后即可。
附:通過在lsnrctl中輸入set display verbose,然后再通過命令service查看,服務狀態為READY表示PMON自動注冊的服務名,而UNKNOWN則表示該服務是手工在LISTENER.ORA中配置的數據庫服務。
http://blog.csdn.net/iwanttobeagoodman/article/details/4352823
1、在CMD中啟動SQLPLUS;用sqlplus /as sysdba登錄,提示
連接到:Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
2.執行ALTER USER acutal_username ACCOUNT UNLOCK;解鎖
3.更改sys 和system 設置用戶名、密碼;
SQL> alter acutal_username sys identified by acutal_password;
ORA-12547: TNS: 丟失連接
查明原因:
sqlnet.ora對訪問ip進行了限制:
sqlnet.ora的配置情況:
[oracle@localhost admin]$ more sqlnet.ora # sqlnet.ora Network Configuration File: /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora # Generated by Oracle configuration tools. TCP.VALIDNODE_CHECKING = YES SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER= (MD5) SQLNET.CRYPTO_SEED = 'OracleEncryption' SQLNET.ENCRYPTION_TYPES_SERVER= (AES256) TCP.INVITED_NODES= (ip1,ip2,ip3,ip4,ip5) ADR_BASE = /oracle/app/oracle SQLNET.EXPIRE_TIME=10
可以看出,正是由於存在tcp.validnode_checking=yes才去檢查tcp.invited_nodes定義的節點,將客戶端ip地址加入該文件中即可。
Oracle修改表中記錄時出現record is locked by another user的問題
在操作表時沒有commit,導致表被鎖,只要執行下面兩行語句,就可以了將行鎖解鎖了。
1.Select t2.username,t2.sid,t2.serial#,t2.logon_time from v$locked_object t1,v$session t2 where t1.session_id=t2.sid;
-- 查看被鎖表的sid 和 serial#
2.alter system kill session 'sid, serial#';
--kill 鎖 ,例如輸入 alter system kill session '140, 25';
執行完以上兩步后,就可以編輯數據了
http://blog.sina.com.cn/s/blog_77f88ea601012jyy.html
使用alter database 移動數據文件時,在執行完alter database rename <source file path> to <des file path>命令之后,再試圖打開數據庫:alter database open。報錯:
ORA-01113:文件7需要介質恢復
ORA-01110:數據文件7:’E:ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/TEST01.DBF’。
這是由於數據庫認為這個數據文件遭到破壞了,需要使用recover命令通過備份、日志信息來恢復。數據庫的備份恢復是個比較復雜的問題,但是這個實例的解決辦法還是比較簡單的。
執行命令:
recover datafile ’E:ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/TEST01.DBF’
提示完成介質恢復,再打開數據庫:alter database open。一切正常。
http://blog.csdn.net/libingquan008/article/details/6021441
os位數與oracle位數不一致
http://blog.itpub.net/79686/viewspace-1016474/
Linux位數查看辦法:
(1)
終端輸入:
file /sbin/init
如 顯示:
/sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
即是32位的 linux, 如是64位的, 顯示的是 64-bit
(2)
終端輸入:
uname -a
如 顯示:
Linux redhat-tj 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST 2009 i686 i686 i386 GNU/Linux
則是32位
(3)
終端輸入:
getconf WORD_BIT
如 顯示:
32
則是32位的linux
http://blog.chinaunix.net/uid-20423564-id-1949491.html
安裝 oracle 時出現如下錯誤:
[oracle@database]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 80 MB. Actual 1184 MB Passed Checking swap space: must be greater than 150 MB. Actual 3027 MB Passed Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<< Some requirement checks failed. You must fulfill these requirements before continuing with the installation,at which time they will be rechecked. Continue? (y/n) [n]
解決辦法(1):
注銷登錄用戶,使用oracle安裝用戶重新登錄系統即可解決,比如之前已經創建好的安裝用戶oracle,使用oracle用戶登錄系統就可以解決問題
解決辦法(2):
在root用戶下執行xhost +,然后切換到oracle帳戶下,執行安裝程序即可
解決辦法(3)
如果你確認你的軟硬件 都安裝設置都沒問題那么你直接跳過檢測吧·
./runInstaller -ignoreSysPrereqs跳過檢測
[oracle@sense database]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 80 MB. Actual 1184 MB Passed Checking swap space: must be greater than 150 MB. Actual 3027 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-01-03_05-06-47PM. Please wait .
http://blog.itpub.net/22275400/viewspace-766534/
http://www.linuxidc.com/Linux/2010-04/25651.htm
Error in invoking target 'mkldflags ntcontab.o nnfgt.o' of makefile '/opt/app/oracle/product/11.2.0/dbhome_1/network/lib/ins_net_client.mk'
安裝gcc,后點Retry即可。
相關操作:
解決方法: 該問題一般是gcc的問題。 RedHat Linux在安裝gcc時需要cpp和cloog-ppl 但是在安裝cpp的時候需要這個依賴: libmpfr.so.1()(64bit) is needed by cpp-4.4.6-3.el6.x86_64 安裝cloog-ppl的時候需要這2個依賴: libppl.so.7()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64 libppl_c.so.2()(64bit) is needed by cloog-ppl-0.15.7-1.2.el6.x86_64 解決方法: 確定是一個,因為那時候就是用這個光盤的東西裝的系統。 后來解決了,不用yum,只是缺了兩個包而已。 之前報這個依賴 libmpfr.so.1 is needed by cpp-4.4.4-13.el6.i686 libppl.so.7 is needed by cloog-ppl-0.15.7-1.2.el6.i686 libppl_c.so.2 is needed by cloog-ppl-0.15.7-1.2.el6.i686 是缺了這兩個包…… mpfr-2.4.1-6.el6.x86_64.rpm ppl-0.10.2-11.el6.x86_64.rpm 這兩個安裝好之后就可以安裝cpp和cloog-ppl了,之后就能安裝gcc了…… http://www.linuxidc.com/Linux/2015-04/116144.htm [root@localhost Packages]# rpm -ivh mpfr-2.4.1-6.el6.i686.rpm warning: mpfr-2.4.1-6.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:mpfr ########################################### [100%] [root@localhost Packages]# [root@localhost Packages]# rpm -ivh ppl-0.10.2-11.el6.i686.rpm warning: ppl-0.10.2-11.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:ppl ########################################### [100%] [root@localhost Packages]# [root@localhost Packages]# rpm -ivh cpp-4.4.7-4.el6.i686.rpm warning: cpp-4.4.7-4.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:cpp ########################################### [100%] [root@localhost Packages]# [root@localhost Packages]# rpm -ivh cloog-ppl-0.15.7-1.2.el6.i686.rpm warning: cloog-ppl-0.15.7-1.2.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:cloog-ppl ########################################### [100%] [root@localhost Packages]# [root@localhost Packages]# rpm -ivh gcc-4.4.7-4.el6.i686.rpm warning: gcc-4.4.7-4.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:gcc ########################################### [100%] [root@localhost Packages]#
報錯信息:
登陸及執行命令時,都會有ORA_04031的報錯:
SQL> show parameter shared_pool_size ORA-04031: unable to allocate 3896 bytes of shared memory ("shared pool","SELECT NAME NAME_COL_PLUS_SH...","sga heap(1,0)","kglsim object batch")
oracle 10g,執行$ORACLE_HOME/bin/dbshutdown后,重啟數據即可
Tips:無法通過sqlplus中的shutdown或startup force來進行,因為執行這些命令時提示沒有權限(sqlnet.ora中沒有任何參數,linux環境)。
登陸時的報錯信息:
[oracle@localhost admin]$ sqlplus "/as sysdba" SQL*Plus: Release 11.2.0.2.0 Production on Fri Sep 18 09:22:20 2015 Copyright (c) 1982, 2010, Oracle. All rights reserved. ERROR: ORA-01075: 您現在已登錄 Enter user-name: system@ems Enter password:
錯誤”ora-04031 無法分配XXX字節的共享內存(XXX)”的解決辦法: oracle 9i: sys用戶以sysdba身份登錄 先查看當前shared_pool_size值 sql>show parameter shared_pool_size; 然后 sql>alter system set shared_pool_size=’比原先值適當增加’ scope=spfile; 然后 sql>shutdown immediate sql>startup oracle 10g: oracle 10g shared_pool_size默認值為0,也就是系統自動管理shared pool內存,這時可以適當增加shared_pool_reserved_size的值,仍然讓系統自動管理這部分內存 sql>alter system set shared_pool_reserved_size=’比原先值適當增加’ scope=spfile; sql>shutdown immediate sql>startup
ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalid ORA-00823: Specified value of sga_target greater than sga_max_size SQL> alter system set sga_target=2000M scope=both; alter system set sga_target=2000M scope=both * ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalid ORA-00823: Specified value of sga_target greater than sga_max_size SQL> SQL> SQL> SQL> alter system set sga_target=2000M scope 2 ; * ERROR at line 2: ORA-00927: missing equal sign SQL> SQL> SQL> create pfile='/home/oracle/oracle/pfile_t.ora' from spfile 2 ; create pfile='/home/oracle/oracle/pfile_t.ora' from spfile * ERROR at line 1: ORA-07391: sftopn: fopen error, unable to open text file. SQL> SQL> SQL>
http://www.linuxidc.com/Linux/2013-08/88291.htm
ORA-01658
oracle導入數據出錯:ORA-01658:無法為表空間XXX中的段創建INITIAL區
原因:表數據庫中表空間在已滿時未設置自動擴展,即此時數據庫表空間已滿。
解決:
(1)查看報錯表空間是否自動擴展(可能存在部分數據文件可以自動擴展,部分不可以)
select file_name,autoextensible,increment_by from dba_data_files d where d.TABLESPACE_NAME='報錯中的表空間名';
以修改表空間的方式增加:
語法:
alter database datafile 表空間文件路徑 AUTOEXTEND(自動擴展) ON NEXT 表空間滿后增加的大小
例如:
alter database datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\VGSM\VGSM' AUTOEXTEND ON NEXT 200m
(2)
1、查詢當前用戶的所屬表空間
select * from user_users;
2、增加表空間有兩種方法:
以sysdba登陸進數據庫
語法:
alter tablespace 表空間名稱
add datafile 表空間存放路徑 size 表空間大小 autoextend on next 增長的大小 maxsize 空間最大值(如果不限制空間最大值就用unlimited)
例如:
alter tablespace vgsm
add datafile 'c:\oracle\product\10.2.0\oradata\vgsm\vgsm_01.dbf'
size 1024M autoextend on next 50M maxsize unlimited;
http://www.cnblogs.com/hfliyi/p/3551338.html
ERROR:
ORA-00604: 遞歸 SQL 級別 1 出現錯誤
ORA-01653: 表 SYS.AUD$ 無法通過 128 (在表空間 SYSTEM 中) 擴展
ORA-02002: 寫入審計線索時出錯
ORA-00604: 遞歸 SQL 級別 1 出現錯誤
ORA-01653: 表 SYS.AUD$ 無法通過 128 (在表空間 SYSTEM 中) 擴展
把SYSTEM表空間改為自動擴展,也不行
原因:
SYSTEM表空間所在的磁盤空間滿了。在另一個文件系統中為SYSTEM表空間新增一個表空間
ALTER TABLESPACE "SYSTEM" ADD DATAFILE '/home/oracle/datafile/system10.dbf' SIZE 500M AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED;
system10.dbf是不存在的。
注意事項:
/home/oracle/datafile/這個目錄,oracle用戶要有寫權限。
其它
查看表空間是否具有自動擴展的能力的SQL
SELECT T.TABLESPACE_NAME,D.FILE_NAME,
D.AUTOEXTENSIBLE,D.BYTES,D.MAXBYTES,D.STATUS
FROM DBA_TABLESPACES T,DBA_DATA_FILES D
WHERE T.TABLESPACE_NAME =D.TABLESPACE_NAME
ORDER BY TABLESPACE_NAME,FILE_NAME;
http://www.51testing.com/html/73/33873-214039.html
java.sql.SQLException: ORACLE:ORA-01552: cannot use system rollback segment for non-system tablespace 'Hibernate'
解決辦法:
修改數據庫參數
1、設置默認undo表空間
2、undo表空間為自動管理
http://blog.chinaunix.net/uid-22457844-id-3131307.html
還有可能是默認的回滾表空間,沒有空間了
查看還原表空間的剩余空間
SQL> l
1* select file_name,tablespace_name,bytes/1024/1024 MB,autoextensible from dba_data_files
SQL> /
FILE_NAME TABLESPACE_NAME MB AUT
-------------------------------------------------- --------------- ---------- ---
/u01/app/oracle/oradata/orcl/risenet.dbf RISENET
/u01/app/oracle/oradata/orcl/perfstat.dbf PERFSTAT 500 NO
/u01/app/oracle/oradata/orcl/example01.dbf EXAMPLE 100 YES
/u01/disk1/users01.dbf USERS 5 YES
/u01/app/oracle/oradata/orcl/sysaux01.dbf SYSAUX 250 YES
/u01/app/oracle/oradata/orcl/undotbs01.dbf UNDOTBS1
/u01/disk2/system01.dbf SYSTEM 490 YES
/u01/app/oracle/oradata/orcl/undotbs02.dbf UNDOTBS2 50 NO
/u01/disk1/pioneer_data.dbf PIONEER_DATA 5 YES
/u01/disk2/pioneer_indx.dbf PIONEER_INDX 6 NO
/u01/disk3/pioneer_undo.dbf PIONEER_UNDO 7 NO
11 rows selected.
SQL> l
1* select tablespace_name,bytes/1024/1024 "MB" from dba_free_space where tablespace_name like '%UNDO%'
SQL> /
TABLESPACE_NAME MB
--------------- ----------
UNDOTBS2 31.75
PIONEER_UNDO 5.6875
由上查詢可知,默認表空間沒有空間了,可以切換回滾空間untotbs2為系統的默認表空間。(也可以增加默認表空間untotbs1的大小。)
SQL> alter system set undo_tablespace=undotbs2;
System altered.
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS2
SQL> create table scott.test
2 (id number(8),
3 name varchar2(20));
Table created.
問題解決!
http://blog.itpub.net/12778571/viewspace-346816/
默認的回滾表空間不存在的情況
創建表的時候報
2 (DEPTNO NUMBER(2) CONSTRAINT PK_DEPT PRIMARY KEY,
3 DNAME VARCHAR2(14) ,
4 LOC VARCHAR2(13) ) ;
CREATE TABLE DEPT
*
ERROR at line 1:
ORA-01552: cannot use system rollback segment for non-system tablespace 'USERS'
解決辦法:
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string MANUAL
undo_retention integer 900
undo_tablespace string UNDOTBS2
SQL> alter system set undo_tablespace='undotbs3' scope=spfile;
System altered.
SQL> alter system set undo_management=auto scope=spfile;
System altered.
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string undotbs3
重新測試剛才出錯的語句
SQL> conn scott/tiger
Connected.
SQL>
SQL>
SQL> CREATE TABLE DEPT
2 (DEPTNO NUMBER(2) CONSTRAINT PK_DEPT PRIMARY KEY,
3 DNAME VARCHAR2(14) ,
4 LOC VARCHAR2(13) ) ;
Table created.
我的由於沒有undotbs2,並且undo_management為手動模式,所以必須切換
http://blog.csdn.net/huashnag/article/details/8507060
ORA-32001: write to SPFILE requested but no SPFILE specified at startup
SQL> alter system set sga_max_size=2048M scope=spfile;
alter system set sga_max_size=2048M scope=spfile
*
ERROR at line 1:
ORA-32001: write to SPFILE requested but no SPFILE specified at startup
SQL> show parameter spfile;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string
SQL> create spfile from pfile;
File created.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2166536 bytes
Variable Size 427819256 bytes
Database Buffers 624951296 bytes
Redo Buffers 14000128 bytes
Database mounted.
Database opened.
SQL> alter system set sga_max_size=2048M scope=spfile;
System altered.
SQL> alter system set sga_target=2048M scope=spfile;
System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 2137886720 bytes
Fixed Size 2161400 bytes
Variable Size 469763336 bytes
Database Buffers 1644167168 bytes
Redo Buffers 21794816 bytes
Database mounted.
Database opened.
SQL> show parameter sga;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 2G
sga_target big integer 2G
http://www.cnblogs.com/quanweiru/p/4053316.html
ORA-12641: Authentication service failed to initialize
命令:
sqlplus system/admin@orcl
報錯情況:
SQL*Plus: Release 11.2.0.2.0 Production on Wed May 11 16:11:43 2016 Copyright (c) 1982, 2010, Oracle. All rights reserved. ERROR: ORA-12641: Authentication service failed to initialize
解決辦法:
將$ORACLE_HOME/network/admin/sqlnet.ora文件中的
SQLNET.AUTHENTICATION_SERVICES=ALL
改為:
SQLNET.AUTHENTICATION_SERVICES=none
即用戶登陸時都要使用戶名和密碼
使用 sqlplus "/as sysdba" 會報下面的錯誤:
SQL*Plus: Release 11.2.0.2.0 Production on Wed May 11 17:27:52 2016
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-01031: 權限不足
Enter user-name:
問題雖然解決,但原理不是很清楚。
相關環境信息:
lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 6.6 (Santiago) Release: 6.6 Codename: Santiago
uname -a Linux localhost 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production PL/SQL Release 11.2.0.2.0 - Production CORE 11.2.0.2.0 Production TNS for Linux: Version 11.2.0.2.0 - Production NLSRTL Version 11.2.0.2.0 - Production
SQLNET.AUTHENTICATION_SERVICES的相關解釋
作用:
Use the parameter SQLNET.AUTHENTICATION_SERVICES to enable one or more authentication services.
If authentication has been installed, it is recommended that this parameter be set to either none or to one of the authentication methods.
默認值:None
一般可選值:
NONE for no authentication methods. A valid username and password can be used to access the database.
ALL for all authentication methods
NTS for Windows NT native authentication(An authentication method that enables a client single login access to a Windows NT server and a database running on the server)
2、 ORA-00845: MEMORY_TARGET not supported on this system
Oracle解釋如下:
[oracle@node3 ~]$ oerr ora 845 00845, 00000, "MEMORY_TARGET not supported on this system" // *Cause: The MEMORY_TARGET parameter was not supported on this operating system or /dev/shm was not sized correctly on Linux. // *Action: Refer to documentation for a list of supported operating systems. Or, size /dev/shm to be at least the SGA_MAX_SIZE on each Oracle instance running on the system.
其實,在啟動過程中,告警日志會報以下錯誤:
WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 369098752 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 261324800 and used is 0 bytes. Ensure that the mount point is /dev/shm for this directory. memory_target needs larger /dev/shm
原因:AMM是11g引入的新特性,它會利用到Linux系統中的/dev/shm,/dev/shm必須大於或等於memory_target。
解決方法:
1> 立即生效--注意:/dev/shm的size值必須為整數,默認是內存的一半
[root@node3 oracle]# umount tmpfs [root@node3 oracle]# mount -t tmpfs shmfs -o size=400m /dev/shm
2> 修改/etc/fstab
tmpfs /dev/shm tmpfs defaults,size=400m 0 0
也可以先修改/etc/fstab,然后用 mount -o remount /dev/shm重新掛載/dev/shm
在RHEL6以上是系統的一個bug,即便在/etc/fstab中修改了/dev/shm的值,重啟后依然恢復到內存的一半。
https://bugzilla.redhat.com/show_bug.cgi?id=669700,關於網上說的修改/etc/rc.d/rc.sysinit文件,經測試,仍然無法解決問題,反而會導致其它的盤沒有掛載。
最后,只能將 mount -o remount /dev/shm編輯到/etc/rc.local文件中
3. ORA-29701: unable to connect to Cluster Synchronization Service
手動啟動CSS:crsctl start res ora.cssd
http://www.cnblogs.com/ivictor/p/3958280.html