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ě.
{phocagallery view=category|categoryid=1|imageid=97}
[oracle@vserver1 dev]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 – Production on 17-AUG-2010 11:12:40Copyright (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 LISTENERVersion TNSLSNR for Linux: Version 11.2.0.1.0 – Production
Start Date 17-AUG-2010 10:44:39Uptime 0 days 0 hr. 28 min. 1 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/app/oracle/product/11.2.0/grid/network/admin/listener.oraListener Log File /u01/app/oracle/diag/tnslsnr/vserver1/listener/alert/log.xmlListening 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]$ . oraenvORACLE_SID = [orclr1] ? +ASMThe Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid is /u01/app/oracle[oracle@vserver1 admin]$ sqlplus / as sysdbaSQL> shutdown immediateORA-01031: insufficient privilegesPozor 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 dismountedASM instance shutdownSQL> startupASM instance startedTotal System Global Area 284565504 bytesFixed Size 1336036 bytesVariable Size 258063644 bytesASM Cache 25165824 bytesASM diskgroups mounted
4. Registrace do listeneru
SQL> alter system register;System altered.
5. Registrace je úspěšná
[oracle@vserver1 admin]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 – Production on 17-AUG-2010 11:41:36Copyright (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 LISTENERVersion TNSLSNR for Linux: Version 11.2.0.1.0 – ProductionStart Date 17-AUG-2010 10:44:39Uptime 0 days 0 hr. 56 min. 58 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /u01/app/oracle/product/11.2.0/grid/network/admin/listener.oraListener Log File /u01/app/oracle/diag/tnslsnr/vserver1/listener/alert/log.xmlListening 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 asmTNS Ping Utility for Linux: Version 11.2.0.1.0 – Production on 17-AUG-2010 11:41:54Copyright (c) 1997, 2009, Oracle. All rights reserved.Used parameter files:/u01/app/oracle/product/11.2.0/grid/network/admin/sqlnet.oraUsed TNSNAMES adapter to resolve the aliasAttempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = vserver1.tomas-solar.com)(PORT = 1522)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = +ASM)))OK (0 msec)