I am wondering if i use oracle store procedure and put whole lot of logic in there and using callable statement get the results is the one way, but what will happen if i move from Oracle database to DB2 ? how do i covert the store procedure logic.
is there any tool that can convert pl/sql code(Stored procedure) from one database to other?
You would have to rewrite the stored procedure. There isn't a tool. If you think it is likely that you will need to switch databases, you would be well served to not create new large stored procedures.