Is there a tool that would help me with rewriting thousands of lines of code?
We are going to migrate from Oracle server to Vertica and therefore the older
Oracle joins would no longer be supported and a lot of SQL needs to be rewritten.
Best regards
Toad 11.0 (query builder) is suppose to be able to do this. I've not use this in great detail, but for the most part it works. i would double check any code provided by any tool as nothing is 100% fool proof. Another promising tools that many like seems to be swissql. No matter which tool you use, you're going to need to have lots of manual proof reading to make sure the resulting query is what you want.
Vertica's variant of SQL is the same as PostgreSQL. So you may want to see if any tools handle that already.
Here's a link that may be a good starting point: Tool for translation of Oracle PL/SQL into Postgresql PL/pgSQL
Related
I have joined a project which has been already developed and its a legacy project with very large database and its in Java/J2EE.
I am trying to understand the Database Design & Architecture and so is there a tool available which can generate schema from the populated table representing all the constraints like foreign keys etc ?
Basically am looking for an Database Re-engineering Tool. My database is Oracle 10g.
Inputs would be highly appreciated.
I use ER/Studio and I absolutely love it for all my data modeling, reverse engineering and database design work.
http://www.embarcadero.com/products/er-studio
I should really become an ER/Studio evangelist.. but really, it is a great product.
Haven't played much with it, but Oracle has a tool included with SQL Developer: Oracle SQL Developer Data Modeler. I agree with #Raj that ER Studio is very good; I've also used ERWin. Both have the drawback of being quite pricey. For a while there was free downloads, but I see now it appears they're charging for it. Don't know how much.
I was wondering if there are any good refactoring tools for Oracle databases and especially for PL/SQL. I'm working on a project where half the developers are working with c# and the other half on the db where there is a large and complex schema and a large code base in pl/sql. We also use sql server but the database team work exclusively with Oracle.
This code base is being worked on actively and is being refactored gradually but I was quite surprised to see how bad the refactoring tools for oracle seem to be (or at least in comparison to Eclipse and Resharper).
The developers are using Toad which only has basic refactoring support (probably as its seems to be targeted more towards db admin then development). I've used Toad myself before but always had assumed for pl/sql there were more features for working with code but had never looked into it. Now as far as I can see the only refactorings that it provides are extract method (procedure) and variable renaming. I read an article comparing sql developer and pl/sql developer and these do not appear to have any better support for refactoring. I had a quick look at the eclipse data tools project but couldn't see that they've added refactoring support since I last used it (a few years ago).
For Sql Server there exists Sql Refactor which when table structures are changed gets propagated through to the stored procedures. This for me is much cleaner and less error prone than having someone manually update all stored procedures. I used an older version of these tools on a project in the past and they seemed to be quite ok but a bit slow but that was a few years ago and it was still usable.
Something similar for Oracle would already be a big help for our developement team so I'd appreciate some pointers to good refactoring tools for Oracle if they do exist.
Thanks,
Crocked
As it happens the "D" in TOAD stands Developer not DBA. In fact many DBAs anathematise TOAD and other such tools.
You are out of luck. As far as I know there are no tools for refactoring PL/SQL. The root problem is that refactoring as a concept comes from the OOP paradigm, and PL/SQL is not object oriented. It does not support inheritance or polymorphism (*). This means that many of the techniques which underpin classical refactoring practice (say as defined by Fowler) - abstraction, interfaces, etc - have no analogue in PL/SQL.
The corollary of this is that people who are used to having refactoring as part of their conceptual toolbox tend to avoid programming with PL/SQL. I once got into a heated debate on the TDD list over this. The upshot being that even developers who need and appreciated the virtues of PL/SQL would rather develop in languages with better tool support, clause #1 of the Agile Manifesto notwithstanding.
The most important tool for refactoring is automated unit testing. Although TOAD does not (I think) have integrated unit testing, the next release of Oracle SQL Developer will. There are also standalone unit test tools. I recently mentioned a couple of them in another SO thread.
In terms of refactoring PL/SQL to match changes in the database, arguably most interaction with tables ought to be underaqtken by generated table APIs rather than being embedded in transactional PL/SQL. In this happy realm there is no need for refactoring tools, we just need to re-generate the relevant APIs. The post I linked to above also mentions QCGU, a tool which can do this. Of course, when we have a PL/SQL codebase which isn't organised in such a fashion then life is harder. You won't be surprised to learn that there isn't a lot of tool support for implementing Feathers's WELC in PL/SQL.
(*) Yes, I know Oracle has Types but they are (a) SQL not PL/SQL and (b) how many people out there are actually building APIs using them?
Are there are tangible benefits in changing the PLSQL_CODE_TYPE from interpreted to native? Was wondering if there are any case studies on the same.
If benefit justifies the change, how can I go about implementing the same ?
My platform is Windows 2003 server, running Oracle 10gR2 (10.2.0.1.0) if that helps.
The benefit should be speed. Whether it is 'tangible' depends on whether PL/SQL performance is an issue for you. It won't give any benefit on the SQL side (eg SELECTing) or if you have latency issues elsewhere (eg calling web services).
Unless you are doing some computationally heavy tasks in PL/SQL, I suspect you won't notice a difference. I'd be much more concerned about running the database without the appropriate patches, so would recommend you look to applying the patchsets to get you to 10.2.0.4
Just to supplement Gary's excellent answer (which I voted up) here is some further information from the Oracle documentation
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/tuning.htm#LNPLS01209
In addition to the excellent answers already given, unless you really need to switch to Native now, I would recommend waiting until you migrate to Oracle 11g. Here is a relevant paragraph from the documentation:
Starting with Oracle Database 11g,
PL/SQL Native Compilation does not
need a C compiler. Therefore, if you
presently use a C compiler only to
support PL/SQL Native Compilation, you
can remove it from the machine where
your database is installed (and from
each node in an Oracle RAC
configuration).
We have switched to Native compilation in our 11g database, but we don't do a lot of computationally intensive PL/SQL, so our performance gains have been almost insignificant. We hope to have code in the future that will take greater advantage of it. On the plus side it hasn't caused us any problems and was easy to do.
I started learning .net about 3 years ago. I have gone thru a boot camp during that time learning OO and various data access technologies such as NHibernate, Subsonic, LINQ TO SQL.
didn't wanna try EF cause it hasn't reached version 3 :)
As far as reporting goes, I have heard that many ORM'S fall flat on their face when it comes to reporting. We have AS400 OR DB2 as our backend. I have heard that LLBLGEN does a good job on reporting for this product. But it is a commercial product and not FREE. Can someone point me to some good resources for Reporting from DB2? thanks for any links/blog articles
Reporting on DB2 will work the same as reporting on almost any other database - you can use ODBC, JDBC or native DB2 calls to the database. So, you don't need DB2 reporting references - any database reporting references should meet your needs.
The only thing special about DB2 might be a little of the syntax extensions, and how you scale up the back end through parallel database servers (like MapReduce, Teradata, etc). But neither should be of much concern - since it's extremely ansi compliant and the scalability should be largely invisible to the reporting developer.
And Crystal Reports, Brio, Cognos, Business Objects, Microstrategy, Actuate, JasperReports, Birt, etc should all work fine.
ORMs are typically terrible for reporting - since they're object rather than set oriented. You'll especially feel the pain with very large data volumes, complex reports or a large number of reports.
Please, don't overlook the most obvious answer: Query/400!
It is native iSeries software. You configure and runs the report on the iSeries but it works great. It is simple, straight forward and maybe a little bit limited but you get most of the works done.
Don't be scared of the green screen or the simple interface. It's really a powerfull tool that does handle the iSeries database very well.
Can someone point me to some good resources for Reporting from DB2?
RPG I!
Light up those indicators!
Query Manager:
You cam use SQL (that can take input parameters) to build it, then create a "form" that will provide totals, level breaks, counts, customized headers, titles, etc.
Query/400 does not accept parameters AFAIK.
Free manual at:
http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/topic/rzatc/sc415212.pdf
Our users have created MS-Excel spreadsheets which over time have evolved into fairly complex applications. They run their part of the business with them. But, never having been exposed to software development discipline, these spreadsheets are brittle, single point of failure, solutions.
Our development group uses Oracle primarily with Java and some other technologies. Is there a tools for conversion from MS-Excel to Oracle? At least part way so we can get a head start and not just have to reverse engineer and rewrite?
There are tools that could convert the data, but trying to converting the formulas would cause the design to be inefficient at best and unusable at worst. The difference between spreadsheets and an Oracle database are similar to the differences between a home gardener and a farmer. Both are useful on their level and some of the same principles apply, but the techniques employed are entirely different.
I suggest you examine the spreadsheets until you understand the goals they are trying to meet and then architect a system in Oracle that meets those goals using the best techniques available in Oracle. The processing will end up being quite different, but the product will be significantly better for it.
You can suck a spreadsheet into MS Access, then push it directly into Oracle as a table (or append it to an existing table). I'm sure you could write an MS Access macro to do it.
It also appears to be possible using SQL Loader from Oracle, but I've never tried that myself.
No there aren't any tools that will covert the formulas or logic. You will have to do that the hard way. You can get the data into Oracle by exporting it as a CSV and using SQL Loader to import it into the database.
You can find tools to migrate the data, but other than that you wouldn't find a tool to automatically do this, you would have to do it all manually.
Even directly copying what was there would not make sense, you were using very limited tools (Excel), you would need to re-analyze the requirements, and possibly modify them before doing anything else.