OracleJavaProc adds a stored procedure method update

Source: Internet
Author: User

If you want to correctly Add a stored procedure method to the OracleJavaProc class in actual operations, if you want to know how to develop it, the following are the correct steps: dropjava first, change the program, and then loadjava. So how to update it?

 
 
  1. D:eclipse3.1workspacedbtest>dropjava -u scott -v OracleJavaProc  
  2. D:/tiger@iihero.oracledbeclipse3.1workspacedbtest>loadjava -u scott -v -resolve Or  
  3. acleJavaProc/tiger@iihero.oracledb.java  
  4. arguments: '-u' 'scott/tiger@iihero.oracledb' '-v' '-resolve' 'OracleJavaProc.java'  
  5. creating : source OracleJavaProc  
  6. loading : source OracleJavaProc  
  7. resolving: source OracleJavaProc 

The following application example:

 
 
  1. SQL> create or replace function query_hisal(grade number) return number as langu  
  2. age java name 'OracleJavaProc.getHiSal(int) return int';  

The function has been created.

 
 
  1. SQL> set serveroutput on size 2000  
  2. SQL> call dbms_java.set_output(2000); 

The call is complete.

 
 
  1. SQL> select query_hisal(5) from dual;  
  2. QUERY_HISAL(5)  
  3. 9999  

Usage personal opinion: Do not manually drop java source, do not manually drop procedure. The above content is an updated description of adding a stored procedure method to the OracleJavaProc class correctly. I hope it will help you in this regard.
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.