Dnes je: 20. května 2012

Ostatní

Autor knihy

Oracle Database 11g - Hotová řešení

Kdo je online

Právě připojeni - hostů: 12 

Přihlásit se




ORA-12523: TNS:listener could not find instance appropriate for the client connection

Problém 34:

V dříve jsem si změnil defaultní port pro listener na nový 1522. Potém jsem musel udělat i změny v nastavení EM.
Dnes jsem si chtěl vyzkoušet vytvořit ASM dynamic volume a nemůžu se připojit do ASM skrze EM.
Chybové hlášení je jasné:"ORA-12523: TNS:listener could not find instance appropriate for the client connection"

Jelikož listener běží na jiném než defaultním portu, neproběhla automatická registrace a tak je nutné ji udělat ručně.

gc_01
gc_01 gc_01

[oracle@vserver1 dev]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-AUG-2010 11:12:40

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vserver1.tomas-solar.com)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production

Start Date                17-AUG-2010 10:44:39
Uptime                    0 days 0 hr. 28 min. 1 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/vserver1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vserver1.tomas-solar.com)(PORT=1522)))
Services Summary...
Service "orclr1.tomas-solar.com" has 1 instance(s).
Instance "orclr1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

Řešení:

1. Úprava tnsnames.ora

[oracle@vserver1 admin]$ pwd
/u01/app/oracle/product/11.2.0/grid/network/admin
[oracle@vserver1 admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.

ASM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vserver1.tomas-solar.com)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = +ASM)
)
)

2. Změna parametru LOCAL_LISTENER

SQL> alter system set local_listener='ASM' scope=spfile;

System altered.

3. Restart ASM instance

[oracle@vserver1 admin]$ . oraenv
ORACLE_SID = [orclr1] ? +ASM
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle
[oracle@vserver1 admin]$ sqlplus / as sysdba

SQL> shutdown immediate
ORA-01031: insufficient privileges

Pozor u databáze 11R2 došlo u změně oprávnění. Chcete-li pracovat s ASM instancí a provádět třeba restart, musíte být přihlášení jako uživatel s oprávněním SYSASM.
SQL> connect sys as sysasm;
Enter password:
Connected.
SQL> shutdown immediate;
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started

Total System Global Area  284565504 bytes
Fixed Size                  1336036 bytes
Variable Size             258063644 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted

4. Registrace do listeneru

SQL> alter system register;

System altered.

5. Registrace je úspěšná

gc_02
gc_02 gc_02

[oracle@vserver1 admin]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 17-AUG-2010 11:41:36

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=vserver1.tomas-solar.com)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                17-AUG-2010 10:44:39
Uptime                    0 days 0 hr. 56 min. 58 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/vserver1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=vserver1.tomas-solar.com)(PORT=1522)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Service "orclr1.tomas-solar.com" has 1 instance(s).
Instance "orclr1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

[oracle@vserver1 admin]$ tnsping asm

TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 17-AUG-2010 11:41:54

Copyright (c) 1997, 2009, Oracle.  All rights reserved.

Used parameter files:
/u01/app/oracle/product/11.2.0/grid/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = vserver1.tomas-solar.com)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = +ASM)))
OK (0 msec)

 

Anketa

Využívají vaše databáze pro ukládání souborů ASM? (automatic storage management)
 

Certifikát Oracle Certifikát Oracle Certifikát Oracle Certifikát Oracle Certifikát Oracle Certifikát Oracle

Partnerské internetové stránky:
www.oracledba.cz www.asktom.cz www.tomas-solar.cz