oracle 向mysql迁移

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

set SQL_SAFE_UPDATES=0

手动进行脚本调试时要注意以下几点:
1.varchar2 -->varchar
2.number -->numeric
3.clob --> text
4.双引号的问题
5.保留字的问题,加``



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

create table XRS.B_TAG_BOOK
(
    `id` INT NOT NULL AUTO_INCREMENT ,
   TAG_ID               int(6),
   BOOK_ID              int(6),
   primary key (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-->
    <!--<bean id="dataSourceOracle" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">-->
    <!--<property name="driverClassName">-->
    <!--<value>${jdbc.oralce.driverClassName}</value>-->
    <!--</property>-->
    <!--<property name="url">-->
    <!--<value>${jdbc.oralce.url}</value>-->
    <!--</property>-->
    <!--<property name="username">-->
    <!--<value>${jdbc.oralce.username}</value>-->
    <!--</property>-->
    <!--<property name="password">-->
    <!--<value>${jdbc.oralce.password}</value>-->
    <!--</property>-->
    <!--<property name="initialSize" value="5"/>-->
    <!--<property name="maxIdle" value="20"/>-->
    <!--<property name="maxActive" value="50"/>-->
    <!--<property name="maxWait" value="60000"/>-->
    <!--<property name="removeAbandoned" value="true"/>-->
    <!--<property name="removeAbandonedTimeout" value="10"/>-->
    <!--<property name="poolPreparedStatements" value="true"/>-->
    <!--<property name="logAbandoned" value="true"/>-->
    <!--<property name="validationQuery" value="select * from dual"/>-->
    <!--</bean>-->

    <bean id="dataSourceMysql" class="org.apache.commons.dbcp.BasicDataSource">
        <property name="driverClassName" value="${jdbc.mysql.driverClassName}"/>
        <property name="url" value="${jdbc.mysql.url}"/>
        <property name="username" value="${jdbc.mysql.username}"/>
        <property name="password" value="${jdbc.mysql.password}"/>
        <property name="initialSize" value="5" />
        <property name="maxActive" value="100" />
        <property name="maxIdle" value="30" />
        <property name="maxWait" value="1000" />
        <property name="poolPreparedStatements" value="true" />
        <property name="defaultAutoCommit" value="false" />
    </bean>


你可能感兴趣的:(oracle)