banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành *nix Oracle config is not so right  XML
  [Question]   Oracle config is not so right 25/02/2009 23:49:38 (+0700) | #1 | 170904
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
-Chào mọi người ,mình cài oracle 11g trên centos ( /u01/app/oracle/product/11.1.0/db_1 )
-Cài xong xuôi rồi , khi chạy thì hiện ra lỗi như sau :

[root@localhost ~]# /u01/app/oracle/product/11.1.0/db_1/bin/sqlplus "xxx/yyy"
Error 6 initializing SQL*Plus
Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
 


Chạy bằng user root hay oracle đều bị lỗi như vậy smilie

vi /home/oracle/.bash_profile


# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
#environment for oracle
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
ORACLE_SID=exo
PATH=$PATH:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH CLASSPATH
 



echo $ORACLE_HOME
 

>> ko ra gi`

Mình đã search qua google để tìm cách fix mà chưa được,xin mọi người giúp cho,cám ơn!
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 25/02/2009 23:57:50 (+0700) | #2 | 170909
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
Hix,mình đã fix được ngay sau khi post vài s

Solution :

export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

[root@localhost ~]# echo $ORACLE_HOME
/u01/app/oracle/product/11.1.0/db_1

Nhưng còn một vấn đề nữa là khi đăng nhập bị lỗi và enter đúng user và pass rồi vẫn không vào được


[root@localhost ~]# /u01/app/oracle/product/11.1.0/db_1/bin/sqlplus "xxx/yyy"

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Feb 25 04:41:37 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

ERROR:
ORA-12162: TNS:net service name is incorrectly specified


Enter user-name: xxx
Enter password:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
 

http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 25/02/2009 23:59:44 (+0700) | #3 | 170910
[Avatar]
quanta
Moderator

Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
[Profile] [PM]
- echo $ORACLE_HOME
- echo $PATH
- http://www.oracle.com/technology/support/tech/sql_plus/htdocs/faq101.html#A4828
Let's build on a great foundation!
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:04:00 (+0700) | #4 | 170912
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
Ặc,quanta trả lời nhanh thật,túc trực suốt ngày đêm hả bạn?
TNS:net service name is incorrectly specified" results from improperly setting your ORACLE_SID value.
export ORACLE_SID=xxx rồi mà vẫn ra lỗi đó.
Còn 1 lỗi nữa,mình và bạn cùng tìm cách fix nhé,thx nhiều smilie
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:06:25 (+0700) | #5 | 170914
[Avatar]
quanta
Moderator

Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
[Profile] [PM]

nxthao wrote:
Hix,mình đã fix được ngay sau khi post vài s

Solution :

export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

[root@localhost ~]# echo $ORACLE_HOME
/u01/app/oracle/product/11.1.0/db_1
 

Như vậy là cần phải:
Code:
$ source ~/.bash_profile

hoặc:
Code:
$ . ~/.bash_profile

nxthao wrote:

Nhưng còn một vấn đề nữa là khi đăng nhập bị lỗi và enter đúng user và pass rồi vẫn không vào được


[root@localhost ~]# /u01/app/oracle/product/11.1.0/db_1/bin/sqlplus "xxx/yyy"

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Feb 25 04:41:37 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

ERROR:
ORA-12162: TNS:net service name is incorrectly specified


Enter user-name: xxx
Enter password:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
 

 

Code:
$ echo $ORACLE_SID
Let's build on a great foundation!
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:12:17 (+0700) | #6 | 170915
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
Cám ơn,mình cũng vừa sửa được và tiếp tục có những lỗi:


[root@localhost oracle]# echo $ORACLE_SID
xxx
[root@localhost oracle]# /u01/app/oracle/product/11.1.0/db_1/bin/sqlplus "xxx/yyy"

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Feb 25 04:47:10 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory
Process ID: 0
Session ID: 0 Serial number: 0
 

Bạn xem tiếp giúp với nhé
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:14:34 (+0700) | #7 | 170917
[Avatar]
kienmanowar
HVA Friend

Joined: 13/07/2004 05:57:34
Messages: 483
Offline
[Profile] [PM] [WWW]
Cần chỉ ra ORACLE_SID như quanta đã nói, trong trường hợp vẫn bị lỗi thì cần xem lại nội dung của tnsnames.ora :

Code:
cat cat $ORACLE_HOME/network/admin/tnsnames.ora


Regards
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:18:41 (+0700) | #8 | 170918
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
To resolve ORA-01034, be sure that the ORACLE_HOME and ORACLE_SID properly match within the files /etc/oratab or /var/opt/oracle/oratab 


vi /etc/oratab thi` không thấy 2 dòng của ORACLE_HOME và ORACLE_SID ,mình phải add vào hay không ?
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:24:26 (+0700) | #9 | 170921
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
Cám ơn kienmanowar , đây là cat show :


