converting stored procedures from sql server to oracle - sql

We have a massive amount of stored procedures to convert from sql-server 2000 to oracle 10g. Does anyone know of any tool that would achieve this?
We used Oracle SQL developer for this but it seems like it is creating extra cursors for each IF/ELSE condition that was on sql server side.
Has anyone successfully used a tool that would do this?

Sorry, no answer, and you have my sympathies. I've been through this before and it was all manual. We ended up making distinct migration & test plan tasks for it.
Oracle will use cursors in places that look odd for people used to SQL server. I am not aware of any (simple) way around this.
There seem to be a number of companies out there now offering services or tools to help: This Google search shows a bunch.
Don't forget to plan for functional equivalence testing. Datatype differences may cause issues, and your application development tool(s) may interact differently with Oracle than they do with SQL server. I did this conversion a number of years ago for a PowerBuilder application, and a lot more of that needed updating than we expected.

Related

SQL Server Migration Assistant issue

I'll start off by saying I'm in no way a PL/SQL or T-SQL expert and I only really know the basics but I have been asked to undergo a project to migrate about 1,700 PL/SQL procedure packages to T-SQL. Even if I knew PL/SQL the best way is using an automated tool to at least cover the majority of the translation. I've been using Microsoft's SQL Server Migration Assistant. After reading this article. I Am under the impression it is possible to convert single pieces of PL/SQL.
When I'm migrating schema's its giving me 3 errors every time. The same 3 errors. And basically it doesn't do the migrating at all. It just seems to comment the whole thing out?
I just want to know what is going wrong and why it is not migrating. From the second error my impression is that it is not converting because it is looking for ''stage_sendup_nb' but that doesn't exist on the database because I just pasted the SQL in.
"Unparsed SQL" means that it didn't recognize the statement you tried to convert. Most likely CREATE PROCEDURE is not supported for SQL statements. When you have a procedure to convert it's better to find it in Procedures and convert from there. "Snippet" conversion is very limited, it's designed to convert a statement or two, usually some specific query you want to try on the migrated DB (e.g. SELECT or UPDATE).
Any conversion of SQL (including procedures and SQL statements) relies on proper metadata available in Oracle. So you have to connect to Oracle database with all referenced tables, procedures and so on to convert even one procedure. In that way SSMA knows details about the referenced objects.

Migrating a database from MS SQL to MySql - How time consuming / difficult is it?

A client wants a database converting from MS SQL to MySql.
Personally I wouldn't do this, I prefer MS SQL for larger databases and like the tools available when working with MSSQL.
However I do use MySql on smaller projects. I've never moved a database from one to the other, or made much use of sprocs when using mysql.
Is there a lot of work involved in rewriting the sprocs, considering I have no prior knowledge of the ms sql database itself, so will need to first gain an understanding of what each sproc does.
This isn't a discussion on which to use as that's already been decided by the client for a few reasons.
have you seen this?
I haven't done this before, but I can only assure you mysql is good for big projects, too.

How to test my Firebird SQL queries

I'm in the process of learning SQL, and I need a way of verifying that my SQL queries are valid (i.e. no syntax errors). I also would like to check what results they yield on a test database of my choosing and structure.
I'm using embedded firebird in my C# .NET application, so I don't really have any tools to work with. Anyone have any tips? Perhaps there are SQL administrators/query IDEs out there that work with Firebird?
You can use IBExpert personal or DatabaseWorkbench Lite
check also this and this

Powerful tools for creating SQL queries

I'm looking for a tool, which would help creating complex SQL queries. Sometimes it's difficult to even verify, whether the results of a query are correct. It's especially easy to get queries joining several tables to return too little or too much data.
The tool should enable at least creation of test tables, some kind of visualization how the queries gather their data and hopefully give better parsing of error cases than for example Oracle does.
Are there tools like this or do I have to stick with creating test tables manually, filling them with test data and commiting all kinds of queries with SQuirrel SQL?
When you have a very complex query it is usually easiest to validate by breaking it up into multiple queries that populate temp tables. These intermediary results can be individually verified and then you bring them together to produce the final result set. Depending on performance needs you can stick with the temp table approach or you can then rewrite to a single statement. Typically when I have a huge query it is for background processing so I stick with the temp table approach.
What RDBMS are you using? All of the major ones have some type of console available (e.g.-SSMS in SQL Server, Toad in Oracle, MySQL Query Browser/Administrator for MySQL, etc.), and they all have Query Execution Plans where you can see how the query will actually run. So, the answer to your question is that it's entirely dependent on what RDBMS you're using, but the safe bet answer is: Yes.
I recommend trying SQL Server 2008 Management Studio Express (SSMSE) if you are working with SQL Server. I have used it at work and I believe it does everything you are looking for.
You can get it and SQL Server (express editions) here.
Certainly not a free, open-source solution, but I believe Quest Software's TOAD will fit your requirements. Quest seems to offer alot of tools in that space...they have tools for modeling and analysis, however I've never used the modeler or analyzer.
I personally have experience with the commercial version of TOAD for Oracle. It's GUI is overwhelming at first, but after you mentally filter out all of the extra buttons that you'll never use, it's manageable.

Are Oracle stored procedures faster than in line SQL for a Microsoft.NET application?

We are developing a Visual Studio.NET 2008 application with Oracle 9i as backend. Is it true that the usage of Stored procedures would be faster than Inline SQL ? This is a debate with my co-programmers.
We are using ODP.NET (Oracle Data Provider for .NET) from Oracle.
Thanks.
While I am tempted to answer "no" or "I don't think so", the only real way to know the answer to this question is to go and measure it yourself. Use a profiler like JetBrains dotTrace, and TOAD's own profiler, to find out.
All other answers are speculative.
It should be. When you send inline SQL to database, the engine must parse it and execute. Stored procedures are being parsed (and compiled) at creation time. So at least you are gaining parsing time.
I would expect stored procedures to be faster in almost all cases.
But it mainly depends on your code.
If for example you get a resultset from your database and then use this data to perform other queries, you'll end up with a lot of overhead in your network traffic. This is especially true if you forget to use a single connection for the requests.
It could then be more efficient to use a single stored procedure to return the agregated data (if possible of course).
It will be faster if you build your stored procs (PL/SQL packages) in such a way that less data will be transferred between the database and the client.
Jon Limjap said: "All other answers are speculative."
There's much truth to this statement. There are so many factors: how's the DB server set up? How's the network speed/reliability? How's the SQL? How's the PL/SQL? I could write really slow SQL and/or PL/SQL if I wanted to (and have, inadvertently, on past projects!). So if you can, try both out.