在win7系统中使用xshell连接Oracle数据库服务器,配置监听使用netca报错
[oracle@nexus ~]$ netca
Oracle Net Services Configuration:
Error: null
Check the trace file for details: /opt/oracle/cfgtoollogs/netca/trace_OraDb11g_home1-1609063PM3137.log
Oracle Net Services configuration failed. The exit code is 1
[oracle@nexus ~]$ tail /opt/oracle/cfgtoollogs/netca/trace_OraDb11g_home1-1609063PM3137.log
[main] [ 2016-09-06 15:31:38.782 CST ] [OracleHome.getVersion:936] OracleHome.server.getVersion Version: 11.2.0.3.0
[main] [ 2016-09-06 15:31:38.783 CST ] [OracleHome.getVersion:957] Current Version From Inventory: 11.2.0.3.0
[main] [ 2016-09-06 15:31:38.783 CST ] [OPSUtil.getHomeVersion:452] returning oracleHome Version = 11.2.0.3.0
[main] [ 2016-09-06 15:31:38.788 CST ] [OracleHome.getVersion:889] OracleHome.getVersion called. Current Version: 11.2.0.3.0
[main] [ 2016-09-06 15:31:38.789 CST ] [OracleHome.getVersion:957] Current Version From Inventory: 11.2.0.3.0
[main] [ 2016-09-06 15:31:38.789 CST ] [InitialSetup.<init>:4071] Admin location is: /opt/oracle/11g/network/admin
[main] [ 2016-09-06 15:31:38.877 CST ] [ConfigureProfile.setProfileParam:136] Setting ADR_BASE: /opt/oracle
java.lang.NullPointerException
at oracle.ewt.lwAWT.BufferedApplet.<init>(Unknown Source)
at oracle.net.ca.NetCA.<init>(NetCA.java:443)
at oracle.net.ca.NetCA.main(NetCA.java:429)
这个是由于win7无法通过xshell调出服务器的图形界面,执行下面三个命令后即可
切换到Oracle用户后再执行如下命令
[oracle@nexus ~]$ export DISPLAY=192.168.20.100:0 //192.168.20.100 是win7的地址,不是服务器的IP地址,切记
[oracle@nexus ~]$ xhost +
access control disabled, clients can connect from any host //证明设置成功
[oracle@nexus ~]$ netca
Oracle Net Services Configuration: //出现这个表名出现图形界面