【Mycat1.6之操作Oracle案例】

一、启动数据库/配置Schema文件


 

Last login: Tue Apr 25 12:06:17 2017

[root@node1 ~]# su - oracle

[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 25 12:07:03 2017

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

Connected to an idle instance.

扫描二维码关注公众号,回复: 264509 查看本文章

SQL> startup

ORACLE instance started.

Total System Global Area  167772160 bytes

Fixed Size                  2019320 bytes

Variable Size              83886088 bytes

Database Buffers           79691776 bytes

Redo Buffers                2174976 bytes

Database mounted.

Database opened.

SQL> !

[oracle@node1 ~]$ lsnrctl start

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 25-APR-2017 12:08:44

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

Starting /u01/oracle/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.1.0 - Production

System parameter file is /u01/oracle/network/admin/listener.ora

Log messages written to /u01/oracle/network/log/listener.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node1)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                25-APR-2017 12:08:46

Uptime                    0 days 0 hr. 0 min. 0 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/oracle/network/admin/listener.ora

Listener Log File         /u01/oracle/network/log/listener.log

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=node1)(PORT=1521)))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

The command completed successfully

[oracle@node1 ~]$ 


 

二、测试



 


三、问题解决

1、MyCAT Server startup successfully. see logs in logs/mycat.log

2017-04-25 19:08:40,953 [ERROR][Timer1] JDBCHeartBeat error java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@127.0.0.1:1521:ORCL

at java.sql.DriverManager.getConnection(DriverManager.java:604)

at java.sql.DriverManager.getConnection(DriverManager.java:221)

原因:缺少jar包

2、(io.mycat.backend.jdbc.JDBCHeartbeat:JDBCHeartbeat.java:114) 

2017-04-25 19:12:09,828 [ERROR][Timer1] JDBCHeartBeat error java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)

at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)

原因:网络ip和监听是否正常

猜你喜欢

转载自gaojingsong.iteye.com/blog/2371199