【阿里之yugong小实验】

一、启动Oracle数据库



二、启动Mysql数据库

新建Emp表

新建Dept表



 

三、配置愚公文件


 四、愚公启动


 

五、结果验证


 
结论:愚公移山成功~!
 

附件:  

1)EMP的建表语句  

CREATE TABLE `emp` (

  `EMPNO` int(11) DEFAULT NULL,

  `ENAME` varchar(255) DEFAULT NULL,

  `JOB` varchar(255) DEFAULT NULL,

  `MGR` int(11) DEFAULT NULL,

  `HIREDATE` varchar(255) DEFAULT NULL,

  `SAL` double DEFAULT NULL,

  `COMM` double DEFAULT NULL,

  `DEPTNO` int(11) DEFAULT NULL

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

2)Dept的建表语句  

CREATE TABLE `dept` (

  `DEPTNO` int(11) NOT NULL DEFAULT '0',

  `DNAME` varchar(255) DEFAULT NULL,

  `LOC` varchar(255) DEFAULT NULL,

  PRIMARY KEY (`DEPTNO`)

) ENGINE=MyISAM DEFAULT CHARSET=utf8;

启动Oracle

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 15-APR-2017 11:14:35

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                15-APR-2017 11:14:35

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 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Apr 15 11:15:00 2017

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

Connected to an idle instance.

SQL> startup force;

ORACLE instance started.

Total System Global Area  167772160 bytes

Fixed Size                  2019320 bytes

Variable Size              75497480 bytes

Database Buffers           88080384 bytes

Redo Buffers                2174976 bytes

Database mounted.

Database opened.

猜你喜欢

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