MySQL to PL/SQL Conversion.

guys,
I have a client that has around 200 Stored procedures, functions and triggers written in MySQL. They are attempting to convert to Oracle PL/SQL
Has anyone taken this effort and all experiences are greatly appreciated.
Please share the pitfalls and the process followed.
Thanks
Srinivas

Couldn't resist.... ;)
Two men were arguing about the slowness of their 500GB MySQL Database.
"It is slow because of a poor table design," stated the first man.
"No, it is slow because of poor SQL," contended the second.
An Oracle master, who happened to be walking by, overheard the debate and interrupted them.
"Neither the table design nor the SQL are to blame," he said,
"It is slow because it is MySQL."
From: The Tao of Oracle (C) Roby Sherman

Similar Messages

  • Support for mysql or ms sql server ?

    Does sunone support mysql or ms sql server, I keep getting the following when I try to deploy an entity bean using either database.
    Deployment Error -- Error while running ejbc -- Fatal Error from EJB Compiler -- -- java.lang.RuntimeException: The schema file sequence, does not contain a table named SEQUENCE
    I'm using the dbschema generated by Forte, is there some hand editing I need to do to get it to work? I'm still confused why this schema is necessary, never had to go through such an annoying process with IAS or weblogic.
    Here's my schema:
    <?xml version="1.0" encoding="UTF-8" ?>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.SchemaElement" ID="com.sun.forte4j.modules.dbmodel.SchemaElement113759">
    <versionNo>2</versionNo>
    <impl>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl14130741">
    <element>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.SchemaElement113759"/>
    </element>
    <_catalog>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier13872011">
    <name>jbush</name>
    </OBJECT>
    </_catalog>
    <_username>dbo</_username>
    <_driverName>i-net SPRINTA 2000</_driverName>
    <_driverVersion>3.04</_driverVersion>
    <_url>jdbc:inetdae7:149.24.18.160:1433?jbush</_url>
    <_name>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier10703853">
    <name>seq</name>
    </OBJECT>
    </_name>
    <_driver>com.inet.tds.TdsDriver</_driver>
    <tables>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection1698697">
    <_elms>
    <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
    <ROW ROW="0">
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.TableElement" ID="com.sun.forte4j.modules.dbmodel.TableElement-64018320">
    <impl>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14348553">
    <table>sequence</table>
    <columns>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection7791938">
    <_elms>
    <ARRAY SIZE="2" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
    <ROW ROW="0">
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement1290031433">
    <declaringTable>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-64018320"/>
    </declaringTable>
    <impl>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl431013">
    <_precision>
    <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer255">
    <value>255</value>
    </OBJECT>
    </_precision>
    <element>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1290031433"/>
    </element>
    <_scale>
    <OBJECT/>
    </_scale>
    <_name>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier13059074">
    <name>name</name>
    </OBJECT>
    </_name>
    <_isNullable>false</_isNullable>
    <_type>12</_type>
    <_length>
    <OBJECT REFERENCE="java.lang.Integer255"/>
    </_length>
    </OBJECT>
    </impl>
    </OBJECT>
    </ROW>
    <ROW ROW="1">
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.ColumnElement" ID="com.sun.forte4j.modules.dbmodel.ColumnElement-1947358447">
    <declaringTable>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-64018320"/>
    </declaringTable>
    <impl>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.ColumnElementImpl4332208">
    <_precision>
    <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer10">
    <value>10</value>
    </OBJECT>
    </_precision>
    <element>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement-1947358447"/>
    </element>
    <_scale>
    <OBJECT CLASS="java.lang.Integer" ID="java.lang.Integer0">
    <value>0</value>
    </OBJECT>
    </_scale>
    <_name>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier15083736">
    <name>_index</name>
    </OBJECT>
    </_name>
    <_isNullable>false</_isNullable>
    <_type>4</_type>
    <_length>
    <OBJECT REFERENCE="java.lang.Integer10"/>
    </_length>
    </OBJECT>
    </impl>
    </OBJECT>
    </ROW>
    </ARRAY>
    </_elms>
    <_template>
    <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
    </ARRAY>
    </_template>
    <owner>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14348553"/>
    </owner>
    </OBJECT>
    </columns>
    <element>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-64018320"/>
    </element>
    <_name>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier8623087">
    <name>sequence</name>
    </OBJECT>
    </_name>
    <isTable>true</isTable>
    <keys>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection6518090">
    <_elms>
    <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
    <ROW ROW="0">
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.UniqueKeyElement" ID="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1935265242">
    <_associatedIndex>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.IndexElement" ID="com.sun.forte4j.modules.dbmodel.IndexElement-1935265242">
    <declaringTable>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-64018320"/>
    </declaringTable>
    <impl>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.IndexElementImpl6639084">
    <columns>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15936586">
    <_elms>
    <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
    <ROW ROW="0">
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1290031433"/>
    </ROW>
    </ARRAY>
    </_elms>
    <_template>
    <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
    </ARRAY>
    </_template>
    <owner>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14348553"/>
    </owner>
    </OBJECT>
    </columns>
    <element>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1935265242"/>
    </element>
    <_name>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier14601066">
    <name>PK__sequence__65370702</name>
    </OBJECT>
    </_name>
    <tei>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14348553"/>
    </tei>
    <_unique>true</_unique>
    </OBJECT>
    </impl>
    </OBJECT>
    </_associatedIndex>
    <declaringTable>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.TableElement-64018320"/>
    </declaringTable>
    <impl>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl16555948">
    <columns>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection15874598">
    <_elms>
    <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
    <ROW ROW="0">
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.ColumnElement1290031433"/>
    </ROW>
    </ARRAY>
    </_elms>
    <_template>
    <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.ColumnElement">
    </ARRAY>
    </_template>
    <owner>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.UniqueKeyElementImpl16555948"/>
    </owner>
    </OBJECT>
    </columns>
    <element>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.UniqueKeyElement-1935265242"/>
    </element>
    <_name>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier5692381">
    <name>PK__sequence__65370702</name>
    </OBJECT>
    </_name>
    <_primary>true</_primary>
    </OBJECT>
    </impl>
    </OBJECT>
    </ROW>
    </ARRAY>
    </_elms>
    <_template>
    <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.KeyElement">
    </ARRAY>
    </_template>
    <owner>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14348553"/>
    </owner>
    </OBJECT>
    </keys>
    <indexes>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection" ID="com.sun.forte4j.modules.dbmodel.jdbcimpl.DBElementsCollection12944408">
    <_elms>
    <ARRAY SIZE="1" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
    <ROW ROW="0">
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.IndexElement-1935265242"/>
    </ROW>
    </ARRAY>
    </_elms>
    <_template>
    <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.IndexElement">
    </ARRAY>
    </_template>
    <owner>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.TableElementImpl14348553"/>
    </owner>
    </OBJECT>
    </indexes>
    </OBJECT>
    </impl>
    </OBJECT>
    </ROW>
    </ARRAY>
    </_elms>
    <_template>
    <ARRAY SIZE="0" CLASS="PRIMITIVE" ROWCLASS="com.sun.forte4j.modules.dbmodel.TableElement">
    </ARRAY>
    </_template>
    <owner>
    <OBJECT REFERENCE="com.sun.forte4j.modules.dbmodel.jdbcimpl.SchemaElementImpl14130741"/>
    </owner>
    </OBJECT>
    </tables>
    <_databaseProductVersion>8.0.194</_databaseProductVersion>
    <_schema>
    <OBJECT CLASS="com.sun.forte4j.modules.dbmodel.DBIdentifier" ID="com.sun.forte4j.modules.dbmodel.DBIdentifier8165687">
    <name></name>
    </OBJECT>
    </_schema>
    <_databaseProductName>Microsoft SQL Server</_databaseProductName>
    </OBJECT>
    </impl>
    </OBJECT>

    Thanks for the help, the migration tool translated all my table names and columns names into caps, lowercasing these babies in the sun-cmp-mappings.xml fixed the problem.
    Just for the record, for anyone else who is trying to use mysql, here is what my connection pool looks like in server.xml:
    <jdbc-connection-pool steady-pool-size="8" max-pool-size="32" max-wait-time-in-millis="60000" pool-resize-quantity="2" idle-timeout-in-seconds="300" is-isolation-level-guaranteed="false" is-connection-validation-required="false" connection-validation-method="auto-commit" fail-all-connections="false" datasource-classname="org.gjt.mm.mysql.jdbc2.optional.MysqlDataSource" name="jdbcPool">
    <property value="jbush" name="DatabaseName"/>
    <property value="localhost" name="serverName"/>
    <property value="3306" name="port"/>
    <property value="root" name="User"/>
    <property value="root" name="Password"/>
    </jdbc-connection-pool>

  • Create new MySQL Database with SQL

    I have a simple question, :-)
    how can I create a new MySQL Database with SQL - (JDBC)
    can you show me a code example?
    tank you ...

    okay ... but how do I use the URL ??? that's the problem
    I tried this:
    Connection con   = null;
            Vector vct       = new Vector();
            try{
                String drv = "org.gjt.mm.mysql.Driver";
                String url = "jdbc:mysql://111.222.333.444:3306";
                String name = "myname";
                String pass = "mypass";
                Class.forName(drv);
                con = DriverManager.getConnection(url,name,pass);
                String statement = "CREATE DATABASE TestDB_Don1";
                Statement stm = con.createStatement();
                stm.execute(statement);
                stm.close();
                con.close();                         
            catch(Exception e){ e.printStackTrace(); }but it doesen't work ............. what is wrong ?

  • Mysql equivalent oracle sql query is required

    Hi all,
    please help me convert mysql quyery into sql query.
    select u.username, t.name as fullname, p.id as project_id, p.name as project,
                             (select count(a.resource_id) from pd_resource_task_alloc as a left OUTER JOIN pd_resource_task as b on a.task_id=b.task_id where a.task_id=t.id )  as allocatedTask,
                             (select count(a.resource_id) from pd_resource_task_alloc as a left OUTER JOIN pd_resource_task as b on a.task_id=b.task_id where a.task_id=t.id and b.task_status_id='2') as completedTask,
                             (select count(a.resource_id) from pd_resource_task_alloc as a left OUTER JOIN pd_resource_task as b on a.task_id=b.task_id where a.task_id=t.id and b.task_status_id!='2') as pendingTask,
                             c.name as category, sub.task_id, t.name, sub.bucket_date, sum(sub.alloc_time) as s
                             from (select rt.task_id, rt.resource_id, rt.project_id, rta.sequence, rta.alloc_time,DATE(th.creation_date) as creation_date,rt.start_date,th.task_status_id,rt.start_date as bucket_date from resource_task rt, resource_task_alloc rta ,task_history th
                             where rt.task_id = rta.task_id and rt.task_id = th.task_id and th.task_status_id >=2
                             and rt.resource_id = rta.resource_id and rt.project_id = rta.project_id
                             and rta.alloc_time > 0 and rt.start_date is not null ) as sub,
                             pd_tool_user u, pd_task t, pd_project p, pd_category c where sub.resource_id = u.id
                             and sub.start_date >='2011-11-01' and sub.creation_date <= '2011-11-31'
                             and sub.task_id = t.id and sub.project_id = p.id and
                             t.category_id = c.id
                             and sub.project_id='355'
                             group by p.project, u.username, p.id , u.name, sub.task_id, t.name, c.name,
                             sub.bucket_date order by u.username, sub.bucket_date, p.name, c.nameThanks,
    P Prakash

    Not sure as we don't have any tables and data to work with, but firstly...
    a) format your code to make it easier to see what's going on
    b) don't mix ansi joins with regular joins
    c) treat DATEs as DATEs
    d) Table alias names don't use the "AS" keyword
    First guess (obviously unteseted)...
    select u.username
          ,t.name as fullname
          ,p.id as project_id
          ,p.name as project
          ,(select count(a.resource_id)
            from   pd_resource_task_alloc a
                   left OUTER JOIN pd_resource_task b on (a.task_id=b.task_id)
            where  a.task_id=t.id
           ) as allocatedTask
          ,(select count(a.resource_id)
            from   pd_resource_task_alloc a
                   left OUTER JOIN pd_resource_task b on (a.task_id=b.task_id)
            where  a.task_id=t.id
            and    b.task_status_id='2'
           ) as completedTask
          ,(select count(a.resource_id)
            from   pd_resource_task_alloc a
                   left OUTER JOIN pd_resource_task b on (a.task_id=b.task_id)
            where  a.task_id=t.id
            and    b.task_status_id!='2'
           ) as pendingTask
          ,c.name as category
          ,sub.task_id
          ,t.name
          ,sub.bucket_date
          ,sum(sub.alloc_time) as s
    from   (select rt.task_id
                  ,rt.resource_id
                  ,rt.project_id
                  ,rta.sequence
                  ,rta.alloc_time
                  ,th.creation_date -- assuming creation_date is a DATE datatype?
                  ,rt.start_date
                  ,th.task_status_id
                  ,rt.start_date as bucket_date
            from   resource_task rt
                   join resource_task_alloc rta on (rt.task_id = rta.task_id
                                                and rt.resource_id = rta.resource_id
                                                and rt.project_id = rta.project_id)
                   join task_history th on (rt.task_id = th.task_id)
            where  th.task_status_id >=2
            and    rta.alloc_time > 0
            and    rt.start_date is not null
           ) sub
           join pd_tool_user u on (sub.resource_id = u.id)
           join pd_task t on (sub.task_id = t.id)
           join pd_project p on (sub.project_id = p.id)
           join pd_category c on (t.category_id = c.id)
    where  sub.start_date >= to_date('2011-11-01','YYYY-MM-DD') -- assuming start_date is a DATE datatype
    and    sub.creation_date <= to_date('2011-11-31','YYYY-MM-DD') -- assuming creation_date is a DATE datatype
    and    sub.project_id='355'
    group by p.project
            ,u.username
            ,p.id
            ,u.name
            ,sub.task_id
            ,t.name
            ,c.name
            ,sub.bucket_date
    order by u.username
            ,sub.bucket_date
            ,p.name
            ,c.name

  • Date syntax for MySql query in SQL Reporting Services

    I am currently trying to link a mysql Stored Procedure to a Microsoft SQL Reporting Server. It is coming up with a Syntax error. I believe this is down to the
    Date_from and Date_to Parameters. The query is below any help would be appreciated 
    DELIMITER $$ 
    USE `mydb`$$ 
    DROP PROCEDURE IF EXISTS `DTI`$$ 
    CREATE DEFINER=`linkeduser`@`%` PROCEDURE `DTI`(IN date_from DATETIME, 
    IN date_to DATETIME) 
    BEGIN 
    SELECT title,gender,firstname,lastname,address1,town,postcode,dob,IF(co.start_date = '00-00-0000', '', CAST(DATE(co.start_date) AS DATE)) AS 'StartDate' 
    FROM cf_user AS us 
    JOIN ca_compliance AS co ON co.user_id = us.user_id 
    WHERE co.start_date BETWEEN date_from AND date_to; 
    END$$ 
    DELIMITER ;

    Hello,
    The dataset query runs on the external data source.
     In your case, you create a report by retrieve data from MySQL database with a stored procedure. The stored procedure will run on MySQL Server and return the result in the Report designer or Report Builder. To solved this issue, please execute the stored
    procedure on the MySQL database and check the syntax error.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Switch from MySQL to MS SQL Server, Query not working

    I'm sure there is a simple setting somewhere for this, but cannot seem to find it and really would appreciate some assistance. Have an application which uses JDBC to connect to a MySQL DB to run the following query without an issue:
    SELECT * FROM users
    This returns the desired results. Changed to connect to MS SQL Server 2000 using the JDBC-ODBC bridge and the same query returns no results. The problem, SQL Server wants this query instead:
    SELECT * FROM [users]
    I don't want to have to change queries depending on the DB, as that is supposed to be one of the advantages of JDBC. Is there a setting in MySQL (or the JDBC driver) to have it work correctly if I pass table names in []? Or is there a setting in MS SQL Server (or in the JDBC, or ODBC) to have it accept queries without the []?
    Or is there a different approach that I'm missing which would avoid this whole problem?
    Thanks,
    Matt

    I suspect your database definitions are different. It has nothing to do with your java code.
    The bracket syntax is used to indicate the more standard quoted identifiers in standard SQL.
    Thus you could do this in oracle and in MS SQL Server...
    SELECT * FROM "users"
    I suspect that the above will work for your MS SQL Server database and will not work for your Oracle database. However if you created the table in oracle and specifically used "users" (with the double quotes around the name) when creating the table then it would work.
    Of course if the database definitions are different it means you must use different SQL for each. Just as if the name of the table was 'other' rather than 'users'.

  • Import / Export MySQL database in SQL Developer

    Hello,
    I have version 3.1.2.704 of SQL Developer Data Modeler and version 3.2.09 of SQL Developer installed.
    When I´m adding a new connection in SQL Developer, I can choose the MySQL tab an create a connection to a MySQL database.
    The connection test was successful and I can see all tables.
    I use the same JDBC driver for SQL Developer and SQL Developer Data Modeler (mysql-connector-java-5.0.4-bin.jar).
    But there are two problems.
    1. First there is an problem when I want to import from a MySQL database (SQL Developer -> File -> DataModeler -> Import -> DataDictionary).
    After choosing the MySQL connection and pressing the next button an error occurs: CONNECTION_TYPE
    What is the reason?
    2. In SQL Developer Data Modeler I have not the CONNECTION_TYPE problem. But when I want to export DDL, there is no MySQL type selectable, although there is working connection to the MySQL Database. It´s the same in SQL Developer.
    What is the reason?

    Hi,
    Please be aware that a separate forum for SQL Developer Data Modeler is available:
    SQL Developer Data Modeler
    You will likely get a more rapid response if you mark this thread as answered and re-post your question over there.
    Regards,
    Gary

  • Import / Export MySQL database in SQL Developer Data Modeler

    Hello,
    I have version 3.1.2.704 of SQL Developer Data Modeler and version 3.2.09 of SQL Developer installed.
    When I´m adding a new connection in SQL Developer, I can choose the MySQL tab an create a connection to a MySQL database.
    The connection test was successful and I can see all tables.
    I use the same JDBC driver for SQL Developer and SQL Developer Data Modeler (mysql-connector-java-5.0.4-bin.jar).
    But there are two problems.
    1. First there is an problem when I want to import from a MySQL database (SQL Developer -> File -> DataModeler -> Import -> DataDictionary).
    After choosing the MySQL connection and pressing the next button an error occurs: CONNECTION_TYPE
    What is the reason?
    2. In SQL Developer Data Modeler I have not the CONNECTION_TYPE problem. But when I want to export DDL, there is no MySQL type selectable, although there is working connection to the MySQL Database. It´s the same in SQL Developer.
    What is the reason?

    Hi,
    Data Modeler does not explicitly support import from MySQL databases, although you can use a JDBC connection to do this.
    Philip described how to set this up in forum message How to connect mySQL for reverve engineering
    There is no MySQL tab in Data Modeler - you should use "JDBC-ODBC Bridge" - "other third party Driver".
    Set URL like : jdbc:mysql://localhost:3306/database_name
    driver Class: com.mysql.jdbc.DriverAlso Data Modeler does not support generation of DDL for MySQL.
    David

  • MySQL database with SQL Toolkit

    Hi,
    we are using CVI 2012 and the SQL Toolkit 2.2 and we want to connect to a MySQL database.
    The MySQL database was created with MySQLServer. When we try to connect with DBConnect we get an error.
    How can we connect the MySQL Database?
    What do we have to type in the connection string in DBConnect? Is it the name of the database, the path to the database or anything else?
    Does any one have experience with the SQL toolkit?
    Thanks in advance
    Oliver
    Solved!
    Go to Solution.

    You need to install the mysql connector odbc and then create an ODBC dns for your database.
    control panel, administrative, odbc

  • Mysql error java.sql.SQLException: Communication failure during handshake.

    Hi !!!
    I was working ok, with hibernate and mysql but yesterday I try to install the new mysql version (4.1.10) and receive the following error when I try to connect
    Initializing Hibernate
    INFO - Hibernate 2.1.6
    INFO - hibernate.properties not found
    INFO - using CGLIB reflection optimizer
    INFO - configuring from resource: /hibernate.cfg.xml
    INFO - Configuration resource: /hibernate.cfg.xml
    INFO - Mapping resource: com/tutorial/hibernate/core/News.hbm.xml
    INFO - Mapping class: com.tutorial.hibernate.core.News -> news
    INFO - Configured SessionFactory: null
    INFO - processing one-to-many association mappings
    INFO - processing one-to-one association property references
    INFO - processing foreign key constraints
    INFO - Using dialect: net.sf.hibernate.dialect.MySQLDialect
    INFO - Maximim outer join fetch depth: 2
    INFO - Use outer join fetching: true
    INFO - Using Hibernate built-in connection pool (not for production use!)
    INFO - Hibernate connection pool size: 20
    INFO - using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://localhost/unnobanews
    INFO - connection properties: {user=news, password=news}
    INFO - Transaction strategy: net.sf.hibernate.transaction.JDBCTransactionFactory
    INFO - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
    WARN - Could not obtain connection metadata
    java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
    at org.gjt.mm.mysql.MysqlIO.init(Unknown Source)
    at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source)
    at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source)
    at org.gjt.mm.mysql.Driver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:140)
    Somewhere I red that was necessary to update the jdbc driver, so I updated it from version nro 2 to version nro 3.1.7 but still the error
    Phpmyadmin works ok and mysql control center can connect ok too.
    But when I try a telnet localhost:3306 I receive and error of connection filed
    Anyway the mysql status thowme correct information, that it working ok!
    Any idea ?
    King regards
    Naty

    Hibernate 2.1.6
    loaded properties from resource hibernate.properties: {hibernate.connection.username=root, hibernate.connection.password="", hibernate.cglib.use_reflection_optimizer=true, hibernate.connection.pool_size=10, hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect, hibernate.connection.url=jdbc:mysql://manoj/manoj, hibernate.connection.driver_class=org.gjt.mm.mysql.Driver}
    using CGLIB reflection optimizer
    configuring from resource: /hibernate.cfg.xml
    Configuration resource: /hibernate.cfg.xml
    Mapping resource: com/mec/emp.hbm.xml
    Mapping class: com.mec.Employee -> emp
    Configured SessionFactory: null
    processing one-to-many association mappings
    processing one-to-one association property references
    processing foreign key constraints
    Using dialect: net.sf.hibernate.dialect.MySQLDialect
    Maximim outer join fetch depth: 2
    Use outer join fetching: true
    Using Hibernate built-in connection pool (not for production use!)
    Hibernate connection pool size: 10
    using driver: org.gjt.mm.mysql.Driver at URL: jdbc:mysql://manoj/manoj
    connection properties: {user=root, password=""}
    No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
    Could not obtain connection metadata
    java.sql.SQLException: Server configuration denies access to data source
         at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:144)
         at org.gjt.mm.mysql.Connection.<init>(Connection.java:230)
         at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
         at java.sql.DriverManager.getConnection(DriverManager.java:525)
         at java.sql.DriverManager.getConnection(DriverManager.java:140)
         at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
         at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)
         at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1155)
         at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:789)
         at com.mec.CreateSession.getCurrentSession(CreateSession.java:35)
         at com.mec.TestEmployee.createEmployee(TestEmployee.java:37)
         at com.mec.TestEmployee.main(TestEmployee.java:24)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
    Use scrollable result sets: false
    Use JDBC3 getGeneratedKeys(): false
    Optimize cache for minimal puts: false
    Query language substitutions: {}
    cache provider: net.sf.hibernate.cache.EhCacheProvider
    instantiating and configuring caches
    building session factory
    Not binding factory to JNDI, no JNDI name configured
    SQL Error: 0, SQLState: 08001
    Server configuration denies access to data source
    Cannot open connection
    java.sql.SQLException: Server configuration denies access to data source
         at org.gjt.mm.mysql.MysqlIO.init(MysqlIO.java:144)
         at org.gjt.mm.mysql.Connection.<init>(Connection.java:230)
         at org.gjt.mm.mysql.Driver.connect(Driver.java:126)
         at java.sql.DriverManager.getConnection(DriverManager.java:525)
         at java.sql.DriverManager.getConnection(DriverManager.java:140)
         at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:101)
         at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:286)
         at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3326)
         at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3286)
         at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40)
         at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19)
         at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2231)
         at com.mec.TestEmployee.createEmployee(TestEmployee.java:38)
         at com.mec.TestEmployee.main(TestEmployee.java:24)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
    Process finished with exit code 0

  • JDBC MySQL INET_NTOA() Function & IP Conversion

    Firstly,
    Using the MySQL connector, any idea's why the select statement does not work ?
    The MySQL Database Table:
    mysql> select INET_NTOA(IPV4) from pptip;
    +-----------------+
    | INET_NTOA(IPV4) |
    +-----------------+
    | 255.255.255.255 |
    +-----------------+
    1 row in set (0.00 sec)
    SELECT * FROM PPTIP;
    +------------+
    | ipv4       |
    +------------+
    | 4294967295 |
    +------------+
    1 row in set (0.00 sec)Works perfectly in MySQL command line but I receive the following java runtime error:
    SQLException: Column 'IPV4' not found.
    SQLState: S0022
    try {
                Connection connection = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/ppt","root", "password");
                System.out.println("Creating score card database");
                String sql = "SELECT INET_NTOA(ipv4)  FROM pptip";
                Statement stat = connection.createStatement();
                ResultSet rs = stat.executeQuery(sql);
                while (rs.next()) {
                    System.out.println( rs.getString("IPV4"));
                // Close everyting
                rs.close();
                stat.close();
                connection.close();
            } catch (SQLException ex) {
                // handle any errors
                System.out.println("SQLException: " + ex.getMessage());
                System.out.println("SQLState: " + ex.getSQLState());
                System.out.println("VendorError: " + ex.getErrorCode());
            }Thanks for your help..
    Rob

    Thanks for your response, but MySQL statements are not case sensitive.
    The actual error comes from the SQL Comment:
    String sql = "SELECT INET_NTOA(ipv4) FROM pptip";
    Both
    String sql = "SELECT ipv4 FROM pptip";
    and
    String sql = "SELECT IPV4 FROM pptip";
    works fine.. the INET_NTOA function does not.
    I suspect the driver does not support this... not 100%.
    Rob

  • T-SQL - PL/SQL conversion: insert into ... select problem

    Hi!
    If I have an insert into ... select statement in T-SQL without a 'from' clause:
    bq. insert into sometable (foo, bar) \\ select 5, case when @bar=5 then 4 else 3 end
    its translation is:
    bq. INSERT INTO sometable \\ ( foo, bar ) \\ VALUES ( 5, CASE \\ WHEN 5 = 5 THEN 4 \\ ELSE 3 \\ END col );
    and I got: ORA-00917: "missing comma" for that. I'm not sure if it's a bug in the migration code, or is there a trick so that I can use 'CASE' in an insert into .. values statement somehow?
    Zoli

    You have to remove the column name. I just simplified your test case to check and it's working:
    CREATE TABLE test(
      id NUMBER
    INSERT
      INTO test(id)
      VALUES(CASE WHEN 5=5 THEN 4 ELSE 3 END)
    SELECT *
      FROM test
    ;C.

  • OBIEE:  logical SQL to Physical sql conversion

    Hi,
    Is there any way i can get the physical sql from logical sql ( Apart from reading log file).. I am looking something like JAVA api which does that for us.. Do we have any mapping table which stores this mapping.
    Does the OBIEE provides any Java API.
    Appreciate your help in advance.

    Hi Experts,
    Please help on this.

  • SQL conversion of MEMO field

    I have a web site that builds pages based on content in an
    Access DB. One of the fields is MEMO and contains body copy for the
    page (usually 300-400 words per record). This bodyCopy field is
    HTML tagged IN the record (in case that matters). So I import the
    whole database into SQL. Fine. The pages display ok - All the data
    in the bodyCopy field is STILL in there, I can see it on the
    webpages. BUT, I cannot see, or edit the cells in SQL Enterprise
    manager. If I add a new record similar bodyCopy pastes are
    truncated. SQL converted the MEMO field to ntext(16). I have tried
    text(16) and nvarchar(8000) with the same results. I need to be
    able to edit the existing cells, and input similarly sized data
    chunks in with new records...
    Can anyone shed some light on this issue?

    SQL is a bit different in managing the data directly than
    Access was.
    ntext should be fine for any previous memo fields.
    If it tells you that you cannot edit the cells, it is usually
    because the Key has not been defined. Importing from Access will
    bring in all your data, but it won't necessarilly apply the Key
    identifier. Without a key it won't let the data be edited, at least
    not directly.
    If it is showing up in the web page OK then the data would
    not appear to be truncated, just not all viewable in the SQl
    listing. If you try to enter too much data into a field in SQL it
    usually will simply refuse to do it.
    Have ou tried connecting to the SQL server via Access (ADP)?
    If you have been used to Access all this time, it can be a really
    nice way of working between the two and gives you a familiar way of
    doing things.

  • XML to SQL conversion using OracleXML putXML

    Hi,
    How many rowTag values can I use when I use OracleXML putXML ? I have an XML file in the following format.
    I have to use "ABC" as rowTag. What Can I do with "GRANT_ROW" ? I have a table with
    R_DATE and
    GRANT columns
    where GRANT is an object type with elements
    NAME and ATYPE.
    Thanks.
    <?xml version = '1.0'?>
    <EXCH>
    <ABC num="1">
    <R_DATE>5/21/2003 0:0:0</R_DATE>
    <GRANT>
    <GRANT_ROW num="1">
    <NAME>GUNACAR</NAME>
    <ATYPE>TE</ATYPE>
    </GRANT_ROW>
    <GRANT_ROW num="2">
    <NAME>GUNACAR</NAME>
    <TYPE>TE</TYPE>
    </GRANT_ROW>
    </GRANT>
    </ABC>
    </EXCH>
    I get the following error when I run
    java OracleXML putXML ....
    oracle.xml.sql.OracleXMLSQLException: 'The XML element tag 'GRANT_ROW'
    does not match the name of any of the columns/attributes of the
    target database object.' encountered during processing ROW element 0.
    Thanks....

    RTF FormattingKit
    http://www.schema.de/sitehtml/site-e/xmlnach0.htm

Maybe you are looking for

  • Copying a report from one environment to another

    Hi, I need to copy a report from QA to PROD. I saved the report in local drive from Desktop, connected to PROD and then tried to open the it in PROD. But I am getting an error message from "Visual C++" saying "Abnormal Program Termination". I am usin

  • HP Officejet Pro 8500 A909G - Catridges won't align/new cartridges show low ink level

    My 8500 tries to align after new cartridges installed, followed by "alignment failure" message. Initially started when I tried to print simple black type document and it came out blank. I have reset, unplugged, re-installed the cartridges, and still

  • F110-  issues in the parameter selection

    Hi, We use F110 to create customer refunds. while creating refund documents we use Allocation fields to group and identify line items meant for refunds. problem what we have is in Additional selection criteria, gave field name as BSEG-ZUONR and enter

  • Configure keys In Oracle Fusion,

    Hi, In oracle forms 10g we are configure our keys using the following : fmrweb.res and copy this one into the Forms folder. But this one is not working in 11g. Regards,

  • Import .VHD Files from Virtual Iron or Xen Server

    Hi, I have some .vhd Files from the XEN Based Virtual Iron Server here. I copied them to the OVM Server and try to start but the only thing i got was a "Booting from Harddisk" at the console. Do i have to convert them. Do you know how? Thank you. Reg