www.Orasql.Com
 
用户名: 密码:  验证码: 注册|找回密码 oracleawen's blog  
 
         当前位置 >> 技术论坛  发表帖子     论坛版块     查找帖子
测试RAC的实战项目——JSP+Oracle-技术论坛||Oracle高手之路—Orasql.Com!
            测试RAC的实战项目——JSP+Oracle
 
发贴人:oracle_awen
oracleawen@gmail.com448315233127.0.0.1
用户级别:管理员
发贴总数:1245
注册时间:2011-05-05 09:23:03
2011-12-31 11:10:33

这个项目是在网上下载的,虽然界面不是太友好,但是测试用足够了,有兴趣的同学可以找我要源文件进行二次开发。下载下来还有很多问题,经过调试,修改。已将编译后的文件打包传到了网上。

下载地址:http://www.orasql.com/showdown.php?id=76

第一步、导入数据库

解压后会看到一个database目录,里面有一个.sql 和.dump文件,我们需要将这2个文件导入到oracle数据库中。

[oracle@rac2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Sat Dec 17 12:02:59 2011

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

记住是用scott用户导入

SQL> conn scott/oracle
Connected.

执行sql脚本

SQL> @/home/oracle/shop.sql

Creating table NETUSER
======================


Table created.


Table altered.


Creating table ORDER_FORM
=========================


Table created.


Table altered.


Creating table SHOP
===================


Table created.


Table altered.


Creating table ORDER_FORM_SHOP
==============================


Table created.


Table altered.


Index created.


Creating table SHOP_TYPE
========================


Table created.


Table altered.


Creating sequence NETUSER_SEQ
=============================


Sequence created.


Creating sequence ORDER_FORM_SEQ
================================


Sequence created.


Creating sequence ORDER_FORM_SHOP_SEQ
=====================================


Sequence created.


Creating sequence SHOP_SEQ
==========================


Sequence created.


Creating sequence SHOP_TYPE_SEQ
===============================


Sequence created.


Creating trigger NETUSER_TRIGGER
================================


Trigger created.


Creating trigger ORDER_FORM_SHOP_TRIGGER
========================================


Trigger created.


Creating trigger ORDER_FORM_TRIGGER
===================================


Trigger created.



Creating trigger SHOP_TRIGGER
=============================


Trigger created.



Creating trigger SHOP_TYPE_TRIGGER
==================================


Trigger created.


然后导入数据文件:

[oracle@rac2 ~]$ imp scott/oracle@myorc1 file=/home/oracle/shop.dmp  

Import terminated successfully with warnings.

然后将整个文件夹放到tomcat的webapps文件夹下

修改jdbc连接oracle的连接语句

[root@rac2 ~]# vim /usr/tomcat/webapps/shop/WEB-INF/classes/javabean/dbconn.properties

driverName=oracle.jdbc.driver.OracleDriver
connString=jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))(LOAD_BALANCE = yes)(FAILOVER = ON)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = myorc.oracle.com)))

userName=scott
password=oracle

然后再在浏览器中浏览

依次关闭其中的某个节点测试看是否可以浏览

O如果正常,那么简单的测试完成。

 

      
 
  
 Orasql.Com|E-Mail:oracleawen@gmail.com|Phone:15271942915|Copyright © 2011|All Rights Reserved|