[root@localhost oracle]# cat /u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

xxx =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = xxx)
)
)
 


Nhưng e không biết phải chỉnh sửa thế nào cho đúng ?
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:32:48 (+0700) | #10 | 170923
[Avatar]
kienmanowar
HVA Friend

Joined: 13/07/2004 05:57:34
Messages: 483
Offline
[Profile] [PM] [WWW]
Ok, phần tnsnames.ora của bạn ok rồi...ý mình nói ở phần trước nếu còn lỗi thì check lại tnsnames.ora.

Bạn thử kiểm tra xem thằng smon của Oracle có chạy không : (SMON must always be running for an instance. If not, the instance will terminate. )

Code:
$ ps -ef | grep smon


Lỗi trên của bạn hình như vẫn do nguyên nhân là set Oracle_home và Oracle_sid chưa chuẩn thì phải smilie

Regards



[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:36:54 (+0700) | #11 | 170927
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
Nguyên nhân nữa là do chưa start được oracle,nhưng chưa biết fix smilie


Starting /u01/app/oracle/product/11.1.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.1.0.6.0 - Production
System parameter file is /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/product/11.1.0/db_1/log/diag/tnslsnr/localhost/listener/alert/log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12555: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00525: Insufficient privilege for operation
Linux Error: 1: Operation not permitted

Listener failed to start. See the error message(s) above...

 
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:39:04 (+0700) | #12 | 170928
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
Vâng ,e cũng nghĩ vẫn do ORACLE_HOME và ORACLE_SID ,nhưng echo ra thì đúng hết mà
E cũng thử ps -ef | grep smon rồi và không ra gì,nhưng chưa biết phải làm sao smilie ,nhiều lỗi quá ,phức tạp thiệt smilie
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:46:06 (+0700) | #13 | 170934
[Avatar]
kienmanowar
HVA Friend

Joined: 13/07/2004 05:57:34
Messages: 483
Offline
[Profile] [PM] [WWW]
_Vậy trong quá trình bạn cài có gặp lỗi gì không, thông thường là nếu cài trơn tru thì mọi thứ ok hết.

_Check lại cái log của listener xem nó báo gì:
/u01/app/oracle/product/11.1.0/db_1/log/diag/tnslsnr/localhost/listener/alert/log.xml 


_Kiểm tra thử :
Code:
netstat -ant | grep 1521 | grep LISTEN
tcp        0      0 0.0.0.0:1521                0.0.0.0:*                   LISTEN


_Thử reboot lại máy xem thế nào rồi tính tiếp :d

Regards
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:51:23 (+0700) | #14 | 170936
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
E không có file log đó,chỉ có file này
/u01/app/oracle/product/11.1.0/db_1/log/diag/adrci_dir.mif

Lúc cài chỉ bị lỗi là RAM ít.


[root@localhost oracle]# netstat -ant | grep 1521 | grep LISTEN
[root@localhost oracle]#
 

Reoot mấy lần rồi a a smilie
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 00:57:17 (+0700) | #15 | 170938
[Avatar]
quanta
Moderator

Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
[Profile] [PM]

nxthao wrote:
Vâng ,e cũng nghĩ vẫn do ORACLE_HOME và ORACLE_SID ,nhưng echo ra thì đúng hết mà
 

Bạn cho xem lại kết quả chính xác của 2 cái echo.

nxthao wrote:

E cũng thử ps -ef | grep smon rồi và không ra gì,nhưng chưa biết phải làm sao smilie ,nhiều lỗi quá ,phức tạp thiệt smilie 

"không ra gì" có nghĩa là nó chưa được start:
Code:
$ sqlplus / as sysdba
$ startup
Let's build on a great foundation!
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 01:02:23 (+0700) | #16 | 170943
[Avatar]
kienmanowar
HVA Friend

Joined: 13/07/2004 05:57:34
Messages: 483
Offline
[Profile] [PM] [WWW]
Kể cả trong điều kiện listener chưa start thì vẫn có thể connect vào db khi ngồi trực tiếp tại máy đó, vì listener chỉ làm nhiệm vụ lắng nghe các kết nối từ bên ngoài tới thông qua cổng 1521. Do đó trong trường hợp này tạm gác cái listener sang một bên..

Cái smon không có tức là instance của oracle đã bị down, vậy tức là oracle db chưa được startup lên. Vấn đề ở đây là cần set đúng Oracle_home và Oracle_sid, sau đó connect vào bằng sqlplus để startup db.

Một gợi ý như sau :

You are attempting to connect to an Oracle database from a client using SQL*Plus and receive the following errors:

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory

-->Error ORA-27101 is reporting that the shared memory key generated by the client does not match any currently existing keys. This is to be expected if the ORACLE_HOME or ORACLE_SID used by the client is not the same as that used when starting up the database.
 


Note: cần chú ý tới thằng Oracle_SID nhé, thằng này phân biệt chữ hoa và chữ thường đấy!!

Regards

[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 01:19:30 (+0700) | #17 | 170945
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
E install Oracle trên CenOs 5 trên Virtualbox trên Ubuntu 8.04 và controll chủ yếu qua terminal.
E mới cài Oracle lần đầu nên có nhiều chỗ chưa biết đúng hay sai,e de ORACLE_SID là tên của database lúc thiết lập ban đầu,đúng ko a?
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 01:26:11 (+0700) | #18 | 170948
[Avatar]
kienmanowar
HVA Friend

Joined: 13/07/2004 05:57:34
Messages: 483
Offline
[Profile] [PM] [WWW]
Vậy bạn có thể đọc qua lại bài viết này :

Installing Oracle Database 11g Release 1 on Oracle Enterprise Linux 5
http://www.oracle.com/technology/pub/articles/smiley-11gr1-install.html

Hoặc google với : Installing Oracle Database 11g Release 1 on Linux

Best Regards
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 01:26:39 (+0700) | #19 | 170949
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
Reply to quanta :

[root@localhost tmp]# echo $ORACLE_HOME
/u01/app/oracle/product/11.1.0/db_1
[root@localhost tmp]# echo $ORACLE_SID
exo
[root@localhost tmp]# /u01/app/oracle/product/11.1.0/db_1/bin/sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on Wed Feb 25 05:17:06 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

ERROR:
ORA-01031: insufficient privileges


Enter user-name:
 
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 02:02:11 (+0700) | #20 | 170954
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
E dang cài lại Oracle , đến đoạn kiểm tra,tất cả đều passed hết,chỉ còn cái này

Checking Network Configuration requirements ...
Check complete. The overall result of this check is: Not executed <<<<
Recommendation: Oracle supports installations on systems with DHCP-assigned public IP addresses. However, the primary network interface on the system should be configured with a static IP address in order for the Oracle Software to function properly. See the Installation Guide for more details on installing the software on systems configured with DHCP.


Ko biết có thể bỏ qua được không?
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 03:21:10 (+0700) | #21 | 170968
pnco
HVA Friend

Joined: 24/06/2005 16:33:48
Messages: 515
Offline
[Profile] [PM] [WWW]
Theo mình biết thì không được, check lại /etc/hosts
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 05:01:46 (+0700) | #22 | 170986
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
To pnco : vẫn được a ạ
E cài mới và chạy ,vẫn hiện ra 1 số lỗi nhỏ nữa,fix xong thì chạy oracle ngon lành smilie
Chân thành cám ơn mọi người đã tham gia giúp đỡ.
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 05:14:22 (+0700) | #23 | 170989
[Avatar]
kienmanowar
HVA Friend

Joined: 13/07/2004 05:57:34
Messages: 483
Offline
[Profile] [PM] [WWW]
Thưc ra vì Oracle thường là cài cho các máy Server, mà server thường là phải cấu hình ip tĩnh cho nên nó mới show ra cái thông báo đó smilie. Cứ việc cài cũng được không sao hết, thêm nữa nên add thêm một dòng trong file host như sau :

Ví dụ :
Code:
$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
10.0.0.10       test.oracle.vn        test


Regards
[Up] [Print Copy]
  [Question]   Re: Oracle config is not so right 26/02/2009 22:40:51 (+0700) | #24 | 171100
[Avatar]
nxthao
Member

[Minus]    0    [Plus]
Joined: 24/09/2007 11:12:42
Messages: 155
Location: india
Offline
[Profile] [PM] [WWW] [Yahoo!]
Gud job guys,Thx u all,I appreciated ^^@
http://pip.vn mạng xã hội PIP
http://forum.pip.vn forum mạng xã hội PIP
[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|