Publishing and invoking Java functions in Oracle

Source: Internet
Author: User
Tags functions variable
Oracle
Publish process:

1, write. java files

2. Successfully compile. java files and generate. class files, which are files imported into Oracle.

3, (Toad Tool method Import), open Java Manager refers to the. class file to import, perform the import.

Note that when you log on to the database with sufficient permissions, you can import the file into the specified schema.

After the import is complete, the Java class can be found in the Java directory in the imported schema, with the file identified as J (c), the Java class file.

4, publish the file, specify the functions to publish, the internal call of the functions do not need to publish.

Once the publication is complete, you can find all the published packages,functions and procedures in the Procs directory in the imported schema.









Call procedure: Sqlplus for example

1, to import the user login database

2, sql> variable msg varchar2 (2000);







Define the variable msg, specifying the length.

3, sql> call Sendsms.makesettingdata (' 16000 ', ' 9200 ', ', ', ' Y ', ' N ', ' 9999 ', ' 210.51.1.4 ', ' 11111 ', ' 210.51.1.4 ', ' 22222 ', ' anzhezhu@win001.ad.leadtone.com ') into:msg;







Call complete







Use call to invoke the function and output the result to MSG.

Note: There is no Boolean data type in Oracle, and variables involving this type should be replaced with a string.

sql> Print msg















MSG







--------------------------------------------------------------------------------







0605043e8023f001061c196170706c69636174696f6e2f636d63632e73657474696e6700af890200







0502000000002e270fd23301042b67d233010456ce616e7a68657a68754077696e3030312e61642e






6c656164746f6e652e636f6d00

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.