vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi I am trying to recreate a database under the following environments : From: Solaris with DB2UDB version 7.2 with FP 9 To: Linux with DB2UDB version 7.2 with FP 9 It will be of really a great help if any one help me in step-by-step guidelines to migrate SPs written in Java & C languages. I have successfully recreated SQL procedures. Some of the questions/doubts I have are : 1. How do we extract class files from existing java SPs? 2. Hos do we extract/find jar file? 3. What are the files need to move to target box before migrate? 4. Do we have to use "CREATE PROCEDURE " command even after moving class/jar files ? I am sorry, I really don't know anything about JAVA or C procedures. Please help. Thanks in advance. |
| ||||
| "Kumar" <kumar@tumkurcity.com> wrote in message news:2fa6f746.0407131047.786487e6@posting.google.c om... > Hi > > I am trying to recreate a database under the following environments : > > From: Solaris with DB2UDB version 7.2 with FP 9 > To: Linux with DB2UDB version 7.2 with FP 9 > > It will be of really a great help if any one help me in step-by-step > guidelines to migrate SPs written in Java & C languages. I have > successfully recreated SQL procedures. > > Some of the questions/doubts I have are : > I have not ported a Java stored procedure to another platform so my answers are *not* based on having done this, just theory based on having written a number of Java stored procedures. I have not worked with C stored procedures but I think my remarks for Java stored procedures should probably work for C procs as well. If anyone else reading this thread knows me to be wrong, please correct me! I don't knowingly pass out false information or bad advice and I don't want to start now.... > 1. How do we extract class files from existing java SPs? Considering that you will be using different Java versions and JVMs on each platform, I think it would be safer to send the Java source to the each platform and prepare it separately on each platform. > 2. Hos do we extract/find jar file? When I create my jar files, I put the class files *and* the source for each stored procedure in the jar file. If you have put the source in the jar file, you will find it in the sqllib\function\jar\<schema-name> directory. Otherwise, I have no idea where your source code is but you should be able to find it, assuming you kept it. Again, I suggest that you move the source file to the other machine, not the class file. > 3. What are the files need to move to target box before migrate? The source code for each stored procedure and client should be enough, unless I'm forgetting something. Of course, you will also need preparation procedures for compiling, jarring, CREATE PROCEDURE, sqlj.install_jar, etc. I would suggest developing those with a tool like Ant. I'm quite fond of Ant because it runs on many different platforms and is almost entirely platform-independent. That means that it should run pretty much unchanged on the platforms you mentioned, as well as many others. For lots more information about Ant, go to http://ant.apache.org. > 4. Do we have to use "CREATE PROCEDURE " command even after moving > class/jar files ? > If you follow my suggestions, yes, you will have to do DROP PROCEDURE, sqlj.remove_jar, sqlj.install_jar, CREATE_PROCEDURE, as well as compile and jar commands. Of course, you will also have to prepare the client programs that call the Java stored procs so they will need to be compiled and possibly jarred. Rhino |