oracle 向mysql迁移

http://www.convert-in.com/ora2sql.htm

setSQL_SAFE_UPDATES=0

手动进行脚本调试时要注意以下几点:

1.varchar2-->varchar

2.number-->numeric

3.clob-->text

4.双引号的问题

5.保留字的问题,加``

str_to_date('21-10-201222:30:20','%d-%m-%Y%H:%i:%s')

createtableXRS.B_TAG_BOOK

(

`id`INTNOTNULLAUTO_INCREMENT,

TAG_IDint(6),

BOOK_IDint(6),

primarykey(ID)

)ENGINE=MyISAM;

#oracle

#jdbc.oralce.driverClassName=oracle.jdbc.driver.OracleDriver

#jdbc.oralce.url=jdbc:oracle:thin:@127.0.0.1:1521:ORCL

#jdbc.oralce.username=zxqy

#jdbc.oralce.password=zxqy

#mysql

jdbc.mysql.driverClassName=com.mysql.jdbc.Driver

jdbc.mysql.url=jdbc:mysql://localhost:3306/zxqy?useUnicode=true&characterEncoding=latin1

jdbc.mysql.username=tianbao2000

jdbc.mysql.password=tianbao2000

<!--dataSource-->

<!--<beanid="dataSourceOracle"class="org.apache.commons.dbcp.BasicDataSource"destroy-method="close">-->

<!--<propertyname="driverClassName">-->

<!--<value>${jdbc.oralce.driverClassName}</value>-->

<!--</property>-->

<!--<propertyname="url">-->

<!--<value>${jdbc.oralce.url}</value>-->

<!--</property>-->

<!--<propertyname="username">-->

<!--<value>${jdbc.oralce.username}</value>-->

<!--</property>-->

<!--<propertyname="password">-->

<!--<value>${jdbc.oralce.password}</value>-->

<!--</property>-->

<!--<propertyname="initialSize"value="5"/>-->

<!--<propertyname="maxIdle"value="20"/>-->

<!--<propertyname="maxActive"value="50"/>-->

<!--<propertyname="maxWait"value="60000"/>-->

<!--<propertyname="removeAbandoned"value="true"/>-->

<!--<propertyname="removeAbandonedTimeout"value="10"/>-->

<!--<propertyname="poolPreparedStatements"value="true"/>-->

<!--<propertyname="logAbandoned"value="true"/>-->

<!--<propertyname="validationQuery"value="select*fromdual"/>-->

<!--</bean>-->

<beanid="dataSourceMysql"class="org.apache.commons.dbcp.BasicDataSource">

<propertyname="driverClassName"value="${jdbc.mysql.driverClassName}"/>

<propertyname="url"value="${jdbc.mysql.url}"/>

<propertyname="username"value="${jdbc.mysql.username}"/>

<propertyname="password"value="${jdbc.mysql.password}"/>

<propertyname="initialSize"value="5"/>

<propertyname="maxActive"value="100"/>

<propertyname="maxIdle"value="30"/>

<propertyname="maxWait"value="1000"/>

<propertyname="poolPreparedStatements"value="true"/>

<propertyname="defaultAutoCommit"value="false"/>

</bean>

相关推荐