Convert PLSQL to T-SQL

Hi!
Does anyone know a good conversion tool to convert PLSQL to T-SQL?
I am working with Oracle 11gR1 and MS SQL Server 2005. I would like to convert the existing
procedures, functions, packages etc. to T-SQL.
Thanks in advance for your help!

I have been tasked with taking over a new website which had a database written in
MySql (I think anyway).  ....  My question is how do I import this into a Sql Server database? 
Hello John,
If you can get access to the MySQL database, then you can use the free Microsoft tool SQL Server Migration Assistant for MySQL (MySQLToSQL) to migrate the database to MS
SQL Server.
Olaf Helper
[ Blog] [ Xing] [ MVP]

Similar Messages

  • Converting plsql to sql server

    Hi guys,
    Originally I use Taod to execute plsql scripts, however I now have to use a software callded 'Query analyzer' which only recognises sql server scripts.
    I am having difficulty in converting my plsql scripts into sql server, deos any one no of any resource on the internet which may be helpful to me? or of any program which I can download to automate this terrible task?
    Thanks

    Are you working on an Oracle database or a SQL server database? If you are working on SQL Server database, I heard there are tools you can use within the sql server, to write procedures, compile and execute. If you are using Oracle, then you should be able to use TOAD, as it is one among the best tool available. Of course there are a whole bunch of tools you can use for creating/executing pl/sql scripts.
    Hope this helps. If it didn't then please post with more details on what exactly are you trying to do.

  • Anyone know a tool to convert PLSQL comments into HTML/other formats?

    Hi - does anyone know if there's a tool out there to convert PLSQL comments into HTML or other formats like you can do in Java? Thanks in advance - Jon

    This is only useful if you're using PL/SQL Developer. It has a free plugin called plsqldoc which will generate html pages that are similar to Javadoc pages.
    check here for more information
    http://www.allroundautomations.nl/plsqldevplugins.html
    As an aside , if you haven't already, you may want to devise a way of auto generating your HTML when a change is made or by running a regular batch job. This will ensure that your docs are in sync with the code. Documentation is only valuable if it is kept up to date.
    There is nothing worse than looking at the html docs for a package only to realise the docs are several versions behind the code.

  • Need to convert DTS packages to SQL Server 2012 environment.

    Hi Friends,
    As Part of the Project Requirement,we need to convert DTS packages to SQL Server 2012 environment.
    Please sugest me best approach.
    Thanks

    Best approach is to re-design the packages in SSIS 2012 directy if it is feasible. Because most of the DTS feaures are discontinued and also you will have to clean up all errors that you are going to get after migration.
    Discontinued Integration Services Functionality in SQL Server 2012
    Otherwise you need to migrate it first to 2008R2 and then 2012 version.
    Below ones would be helpful for you:
    Migrate DTS packages to SSIS (SSIS2008R2)
    Support of DTS packages in 2008 R2
    Known DTS Package Migration Issues
    Cheers,
    Vaibhav Chaudhari

  • Plsql procedure with sql query data

    plsql newbie(learning sql): please excuse for asking a basic plsql question
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod on windows server 2003
    PL/SQL Release 10.2.0.1.0 - Production
    "CORE     10.2.0.1.0     Production"
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    CREATE OR REPLACE PROCEDURE p_check
    AS
    v1 NUMBER(20,0);
    BEGIN
    SELECT count(*) INTO v1
    FROM ad_reg;
    dbms_output.put_line(v1);
    end;
    inserts the number of rows in the table ad_reg into v1
    and displays v1 by using dbms_output
    i want my procedure to return table data
    CREATE TABLE "TEST_SH"
    "TEXT_ID" NUMBER,
    "TEXT" CLOB
    Insert into TEST_SH (TEXT_ID) values (1);
    Insert into TEST_SH (TEXT_ID) values (2);
    Insert into TEST_SH (TEXT_ID) values (3);
    Insert into TEST_SH (TEXT_ID) values (4);
    there will be a way with which i can see all the data(select * from test_sh) as the output of the plsql procedure
    1.please tel me what to google
    2.please guide me with a site or tell what is actually used and help me
    3.or post an example here
    thank you much
    Edited by: 946207 on Nov 20, 2012 2:05 PM

    946207 wrote:
    there will be a way with which i can see all the data(select * from test_sh) as the output of the plsql procedurePL/SQL is
    a) nothing at all like T-SQL
    b) two different languages, PL (Programming Logic) and SQL
    SQL is used to access data in the Oracle database. So select * from test_sh is the correct statement to access the data.
    The client can make execute this SQL statement itself. And view the data. However, this requires the client to understand the SQL language, and the database model. Which is typically not that you want. You want to abstract that from the client.
    Why would you want the client to deal with the complexities of the SQL language? Or deal with the complexities of your database model in Oracle?
    So instead of the client doing SQL, PL/SQL can do it on behalf of the client. The client uses PL/SQL as an API - in a similar fashion as the client would use any other API.
    The PL/SQL code determines the SQL statement - and returns a SQL cursor handle to the client. The client then simply uses the SQL cursor that the PL/SQL code created for it (and the client needs to close the SQL cursor when done, so as to not cause server resource leakage).
    E.g. (using PL/SQL as an API to abstract SQL and the data model)
    create or replace procedure TestProc( c out sys_refcursor ) is
    begin
      open c for select * from test_sh order by 1;
    end;The client then calls TestProc and gets a reference cursor handle. E.g. (the client call to Oracle):
    begin
      TestProc( c => :1 );
    end;The client needs to supply a host (client language) bind variable of type cursor, as value for bind variable +:1+.
    This is the correct way to deal with PL/SQL and cursors from a client GUI/language perspective. Any other method, like using PL/SQL to cache SQL data as a collection, is usually very wrong.

  • How to convert Oracle database to Sql server Database

    Hi All,
    I have one database made in the Oracle 8i, i want to convert that database to Sql Server Database,
    Can anyone please give me the step by step process to do this conversion.
    Regards
    Ramesh Jha

    Try using the DTS (data transformation services) services of SQL Server 2000
    DTS is based on an OLE DB architecture that allows you to copy and transform data from a variety of data sources. For example: Oracle directly, using native OLE DB providers.
    Alternatively, you could follow the following broad steps for data migration (assuming you are retaining the same table structures in SQL Server, and that you are talking about SQL Server 2000).
    1. Get the CREATE scripts corresponding to each Oracle table / view / index. These can be reverse engineered from the database using a tool.
    2. Map Oracle datatypes to SQL server datatypes e.g: date maps to datetime/smalldatetime, numeric maps to one of int, bigint, smallint, etc depending on the range of values in the CREATE scripts.
    3. Indexes in SQL Server are of two types: Clustered / non-clustered. There can only be one clustered index on each table.
    4. Converting procedures and triggers will have to be line by line, since SQL Server uses a proprietary T-SQL instead of ORacle's PL/SQL
    I have yet to see a really good tool to do this migration, but it is possible to write a PL/SQL procedure / Pro*C program to automate the script creation for creating tables in the SQL Server database.
    For the actual data import into SQL Server, export the Oracle data table by table into flat files, and then use the import wizard of SQL Server enterprise manager

  • Converting MDX query into SQL Server 2008

    We have MDX query based OLAP CUbes.
    To reduce MDX based dependenies, we have to convert MDX based cube to sql server 2008 based queries.
    For this I need expert advise to convert below query to sql server 2008 based query :
    CREATE MEMBER CURRENTCUBE.Measures.[Ack Lost]
                        AS 'Sum(PeriodsToDate([Time].[Year], [Time].CurrentMember ), [Measures].[Lost])',
                        FORMAT_STRING = "#,#",
                        VISIBLE = 1;

    Hi Sachin,
    According to your description, you need to convert the MDX query to T-SQL query, right?
    Your MDX query is calculated measure that return the total value from the first sibling and ending with the given member. In T-SQL query we can use the query as Yogisha provided to achieve the same requirement. Now you need to a tool to convert all the MDX
    related SSAS cube queries to MS SQL Server 2008 based queries.
    Although MDX has some similarities with T-SQL these languages are in many ways different. Beginning to learn and comprehend SQL Server Analysis Services (SSAS) MDX queries can be difficult after one has spent years writing queries in T-SQL. Currently, there
    is no such a tool to convert a MDX query to T-SQL query since the structure difference between MDX and T-SQL. So you need to convert them manually, please refer to the links below to see the details.
    http://www.mssqltips.com/sqlservertip/2916/comparison-of-queries-written-in-tsql-and-sql-server-mdx/
    https://sqlmate.wordpress.com/2013/11/12/t-sql-vs-mdx-2/
    http://technet.microsoft.com/en-us/library/aa216779(v=sql.80).aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • Converter program for MS SQL Server to Oracle

    My problem with converting MS SQL Server queries in a SQL Pass-thru is becoming critical at my job.
    I am hoping there is an easy converter tool that will let a user take SQL Server statements and feed them into a converter that outputs Oracle SQL.
    Does such a program conversion tool exist?
    I bet not, right?

    Your bet is right as SQL-Server's SQL implementation is not the same as Oracle's SQL implementation. There are numerous differences. Translating one to the other is not a 1:1 keyword swap.
    And when these SQL statements involve locking and concurrency, there are also significant differences in core database functionality between SQL-Server and Oracle.
    What exactly is the problem you are facing? SQL-Passthru is specifically designed as a SQL interface that does not touch and change (and muck up) a SQL being passed to a remote database - so the actual raw SQL text being send is what arrives at the server end. Allowing you to, for example, use Oracle's SQL dialect inside SQL-Server to talk to a remote Oracle database - without SQL-Server throwing errors about Oracle dialect being used. Oracle has a similar passthru option.
    Why is this not working? Or is the issue something else?

  • Converting Oracle query to Sql Server with date manipulation

    The following SSIS statement works great in Oracle, and it parses successfully in the "Sql Task" window. In Oracle it returns
    this result:
    FROM_DT              THRU_DT
    16-Jan-2014      23-Jan-2014
    select
    case
    when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=7 then to_date('24'||to_char(add_months(sysdate,-1),'mmyyyy'),'ddmmyyyy')
    when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=15 then to_date('01'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
    when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=23 then to_date('08'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
    else to_date('16'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
    end as from_dt,
    case
    when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=7 then trunc(last_day(add_months(sysdate,-1)))
    when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=15 then to_date('07'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
    when to_char(to_date(sysdate,'dd-mon-yyyy'),'dd') <=23 then to_date('15'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
    else to_date('23'||to_char(sysdate,'mmyyyy'),'ddmmyyyy')
    end as thru_dt
    from sys.dual
    How can I convert this to Sql Server ?

    >>You mean you get the data from Oracle and tries to insert it into SQL Server?
    - no, sorry, I want to convert the syntax to Sql Server
    >>Are
    you running the query in OLEDB provider connected to the Oracle's database?
    - yes, this works fine now (after fixing this redundancy:
    to_char(to_date(sysdate,'dd-mon-yyyy'),'dd')change toto_char(sysdate,'dd')

  • Product keys to convert evaluation version of SQL Server Std 2014 to their SQL Server Standard 2014 Volume License

    Customer was asked for a product key to convert      evaluation version of SQL Server Std 2014 to their SQL Server Standard      2014
    Volume License.
    He cannot download the ISO as he is on a sterile server      on his client’s site.

    You may also try and look for PID in to DefaultSetup.ini file in the installation media, which can be found by going to the root folder of the SQL Server set media
    on the server or on the DVD, then look for this file in either the x64 or x86 folder.
    Keerthi Deep | Blog SQLServerF1 |
    Facebook

  • Convert util.Date to sql.Date with time being displayed!

    Hi all,
    I want to convert util.Date to sql.Date for passing the same to Database. (i donot want to use Timstamp, for some reasons)
    java.sql.Date sqldate =
    new java.sql.Date(new java.util.Date().getTime());
    This simple code truncates the Time component and the result will be only Date. But my requirement is for Data and Time, both.
    Request anyone to suggest how to go abt this problem.
    Thanx.

    You can use the class java.text.DateFormat (java.text.SimpleDateFormat) for displaying. For example like this.
    java.sql.Date sqldate = new java.sql.Date(new java.util.Date().getTime());
    java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy.MM.dd 'at' HH:mm:ss z");
    String str = formatter.format(sqldate);
    System.out.println(str);

  • Convert OpenSQL to Native SQL

    Does someone know of a function module that will accept a SQL statement in OpenSQL format, and convert it to Native SQL (Oracle) format?
    We cannot turn on a trace in our system.
    Thanks.

    Check these threads ...
    Converting OPEN SQL to NATIVE SQL
    Open SQL to Native SQL conversion
    Regards,
    Santosh
    Message was edited by: Santosh Kumar P

  • Convert Archive Logs into SQL statements

    Hi Guys,
    I want to find out a way to convert ARCHIVE LOGS into sql staements. Is there any. Please help.
    Thanks

    look into logminer...
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/logminer.htm
    http://arjudba.blogspot.com/2008/08/how-to-use-oracle-logminer-to-analysis.html

  • PLSQL Developer 与 Oracle SQL Developer 哪个更好?

    一直都是使用 PLSQL Developer 做一些开发, 想知道它与 Oracle SQL Developer 有什么不一样, 哪个更好用?

    我想对于这两个产品,哪个更好众说纷纭。我觉得各自有各自的优缺点。当然相对于PLSQL Developer 来说Oracle SQL Developer 的最大优点之一就是它的免费吧,当然它的很多细节上的功能还没有那么丰富。^_^
    你可以通过以下链接下载 Oracle SQL Developer
    http://www.oracle.com/technology/software/products/sql/index.html
    We’ve given up all of our licenses for other tools. We simply don’t need them anymore. Oracle SQL Developer does it all for us. We’ve saved a lot of money because it’s free. It’s also given our development staff a standard tool and they love it. It’s made training and support easier.
    以上是一个使用者的评论,你可以在下边的地址找到。
    http://www.oracle.com/technology/products/database/sql_developer/index.html

  • Converting String to java.sql.Time

    i have got a string like String time = "12:08 P.M.";
    I want to convert it to java.sql.Time .
    Please anyone suggest me the solution.

    CROSSPOST: http://forum.java.sun.com/thread.jspa?threadID=5162798&messageID=9621227
    A crosspost with only 2 postings. Is that a new record? Or does it just tie the record :-)

Maybe you are looking for

  • How to frame a SQL for the below Query

    i have a SQL query select x,y from table1 where x=1 output x y 1 a 1 b where a means alpha and b means beta select x,z from table2 where x=1 Output x z 1 B How do i build a query to achieve a following output x z y1 y2 1 b alpha beta Please noete : I

  • I forgot my security questions for iTunes... How can I make purchases on iTunes?

    I created my apple ID account about 5 years ago when I was in high school.  I just bought a new mac and iTunes won't allow me to make purchases without answering security questions.  Is there any way that I can get the answers to the security questio

  • Google chrome install wont close when click the X

    google chrome install wont close when click the X . I dont know why but it is like the X is not there, ~I click in the X button and nothing happens in this browser, i am tlaking about the google site and the box in the uppper corner right,these happe

  • Estimate time delay during execution

    Hi, everyone. Currently, I have a VISA program for reading signals from a GPS receiver. From the program, I want to measure time delay of execution, i.e. time delay between start and end as shown in the jpg. Are there any vi in LabView facilitating t

  • HT4191 Sync Notes Between Devices

    I just purchased my new iPhone 5 to replace my retro 3GS.  I also have an iPad and use the Notes feature on both the phone and iPad.  I cannot figure out how to transfer my Notes from the old phone to the iPhone 5.  I backup to iCloud.  I have an iCl