How to debug Type in ORACLE Database

Source: Internet
Author: User

How to debug Type in ORACLE databases is generally difficult to debug when ORACLE needs to debug the TYPE and LIST sets of stored procedure parameters. Now we use a simple method to show the TYPE code Java code -- subtype create or replace type RSS_STR_OBJECT_TYPE is object (str_value varchar2 (200); grant Execute on rssdata. RSS_STR_OBJECT_TYPE to rssopr; grant execute on rssdata. RSS_STR_OBJECT_TYPE to r_rssdata_Exec; -- the parent TYPE Code create or replace type RSS_STR_OBJECT_TYPE_LIST is table of rssdata. RSS_STR_OBJECT_TYPE grant Execute on rssdata. rss_str_object_type_list to rssopr; grant execute on rssdata. rss_str_object_type_list to r_rssdata_Exec; 2. java code PROCEDURE rss_test_type_list_pro (partition IN rss_str_object_type_list, out_retcode OUT Varchar2, out_message OUT Varchar2) IS I NUMBER; begin LOOP I: = partition; INSERT INTO TEST (D) VALUES (in_rss_str_object_type_list (I ). str_value); exit when I = response; I: = in_rss_str_object_type_list.next (I); END LOOP; EXCEPTION WHEN OTHERS THEN out_retcode: = '9'; out_message: = '[rss_test_type_list_pro] error message' | SQLCODE | ',' | SUBSTR (SQLERRM, 1,120); END rss_test_type_list_pro; 3. during debugging, the stored procedure anonymous block writes the Java code declare -- first initialize the object to be tested and create an object in_rss_str_object_type_list rss_str_object_type_list: = rss_str_object_type_list (); -- assign in_rss_str_object_type_m1 rss_str_object_type: = rss_str_object_type ('shenzhen Changxing Subbranch ') to a set variable m1 to be tested; begin -- begin () when calling the stored procedure (); -- assign the m1 member to the last element of the set, namely, struct (struct): = struct; struct (struct => in_rss_str_object_type_list, out_retcode =>: out_retcode, out_message =>: out_message ); end;

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.