Convert MS SQL 2000 to Oracle 9i

Hi,
I am a newbie in Oracle, I need to convert my current MS SQL 2000 db to Oracle 9i. My current db has about 200 tables with no stored procedures. So I need to convert the db design and data.
I read from this forum, some suggested to use Oracle Migration Workbench, some suggested Enterprise Manager Console with the Load Wizard.
How can I do the migration and where can I download the migration tools if any?
Regards,
Jenty

DTS is also buggy which is why SQL Server 2005 has a complete rewrite of the feature.
Nevertheless for straight data dumps Jim is correct in that DTS should work.
For getting the DDL you might consider using Query Analyzer to just dump all the DDL into a file and then using C or a script language to extract and convert the SQL into Oracle DDL. If you are a good script (maybe Perl) coder this would be just as quick as setting up and using the conversion tool.
Once you have the tables defined to Oracle you can use a little pl/sql to generate the sqlldr control cards to pull in the DTS extracted data.
Or you can use the ability of SQL Server to access Oracle by define a remote db and insert all the data accross. You will need to install an Oracle client on the SQL Server box to do this.
You have plently of options. Look them all over and go with the one that best matches your available skill set.
HTH -- Mark D Powell --

Similar Messages

  • SQL 2000 to Oracle 8i migration...Urgent

    Can anyone help me in converting SQL 2000 database to Oracle 8i version(8.1.7).
    I have installed OMWB 9.2 on a windows 2000 machine, but it failed to convert even after many tries. It creates the SQL model perfectly with errors but while converting to Oracle model , it creates no. of errors and also it doesnt convert the oracle model to oracle database perfectly. After migration i do not see migration taken place on the oracle sie.
    If someone is ready to help me, let me send you the SQL 2000 database which you please convert it to oracle and send it to me as scripts. Then i will do the manual conversion wherever required and use it.
    Many thanks in advance,
    Please help me at the earliest...
    Thiru

    Sorry please. discard the above message...
    Turloch,
    I have tried that too but cannot see any table & stored procedure creation scripts. Dont know what i am doing wrong but started migrating it manually. If any one can help in generating the scripts for me, it will be of great help. Anyway, i'm going to disturb this forumn a lot in migrating my database to oracle!!!
    Cheers
    Thiru

  • MS SQL 2000 to Oracle 9R2

    Hi all!
    I'm try to connect from Oracle to MS SQL 2000 (all in WIN NT4)
    but get
    ORA-28508: invalid value OSTRA-KIEV.OFFICE for Heterogeneous Services initialization parameter HS_DB_DOMAIN
    My config files:
    listener.ora:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Yazenok)(PORT = 1521))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (ORACLE_HOME = D:\Oracle)
    (SID_NAME = zmey)
    (SID_DESC =
    (PROGRAM = tg4msql)
    (SID_NAME = tg4msql)
    (ORACLE_HOME = d:\oracle)
    tnsnames.ora:
    ZMEY.OSTRA-KIEV.OFFICE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Yazenok)(PORT = 1521))
    (CONNECT_DATA =
    (SID = zmey)
    (GLOBAL_NAME = ZMEY)
    TG4MSQL.OSTRA-KIEV.OFFICE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = Yazenok)(PORT = 1521))
    (CONNECT_DATA =
    (SID = tg4msql)
    (GLOBAL_NAME = tg4msql)
    (HS = OK)
    INSUR.OSTRA-KIEV.OFFICE =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = solaris)(PORT = 1521))
    (CONNECT_DATA =
    (SID = INSUR)
    (SERVER = SHARED)
    (GLOBAL_NAME = insur)
    inittg4msql.ora:
    HS_FDS_CONNECT_INFO="SERVER=ZMEY;DATABASE=insurance"
    HS_FDS_TRACE_LEVEL = DEBUG
    HS_FDS_RECOVERY_ACCOUNT=insur
    HS_FDS_RECOVERY_PWD=insur
    HS_DB_NAME=TG4MSQL
    HS_DB_DOMAIN="OSTRA-KIEV.OFFICE"
    Could anybody tell me what I'm doing wrong on this?
    Thanks.

    DTS is also buggy which is why SQL Server 2005 has a complete rewrite of the feature.
    Nevertheless for straight data dumps Jim is correct in that DTS should work.
    For getting the DDL you might consider using Query Analyzer to just dump all the DDL into a file and then using C or a script language to extract and convert the SQL into Oracle DDL. If you are a good script (maybe Perl) coder this would be just as quick as setting up and using the conversion tool.
    Once you have the tables defined to Oracle you can use a little pl/sql to generate the sqlldr control cards to pull in the DTS extracted data.
    Or you can use the ability of SQL Server to access Oracle by define a remote db and insert all the data accross. You will need to install an Oracle client on the SQL Server box to do this.
    You have plently of options. Look them all over and go with the one that best matches your available skill set.
    HTH -- Mark D Powell --

  • Convert java.sql.Date to oracle.jbo.domain.Date in oaf

    Hi,
    Need to dafault NeedBydate(i get in from query as below) to a messagelovinput and make it read only.
    i am facing some issue in converting from java.sql.Date to oracle.jbo.domain.Date.
    unable to figure out the problem.
    below is the sample code im trying to use.
    PreparedStatement ps=pageContext.createPreparedStatement("select sysdate from dual");
    ResultSet rs=ps.executeQuery();
    if (rs!=null && ps.next()
    java.sql.Date sqlDate= rs.getDate(1);
    oracle.jbo.domain.Date oracleDate = new oracle.jbo.domain.Date(sqlDate.getTime());
    vorow.setAttribute("Datevalue",oracleDate);
    this is my assumption : to set to UI i need date in format dd-Mon-yyyy.(am i correct? as to get that format i tried to use simple date format class but no use)
    when i tried to use simple date format :unpaseable date exception was raised.
    please guide.

    Hi,
    Why are you using this code???
    PreparedStatement ps=pageContext.createPreparedStatement("select sysdate from dual");
    ResultSet rs=ps.executeQuery();
    if (rs!=null && ps.next()
    java.sql.Date sqlDate= rs.getDate(1);
    oracle.jbo.domain.Date oracleDate = new oracle.jbo.domain.Date(sqlDate.getTime());
    you can get sysdate using this and then set it
    oracle.jbo.domain.Date currentDate = am.getOADBTransaction().getCurrentUserDate();
    java.text.SimpleDateFormat displayDateFormat = new java.text.SimpleDateFormat ("yyyy-MM-dd");
    String DateForm = displayDateFormat.format(currentDate.dateValue());
    oracle.jbo.domain.Date dateset = new oracle.jbo.domain.Date(DateForm);
    and then set the attribute
    vorow.setAttribute("Datevalue",dateset);
    Thanks,
    Gaurav

  • Converting T-SQL proc into Oracle

    I need help in converting the following stored procedure into PL/SQL code. Basically I need to know corresponding function names for the various T-SQL constructs below. The parameter @PROC_NUM is passed by the caller with value @@PROCID which is the T-SQL global variable for the ID of the current stored procedure being executed by SQL Server. Thanks in advance for all the help.
    CREATE PROCEDURE [dbo].MARS_MPPM_HANDLE_ERROR
         @PROC_NUM          INT
    AS
    BEGIN
         -- SET NOCOUNT ON added to prevent extra result sets from
         -- interfering with SELECT statements.
         SET NOCOUNT ON;
         DECLARE @ERROR_NUMBER          INT
         DECLARE @ERROR_SEVERITY          INT
         DECLARE @ERROR_STATE          INT
         DECLARE @ERROR_PROCEDURE     Varchar(1000)
         DECLARE @ERROR_LINE               INT
         DECLARE @ERROR_MESSAGE          Varchar(8000)
         DECLARE @PROC_NAME               Varchar(255)
         SELECT
              @ERROR_NUMBER = ERROR_NUMBER(),
              @ERROR_SEVERITY = ERROR_SEVERITY(),
              @ERROR_STATE = ERROR_STATE(),
              @ERROR_PROCEDURE = ERROR_PROCEDURE(),
              @ERROR_LINE = ERROR_LINE(),
              @ERROR_MESSAGE = ERROR_MESSAGE(),
              @PROC_NAME = OBJECT_NAME( @PROC_NUM )
              IF 50000 = @ERROR_NUMBER
              BEGIN
                   RAISERROR( '%s -> %s', 16, 1, @PROC_NAME, @ERROR_MESSAGE )
              END
              ELSE
              BEGIN
                   RAISERROR( '%s -> Error Number = %d, Error Severity = %d, Error State = %d, Error Procedure = %s, Error Line = %d, Error Message = %s',
                        16,
                        1,
                        @PROC_NAME,
                        @ERROR_NUMBER,
                        @ERROR_SEVERITY,
                        @ERROR_STATE,
                        @ERROR_PROCEDURE,
                        @ERROR_LINE,
                        @ERROR_MESSAGE )
              END
    END

    875311 wrote:
    I need help in converting the following stored procedure into PL/SQL code.
    Re: How can i rewrite this code into java?
    This is true of any language, to adapt to this case
    1) Learn T-SQL
    2) Understand what that code does, that is, what its job is.
    3) Learn PL/SQL.
    4) Write PL/SQL code that fulfills the requirements fleshed out in step 2.
    The absolutely wrong way to do it is to try a mindless, mechanical translation.
    Re: How can i rewrite this code into java?
    >
    Seriously, you need to go through a Java tutorial from the beginning. Just trying to force another language's syntax onto Java without actually understanding anything about Java, and then posting questions here when you get stuck--questions that you could have and should have answered by doing the tutoria--is a horrible approach.
    >
    Replace Java with PL/SQL for same answer.
    Getting started with PL/SQL
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10766/toc.htm
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/toc.htm
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e17126/toc.htm

  • How to handle EXTENDED Views  SQL 2000 to Oracle Migration

    Hi All,
    I am in the process of migrating SQL server 2000 database to Orcle databse. I would like to know how to handle the views created in SQL server with Extended clause.
    See below for example for SQL 2000 view.
    create view "Order Details Extended" AS
    SELECT "Order Details".OrderID, "Order Details".ProductID, Products.ProductName,
         "Order Details".UnitPrice, "Order Details".Quantity, "Order Details".Discount,
         (CONVERT(money,("Order Details".UnitPrice*Quantity*(1-Discount)/100))*100) AS ExtendedPrice
    FROM Products INNER JOIN "Order Details" ON Products.ProductID = "Order Details".ProductID
    Thanks in advance for your reply.
    Ramesh

    Ramesh
    The Workbench has a problem with spaces in identifiers which will be fixed in a later release.
    Apart from that large drawback the view should work ok. [The parser handles convert and aliases]
    Turloch

  • SQL 2000 to Oracle 8i Migration

    Does anyone have any idea about migrating MS SQL 2000 stored procedures to Oracle8i? What kind of conversion does it do? What are the restrictions? Can anyone throw some light as to where I can get the documentation etc?
    Alternatively, MS SQL 7.0 to Oracle8i stored procedures conversion documentation will also be helpful?
    Are there any issues with this conversion product?
    Thanks
    Rajib Ghosh
    Oracle DBA

    hi Kevin,
    For the benefit of some other people I would just like to complete the thread. We have exchanged some e-mails already. The following approach may help some other people.
    We hope to start work on a SQL Server 2000 plugin towards the end of the claendar year and it should only take us 2 months to complete at most. At present we are scoping this effort out.
    We may actually start development earlier.
    One alternative that may work for some people is to downgrade their SS2000 schema to SS7.0, migrate that using the workbench. Then generate the BCP and SQL Loader scripts to migrate the data from the SS2000 database.
    However, if you have taken advantage of SS2000 specific functions then the Workbench may not be able to handle these specific features.
    John Masterson

  • Migration from SQL 2000 to Oracle 10g

    Hi every one,
    This is the first i am posting to this forum.
    I have a problem in migration of Sql Server database to Oracle 10g.
    We use Microsoft Navision Axapta 3.0 SP4 as front end.
    and Sql Server 2000.
    All table and indexes are created in sql server by Navison only.
    My Database size is 300 GB and now we face thousands of Problem with SQL server so we decided to make a intelligent move to oracle 10g.
    As we have 1200+ users.
    The problem i am facing when i tranfer all the table to my Oracle Database it gives a error out of buffer.
    some time it gives me error about the index as few of our developer have create two indexex on one field.
    So oracle identifies that there are two indexes on one field.
    So pls help how can i solve this problem.
    I have 1234 tables.
    from
    Mohd Sufian

    Can you post the exact Oracle error you are getting? The ORA-xxxxx part is the most important for us to identify what particular problem(s) you're having.
    Is your front-end certified to use an Oracle database? Particularly if the front end is creating database objects, it needs to know how to work with whatever database it is connecting to.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Convert from SQL server to Oracle?

    How do I do this query in Oracle?
    In SQL Server, it looks like this.
    select
    SELECT top 1 t1.mpm
    FROM TblMtk T1
    where t1.wc = '34819'
    and t1.ValidFrom <= '2012-09-12'
    order by t1.ValidFrom desc
    ) R1
    SELECT top 1 t2.mpm
    FROM TblMtk T2
    where t2.wc = '34819'
    order by t2.ValidFrom desc) R2

    A follow-up question ...
    If the table tblmtk for example, there are three rows like this:
    WC        MPM        Valid_from
    34819     1          2010-06-01
    34819     2.5        2011-01-01
    34819     1.5        2012-01-01If the value is outside of the validity period (valid_from) shall it take the last valid_from value. How?
    select max(MPM) keep(dense_rank first order by case when valid_from  <= '2007-05-10' then valid_from else null end desc nulls last) r1
      from tblmtk
    where wc = '34819'I want the result to look like this:
    R1= 1.5
    But now I get R = 2.5

  • M$ SQL 2000 to Oracle 8i

    Does anyone know if there is a beta of the M$ SQL server 2000 Plugin for Migration Workbench 1.3.1.0.0 just have a lot of structure to migrate very little data or a work around to the m$ SQL Server 7.0 plugin to quit whining about only works with 7 any sugestions would be greatly aprieated
    Thanks

    I don't know offhand what FREETEXT or CONTAINS do functionally but it looks as though you have to write emulation functions for these SQLServer specific calls. The emulation functions can mimic the functionality of their SQLServer counterparts i.e.
    CREATE OR REPLACE FUNCTION FREETEXT(addy1 IN VARCHAR, addy2 IN VARCHAR)
    RETURN VARCHAR
    AS
    BEGIN
    /* You write PL/SQL code that mimics the SQLServer functionality */
    END

  • Need help converting MS SQL query into Oracle, Function 'WHERE' issues

    SELECT PERS_NBR, PAY_ID, PAY_CODE, LOGICAL_DATE, LOGICAL_DATE AS END_DATE, PCNAMES + REPLICATE(',', 39 - (LEN(PCNAMES) - LEN(REPLACE(PCNAMES, ',', ''))))
    AS PC_NAMES_FINAL
    FROM (SELECT DISTINCT A.PAY_ID, A.PAY_CODE, A.PERS_NBR, A.LOGICAL_DATE, PCNAMES = substring
    ((SELECT TOP 10 ',' + PC_NAME + ',' + SUBSTRING(CAST(B.VALUE AS VARCHAR), 0, LEN(CAST(B.VALUE AS VARCHAR)) - 2)
    FROM T_PAY_CAT_RECORD B
    WHERE B.PERS_NBR = A.PERS_NBR AND
    B.LOGICAL_DATE = A.LOGICAL_DATE FOR XML path(''), elements), 2, 500)
    FROM T_PAY_CAT_RECORD A, T_PERSON P
    WHERE A.PERS_NBR = P.NBR) FINAL
    Edited by: 919969 on Mar 9, 2012 3:45 PM

    Hello
    Like any language you need to understand what the messages coming from the syntax check are saying...
    XXXX> SELECT PERS_NBR,
      2          PAY_ID,
      3          PAY_CODE,
      4          LOGICAL_DATE,
      5          LOGICAL_DATE AS END_DATE,
      6          PCNAMES || LPAD(',', 39 - (LENGTH(PCNAMES) - NVL(LENGTH(REPLACE(PCNAMES,',')),0)),',') AS PC_NAMES_FINAL
      7    FROM  (
      8           SELECT  PAY_ID,
      9                   PAY_CODE,
    10                   PERS_NBR,
    11                   LOGICAL_DATE,
    12                   SUBSTR(
    13                          RTRIM(XMLAGG(XMLELEMENT(e,PC_NAME || ',' || SUBSTR(VALUE,1,LEN(VALUE) - 2),',').EXTRACT('//text()')),',') PCNAMES
    14                          2,
    15                          500
    16                         )
    17             FROM  (
    18                    SELECT  A.PAY_ID,
    19                            A.PAY_CODE,
    20                            A.PERS_NBR,
    21                            A.LOGICAL_DATE,
    22                            A.PC_NAME,
    23                            ROW_NUMBER() OVER(PARTITION BY A.PERS_NBR,A.LOGICAL_DATE ORDER BY 1) RN
    24                      FROM  T_PAY_CAT_RECORD A,
    25                            T_PERSON P
    26                      WHERE A.PERS_NBR = P.NBR
    27                   )
    28             WHERE RN <= 10
    29             GROUP BY PAY_ID,
    30                      PAY_CODE,
    31                      PERS_NBR,
    32                      LOGICAL_DATE
    33          ) FINAL
    34  /
                            RTRIM(XMLAGG(XMLELEMENT(e,PC_NAME || ',' || SUBSTR(VALUE,1,LEN(VALUE) - 2),',').EXTRACT('//text()')),',') PCNAMES
    ERROR at line 13:
    ORA-00907: missing right parenthesisIf you use something like SQL*Plus or SQL Developer, they will give you the error stack which will point you to the source of the problem.
    It's saying missing right parenthesis. Start by finding out if we've got all out matching brackets. Counting from the start of that statement i.e. SUBSTR on line 12, we have 7 open brackets and 6 close brackets. So there does appear to be a problem with brackets. However if we take a step back and look at lines 12 to 16, this is actually a single statement. It's a call to the SUBSTR function and within it it has calls to RTRIM, XMLAGG etc. For the statement as a whole there are the same number of left and right parenthesis so the problem is related to something else. Something that is leading the syntax check to think it has reached the end of a statement and hasn't found enough closing parethesis.
    The issue here appears to be that we have the token PCNAMES at the end of line 13 but syntactically that's not correct. We can't have that token there because it's appearing in the middle of a function call. PCTNAMES is actually a column alias but it's just in the wrong place. We need it to be an alias for the whole expression from line 12 to 16. So make the change and see what happens...
    XXXX> select PERS_NBR,
      2          PAY_ID,
      3          PAY_CODE,
      4          LOGICAL_DATE,
      5          LOGICAL_DATE AS END_DATE,
      6          PCNAMES || LPAD(',', 39 - (LENGTH(PCNAMES) - NVL(LENGTH(REPLACE(PCNAMES,',')),0)),',') AS PC_NAMES_FINAL
      7    FROM  (
      8           SELECT  PAY_ID,
      9                   PAY_CODE,
    10                   PERS_NBR,
    11                   LOGICAL_DATE,
    12                   SUBSTR(
    13                          RTRIM(XMLAGG(XMLELEMENT(e,PC_NAME || ',' || SUBSTR(VALUE,1,LEN(VALUE) - 2),',').EXTRACT('//text()')),',')
    14                          2,
    15                          500
    16                         ) PCNAMES
    17             FROM  (
    18                    SELECT  A.PAY_ID,
    19                            A.PAY_CODE,
    20                            A.PERS_NBR,
    21                            A.LOGICAL_DATE,
    22                            A.PC_NAME,
    23                            ROW_NUMBER() OVER(PARTITION BY A.PERS_NBR,A.LOGICAL_DATE ORDER BY 1) RN
    24                      FROM  T_PAY_CAT_RECORD A,
    25                            T_PERSON P
    26                      WHERE A.PERS_NBR = P.NBR
    27                   )
    28             WHERE RN <= 10
    29             GROUP BY PAY_ID,
    30                      PAY_CODE,
    31                      PERS_NBR,
    32                      LOGICAL_DATE
    33          ) FINAL
    34  /
                            2,
    ERROR at line 14:
    ORA-00907: missing right parenthesisNOw we've got a new error. Again it's saying we've got a missing parenthesis but this time on line 14. The issue here is that line 13 is a parameter to the SUBSTR function but there is no comma on the end. What we actually have at the moment is a line that looks like so
    RTRIM(XMLAGG(XMLELEMENT(e,PC_NAME || ',' || SUBSTR(VALUE,1,LEN(VALUE) - 2),',').EXTRACT('//text()')),',') 2,Which is just not formed correctly. We need a comma at the end of line 13 to state that this is the end of that line as a parameter.
    XXXX> select PERS_NBR,
      2          PAY_ID,
      3          PAY_CODE,
      4          LOGICAL_DATE,
      5          LOGICAL_DATE AS END_DATE,
      6          PCNAMES || LPAD(',', 39 - (LENGTH(PCNAMES) - NVL(LENGTH(REPLACE(PCNAMES,',')),0)),',') AS PC_NAMES_FINAL
      7    FROM  (
      8           SELECT  PAY_ID,
      9                   PAY_CODE,
    10                   PERS_NBR,
    11                   LOGICAL_DATE,
    12                   SUBSTR(
    13                          RTRIM(XMLAGG(XMLELEMENT(e,PC_NAME || ',' || SUBSTR(VALUE,1,LEN(VALUE) - 2),',').EXTRACT('//text()')),','),
    14                          2,
    15                          500
    16                         ) PCNAMES
    17             FROM  (
    18                    SELECT  A.PAY_ID,
    19                            A.PAY_CODE,
    20                            A.PERS_NBR,
    21                            A.LOGICAL_DATE,
    22                            A.PC_NAME,
    23                            ROW_NUMBER() OVER(PARTITION BY A.PERS_NBR,A.LOGICAL_DATE ORDER BY 1) RN
    24                      FROM  T_PAY_CAT_RECORD A,
    25                            T_PERSON P
    26                      WHERE A.PERS_NBR = P.NBR
    27                   )
    28             WHERE RN <= 10
    29             GROUP BY PAY_ID,
    30                      PAY_CODE,
    31                      PERS_NBR,
    32                      LOGICAL_DATE
    33          ) FINAL
    34  /
                              T_PERSON P
    ERROR at line 25:
    ORA-00942: table or view does not existNow we have a new error but this time it's because I don't have the t_person table on my database. Syntactically the statement above is now correct so it should work on your system.
    HTH
    David
    Edited by: Bravid on Mar 12, 2012 10:20 AM

  • Hi all Plz convert this SQL code to ORACLE

    -- Insert Not Available Record
    set identity_insert Dim_Region on
    if not exists ( select 'x' from Dim_Region where Region_Id = 99999 and Region = '#NA#' )
    Begin
    insert into Dim_Region (Region_Id , Region , Region_Description , Process_Date ) values
    (99999 , '#NA#' , 'Not Available' , getdate())
    End
    set identity_insert Dim_Region off

    Hi,
    I am not sure what is getdate() I have assumed it to be a function which returns date.
    Hopefully this is what you want a Procedure called "identity_insert Dim_Region"
    create procedure identity_insert Dim_Region is
         cursor c_exists is
              select 'x' from Dim_Region where Region_Id = 99999 and Region = '#NA#';
        v_var char (1);
        v_date date;
    begin
         open c_exists;
         fetch c_exists into v_var;
         if c_exists%notfound then
             v_date := getdate ();
             insert into Dim_Region
                (Region_Id , Region , Region_Description , Process_Date )
             values
                (99999 , '#NA#' , 'Not Available' , v_date);
        end if;   
        close c_exists;
    end;Best Regards
    Arif Khadas

  • Utility class to convert ms sql to oracle queries

    HI all
    if any body can write a java utility for converting MS SQl queries to oracle really appreciate

    HI all
    if any body can write a java utility for converting MS SQl queries to oracle really appreciate

  • Converting MS SQL Server Query to Oracle Query

    Hi There,
    I've a strange problem. My project uses both MS SQL Server and Oracle server at run time. I've lot of queries which are written in MS SQL Style. Now, iam planning to write a helper class whic converts MS SQL Query to Oracle Query. Please Help me if any one has that kind of Helper with you.
    Thanks And Regards,
    Sasi Kanth

    That is why persistence applications like Hibernate or
    CMP get used for apps that will use more than one DB,
    but it takes upfront planning.
    If you have a set of automated unit tests that work
    with SQL Server, they will be a big help in getting
    your Oracle code up and running.Indeed - JUnit and Ant would be a big help here.
    It sounds like you have SQL in your JSPs, that will
    work against you as well if so. If you are using a
    DAO pattern, this will be much easier, as you can
    re-implement each DAO for Oracle.If you'd layered this app properly, you might just implement an OracleDAOFactory and be done with it. Interfaces and a DAO layer would go a long way.
    This is why layering is such a good idea. It isolates changes in a smaller subset of classes.
    But your problem sounds pretty big. It'd be daunting even if it were well designed.

  • Please Help!!!!! Problem Migrating from sql 2000 stored procedure to PL/SQL

    I have used a tool to convert my sql 2000 stored procedure to Oracle 10g PL/SQL, here is an example
    SQL 2000 Stored Procedure
    CREATE PROCEDURE [GetEmployees]
    AS
    Select * from EMPMST ORDER BY emp_name
    GO
    After Transformation i got 2 files, one was a procedure and other a package
    CREATE OR REPLACE PACKAGE GLOBALPKG
    AS
         TYPE RCT1 IS REF CURSOR;
         TRANCOUNT INTEGER := 0;
         IDENTITY INTEGER;
    END;
    CREATE OR REPLACE PROCEDURE GetEmployees
         RCT1 IN OUT      GLOBALPKG.RCT1
    AS
    BEGIN
         OPEN RCT1 FOR
         SELECT *
         FROM EMPMST
         ORDER BY emp_name;
    END;
    When i execute the procedure GetEmployees i got this error :
    SQL> execute GetEmployees;
    BEGIN GetEmployees; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'GETEMPLOYEES'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Please Help me in debugging this error. Thanks in advance.

    As the poster above mentioned you cannot call "GetEmployees" without a parameter.
    Note that the procedure declaration has the following line
    RCT1 IN OUT GLOBALPKG.RCT1
    This means that whenever you want to call the procedure you must pass it a variable of type GLOBALPKG.RCT1
    However unless this is merely a homework or learning exercise (i.e. you are not porting the code of a production application) i would strongly recommend that you do not attempt to simply convert the code to PL/SQL.
    The reasoning behind this is that Oracle's architecture will be completely different to the source of the original code and if you attempt to simply port the code (especially using an automatic tool) you will almost certainly hit problems.
    For example the SQL Server's 2000 code may (should be) be written based on SQL Server's locking strategy. Oracle's locking strategy is completly different if you try to use the same techniques as you do in SQL Server the performance will suffer.
    Porting a code or a database schema from one platform to another involves a lot of analysis in order to take advantage of the features of the destination platform.
    As I said this may not be important to you depending on why you are attempting a port.
    Good Luck.

Maybe you are looking for