DBA Data[Home] [Help]

PACKAGE: SYS.DBMS_SQL_TRANSLATOR

Source


1 package dbms_sql_translator authid current_user as
2 
3   /*
4     Package: DBMS_SQL_TRANSLATOR
5 
6     DBMS_SQL_TRANSLATOR is the PL/SQL package for creating, configuring and
7     using SQL translation profiles.
8 
9     Notes:
10 
11     DBMSL_SQL_TRANSLATOR is a invoker-rights package. The subprograms in
12     DBMS_SQL_TRANSLATOR that modify a profile carry DDL transaction semantics
13     and when invoked will commit any open transaction in the session.
14    */
15 
16   /*----------------------------------------------------------------------
17     Constant: ATTR_TRANSLATOR
18 
19     The name of the SQL translation profile attribute that specifies the
20     translator package. The translator package must be a PL/SQL package with
21     the following two procedures that translate SQL statements and errors. The
22     names of the parameters of the translate procedures are significant.
23 
24     | PROCEDURE translate_sql(sql_text        IN  CLOB,
25     |                         translated_text OUT CLOB);
26     |
27     | PROCEDURE translate_error(error_code          IN  BINARY_INTEGER,
28     |                           translated_code     OUT BINARY_INTEGER,
29     |                           translated_sqlstate OUT VARCHAR2);
30     |
31     | Parameters:
32     |   sql_text            - SQL statement to be translated
33     |   translated_text     - translated SQL statement
34     |
35     |   error_code          - Oracle error code
36     |   translated_code     - translated error code
37     |   translated_sqlstate - translated SQLSTATE
38 
39     When translating a SQL statement or error, the translator package procedure
40     will be invoked with the same current user and current schema as those in
41     which the SQL statement is being parsed. The owner of the translator
42     package must be granted the *TRANSLATE SQL* user privilege on the current
43     user. And the current user must be granted the *EXECUTE* privilege on the
44     translator package also.
45 
46     When NULL is returned in translated_text, translated_code or
47     translated_sqlstate, it assumes that no translation is required and the
48     original SQL statement, error code or SQLSTATE is used instead.
49 
50     The name of the translator package follows the naming rules for database
51     packages of the form [schema.]package_name. When the schema and package
52     names are used, they are uppercased by default unless surrounded by
53     double quotes. For example, when setting a translator package,
54     translator => 'dbms_tsql_translator' is the same as translator =>
55     'Dbms_Tsql_Translator' and translator => 'DBMS_TSQL_TRANSLATOR', but not
56     the same as translator => '"dbms_tsql_translator"'. If the schema name
57     is omitted, the profile owner will be assumed.
58 
59     The translator attribute is not set by default.
60 
61     ----------------------------------------------------------------------
62     Constant: ATTR_FOREIGN_SQL_SYNTAX
63 
64     The name of the SQL translation profile attribute that indicates if the
65     profile is for translation of foreign SQL syntax. If it is not, only SQL
66     statements marked in Oracle-native syntax will be translated by the
67     profile.
68 
69     Foreign SQL syntax is true by default.
70 
71     ----------------------------------------------------------------------
72     Constant: ATTR_TRANSLATE_NEW_SQL
73 
74     The name of the SQL translation profile attribute that controls if the
75     profile should translate new SQL statements and errors. If so, the
76     translator package, if registered, will translate a new SQL statement or
77     error not already translated in custom translations, and also register
78     the new translation as custom translation. If not, any new SQL statement
79     or error encountered will result in a translation error.
80 
81     Translate new SQL statements and errors is true by default.
82 
83     ----------------------------------------------------------------------
84     Constant: ATTR_RAISE_TRANSLATION_ERROR
85 
86     The name of the SQL translation profile attribute that controls if the
87     profile should raise translation error if a SQL statement or error fails
88     to be translated. If not, the profile will attempt to execute or return
89     the original SQL statement or error.
90 
91     Raise translation error is false by default.
92 
93     ----------------------------------------------------------------------
94     Constant: ATTR_LOG_TRANSLATION_ERROR
95 
96     The name of the SQL translation profile attribute that controls if the
97     profile should log translation error in the database alert log.
98 
99     Log translation error is false by default.
100 
101     ----------------------------------------------------------------------
102     Constant: ATTR_TRACE_TRANSLATION
103 
104     The name of the SQL translation profile attribute that controls tracing.
105     If trace translation is true in a SQL translation profile, any SQL
106     statement or error translated by the profile in a database session and
107     its translation will be written to the database session's trace file.
108 
109     Trace translation is false by default.
110 
111     ----------------------------------------------------------------------
112     Constant: ATTR_EDITIONABLE
113 
114     The name of the SQL translation profile attribute that specifies whether
115     the SQL translation profile becomes an editioned or noneditioned object if
116     editioning is later enabled for the schema object type SQL translation
117     profile in the owner's schema.
118 
119     Editionable is true by default.
120   */
121 
122   ATTR_TRANSLATOR
123                        constant varchar2(30) := 'TRANSLATOR';
124   ATTR_FOREIGN_SQL_SYNTAX
125                        constant varchar2(30) := 'FOREIGN_SQL_SYNTAX';
126   ATTR_TRANSLATE_NEW_SQL
127                        constant varchar2(30) := 'TRANSLATE_NEW_SQL';
128   ATTR_RAISE_TRANSLATION_ERROR
129                        constant varchar2(30) := 'RAISE_TRANSLATION_ERROR';
130   ATTR_LOG_TRANSLATION_ERROR
131                        constant varchar2(30) := 'LOG_TRANSLATION_ERROR';
132   ATTR_TRACE_TRANSLATION
133                        constant varchar2(30) := 'TRACE_TRANSLATION';
134   ATTR_EDITIONABLE
135                        constant varchar2(30) := 'EDITIONABLE';
136 
137   /*----------------------------------------------------------------------
138     Constant: ATTR_VALUE_TRUE
139 
140     The value to set a SQL translation profile attribute to true.
141 
142     --------------------------
143     Constant: ATTR_VALUE_FALSE
144 
145     The value to set a SQL translation profile attribute to false.
146 
147   */
148   ATTR_VALUE_TRUE      constant varchar2(30) := 'TRUE';
149   ATTR_VALUE_FALSE     constant varchar2(30) := 'FALSE';
150 
151   /*----------------------------------------------------------------------
152     Exception: bad_argument
153 
154       A bad argument was passed to the PL/SQL API.
155 
156     ---------------------------------
157     Exception: insufficient_privilege
158 
159       The user has insufficient privilege for the operation.
160 
161     ---------------------------------
162     Exception: no_such_user
163 
164       The profile owner does not exist.
165 
166     ---------------------------------
167     Exception: no_such_profile
168 
169       The profile does not exist.
170 
171     ---------------------------------
172     Exception: profile_exists
173 
174       The profile exists already.
175 
176     ---------------------------------
177     Exception: no_translation_found
178 
179       No translation of the SQL statement or error code was found.
180   */
181   bad_argument           exception;
182   insufficient_privilege exception;
183   no_such_user           exception;
184   no_such_profile        exception;
185   profile_exists         exception;
186   no_translation_found   exception;
187 
188   pragma exception_init(bad_argument,           -29261);
189   pragma exception_init(insufficient_privilege,  -1031);
190   pragma exception_init(no_such_user,            -1435);
191   pragma exception_init(no_such_profile,        -24252);
192   pragma exception_init(profile_exists,           -955);
193   pragma exception_init(no_translation_found,   -24253);
194 
195   /*----------------------------------------------------------------------
196     Procedure: create_profile
197 
198       Creates a SQL translation profile.
199 
200     Parameters:
201       profile_name    - profile name
202       editionable     - is the profile editionable?
203 
204     Exceptions:
205     - <bad_argument>
206     - <insufficient_privilege>
207     - <no_such_user>
208     - <profile_exists>
209 
210     Notes:
211     - A SQL translation profile is a database schema object that resides in
212       SQL translation profile namespace. Its name follows the naming rules for
213       database objects of the form [schema.]name. When the schema and profile
214       names are used in the DBMS_SQL_TRANSLATOR package, they are uppercased
215       unless surrounded by double quotes. For example, the translation profile
216       profile_name => 'tsql_application' is the same as profile_name =>
217       'Tsql_Application' and profile_name => 'TSQL_APPLICATION', but not the
218       same as profile_name => '"tsql_application"'.
219 
220     - SQL translation profile is an editionable object type.
221 
222     - A SQL translation profile cannot be created as a common object in a
223       consolidated database.
224 
225     - To destroy a SQL translation profile, use <drop_profile>.
226 
227     Examples:
228     | begin
229     |   dbms_sql_translator.create_profile(profile_name => 'tsql_application');
230     | end;
231   */
232   procedure create_profile(profile_name in varchar2,
233                            editionable  in boolean default true);
234   PRAGMA SUPPLEMENTAL_LOG_DATA(create_profile, AUTO_WITH_COMMIT);
235 
236   /*----------------------------------------------------------------------
237     Procedure: register_sql_translation
238 
239       Registers a custom translation of a SQL statement in a SQL translation
240       profile.
241 
242     Parameters:
243       profile_name    - profile name
244       sql_text        - SQL statement
245       translated_text - translated SQL statement
246       enable          - enable or disable the translation
247 
248     Exceptions:
249     - <bad_argument>
250     - <insufficient_privilege>
251     - <no_such_user>
252     - <no_such_profile>
253 
254     Notes:
255     - When the Oracle database translates a statement using a translation
256       profile, it attempts to look up the registered custom translation first
257       and only if no match is found will it invoke the translator package.
258 
259     - When a translation is registered in a profile, it may be disabled.
260       Disabled translations will not be looked up during translation until
261       they are enabled.
262 
263     - When translated_text is NULL, it means no translation is required and the
264       original statement is used instead.
265 
266     - The old translation of the SQL statement, if present, will be replaced
267       with the new translation.
268 
269     - SQL statements will be canonicalized before being registered or
270       translated.
271 
275     | begin
272     - To deregister a translation, use <deregister_sql_translation>.
273 
274     Examples:
276     |   dbms_sql_translator.register_sql_translation(
277     |       profile_name    => 'tsql_application',
278     |       sql_text        => 'select top 5 * from emp',
279     |       translated_text => 'select * from emp where rownum <= 5');
280     | end;
281   */
282   procedure register_sql_translation(profile_name    in varchar2,
283                                      sql_text        in clob,
284                                      translated_text in clob    default null,
285                                      enable          in boolean default true);
286   PRAGMA SUPPLEMENTAL_LOG_DATA(register_sql_translation, AUTO_WITH_COMMIT);
287 
288   /*----------------------------------------------------------------------
289     Procedure: enable_sql_translation
290 
291       Enables or disables a custom translation of a SQL statement in a SQL
292       translation profile.
293 
294     Parameters:
295       profile_name    - profile name
296       sql_text        - SQL statement
297       enable          - enable or disable the translation
298 
299     Exceptions:
300     - <bad_argument>
301     - <insufficient_privilege>
302     - <no_such_user>
303     - <no_such_profile>
304 
305     Examples:
306     | begin
307     |   dbms_sql_translator.enable_sql_translation(
308     |       profile_name => 'tsql_application',
309     |       sql_text     => 'select top 5 * from emp'
310     |       enable       => true);
311     | end;
312   */
313   procedure enable_sql_translation(profile_name in varchar2,
314                                    sql_text     in clob,
315                                    enable       in boolean default true);
316   PRAGMA SUPPLEMENTAL_LOG_DATA(enable_sql_translation, AUTO_WITH_COMMIT);
317 
318   /*----------------------------------------------------------------------
319     Procedure: deregister_sql_translation
320 
321       Deregisters the custom translation of a SQL statement in a SQL
322       translation profile.
323 
324     Parameters:
325       profile_name    - profile name
326       sql_text        - SQL statement
327 
328     Exceptions:
329     - <bad_argument>
330     - <insufficient_privilege>
331     - <no_such_user>
332     - <no_such_profile>
333 
334     Examples:
335     | begin
336     |   dbms_sql_translator.deregister_sql_translation(
337     |       profile_name => 'tsql_application',
338     |       sql_text     => 'select top 5 * from emp');
339     | end;
340   */
341   procedure deregister_sql_translation(profile_name in varchar2,
342                                        sql_text     in clob);
343   PRAGMA SUPPLEMENTAL_LOG_DATA(deregister_sql_translation, AUTO_WITH_COMMIT);
344 
345   /*----------------------------------------------------------------------
346     Procedure: register_error_translation
347 
348       Registers a custom translation of an Oracle error code and SQLSTATE in a
349       SQL translation profile.
350 
351     Parameters:
352       profile_name        - profile name
353       error_code          - Oracle error code
354       translated_code     - translated error code
355       translated_sqlstate - translated SQLSTATE
359     - <bad_argument>
356       enable              - enable or disable the translation
357 
358     Exceptions:
360     - <insufficient_privilege>
361     - <no_such_user>
362     - <no_such_profile>
363 
364     Notes:
365     - When the Oracle database translates an Oracle error code using a
366       translation profile, it attempts to look up the registered custom
367       translation first and only if no match is found will it invoke the
368       translator package.
369 
370     - When a translation is registered in a profile, it may be disabled.
371       Disabled translations will not be looked up during translation until
372       they are enabled.
373 
374     - The old translation of the error code and SQLSTATE, if present, will be
375       replaced with the new translation.
376 
377     - To deregister a translation, use <deregister_error_translation>.
378 
379     Examples:
380     | begin
381     |   dbms_sql_translator.register_error_translation(
382     |       profile_name    => 'tsql_application',
383     |       error_code      => 1,
384     |       translated_code => 2601);
385     | end;
386   */
387   procedure register_error_translation(
388               profile_name        in varchar2,
389               error_code          in pls_integer,
390               translated_code     in pls_integer default null,
391               translated_sqlstate in varchar2    default null,
392               enable              in boolean     default true);
393   PRAGMA SUPPLEMENTAL_LOG_DATA(register_error_translation, AUTO_WITH_COMMIT);
394 
395   /*----------------------------------------------------------------------
396     Procedure: enable_error_translation
397 
398       Enables or disables a custom translation of an Oracle error code in a SQL
399       translation profile.
400 
401     Parameters:
402       profile_name    - profile name
403       error_code      - Oracle error code
404       enable          - enable or disable the translation
405 
406     Exceptions:
407     - <bad_argument>
408     - <insufficient_privilege>
409     - <no_such_user>
410     - <no_such_profile>
411 
412     Examples:
413     | begin
414     |   dbms_sql_translator.enable_error_translation(
415     |       profile_name => 'tsql_application',
416     |       error_code   => 1,
417     |       enable       => true);
418     | end;
419   */
420   procedure enable_error_translation(
421               profile_name        in varchar2,
422               error_code          in pls_integer,
423               enable              in boolean default true);
424   PRAGMA SUPPLEMENTAL_LOG_DATA(enable_error_translation, AUTO_WITH_COMMIT);
425 
426   /*----------------------------------------------------------------------
427     Procedure: deregister_error_translation
428 
429       Deregisters the custom translation of an Oracle error code and SQLSTATE
430       in a SQL translation profile.
431 
432     Parameters:
433       profile_name    - profile name
434       error_code      - Oracle error code
435 
436     Exceptions:
437     - <bad_argument>
438     - <insufficient_privilege>
439     - <no_such_user>
440     - <no_such_profile>
441 
442     Examples:
443     | begin
447     | end;
444     |   dbms_sql_translator.deregister_error_translation(
445     |       profile_name => 'tsql_application',
446     |       error_code   => 1);
448   */
449   procedure deregister_error_translation(
450               profile_name       in varchar2,
451               error_code         in pls_integer);
452   PRAGMA SUPPLEMENTAL_LOG_DATA(deregister_error_translation, AUTO_WITH_COMMIT);
453 
454   /*----------------------------------------------------------------------
455     Procedure: set_attribute
456 
457       Sets an attribute of a SQL translation profile.
458 
459     Parameters:
460       profile_name    - profile name
461       attribute_name  - attribute name
462       attribute_value - attribute value
463 
464     Exceptions:
465     - <bad_argument>
466     - <insufficient_privilege>
467     - <no_such_user>
468     - <no_such_profile>
469 
470     See also:
471       <Constants>
472   */
473   procedure set_attribute(profile_name    in varchar2,
474                           attribute_name  in varchar2,
475                           attribute_value in varchar2);
476   PRAGMA SUPPLEMENTAL_LOG_DATA(set_attribute, AUTO_WITH_COMMIT);
477 
478   /*----------------------------------------------------------------------
479     Procedure: export_profile
480 
481       Exports the content of a SQL translation profile.
482 
483     Parameters:
484       profile_name    - profile name
485       content         - content of the profile
486 
487     Exceptions:
488     - <bad_argument>
489     - <insufficient_privilege>
490     - <no_such_user>
491     - <no_such_profile>
492 
493     Notes:
494     - The content of the SQL translation profile will be exported in XML format
495       as follows. Note that the profile name will not be exported.
496 
497       | <SQLTranslationProfile Translator="translator package name"
498       |                        ForeignSQLSyntax="TRUE|FALSE"
499       |                        TranslateNewSQL="TRUE|FALSE"
500       |                        RaiseTranslationError="TRUE|FALSE"
501       |                        LogTranslationError="TRUE|FALSE"
502       |                        TraceTranslation="TRUE|FALSE"
503       |                        Editionable="TRUE|FALSE">
504       |   <SQLTranslations>
505       |     <SQLTranslation Enabled="TRUE|FALSE">
506       |       <SQLText>original SQL text</SQLText>
507       |       <TranslatedText>translated SQL text</TranslatedText>
508       |     </SQLTranslation>
509       |     ...
510       |   </SQLTranslations>
511       |   <ErrorTranslations>
512       |     <ErrorTranslation Enabled="TRUE|FALSE">
513       |       <ErrorCode>Oracle error code</ErrorCode>
514       |       <TranslatedCode>translated error code</TranslatedCode>
515       |       <TranslatedSQLSTATE>translated SQLSTATE</TranslatedSQLSTATE>
516       |     </ErrorTranslation>
517       |     ...
518       |   </ErrorTranslations>
519       | </SQLTranslationProfile>
520 
521     - To import the content to a SQL translation profile, use <import_profile>.
522 
523     Examples:
524     | declare
525     |   content CLOB;
526     | begin
527     |   dbms_sql_translator.export_profile(
528     |       profile_name => 'tsql_application',
529     |       content      => content);
530     | end;
531   */
532   procedure export_profile(profile_name in         varchar2,
533                            content      out nocopy clob);
534 
535   /*----------------------------------------------------------------------
536     Procedure: import_profile
537 
538       Imports the content of a SQL translation profile.
539 
540     Parameters:
541       profile_name    - profile name
542       content         - content of the profile
543 
544     Exceptions:
545     - <bad_argument>
546     - <insufficient_privilege>
547     - <no_such_user>
548 
549     Notes:
550     - The content of the SQL translation profile should be in XML format as
551       used by <export_profile>. All elements and attributes are optional.
552 
553     - If the profile does not exist, it will be created. If it exists, the
554       content will override any existing attribute, translator package,
555       SQL or error translation registration.
556 
557     - To export the content to a SQL translation profile, use <export_profile>.
558 
559     Examples:
560     | declare
561     |   content CLOB;
562     | begin
563     |   dbms_sql_translator.import_profile(
564     |       profile_name => 'tsql_application',
565     |       content      => content);
566     | end;
567   */
568   procedure import_profile(profile_name in varchar2,
569                            content      in clob);
570 
571   /*----------------------------------------------------------------------
572     Procedure: drop_profile
573 
574       Drops a SQL translation profile and its contents.
575 
576     Parameters:
577       profile_name    - profile name
578 
579     Exceptions:
580     - <bad_argument>
581     - <insufficient_privilege>
582     - <no_such_user>
583     - <no_such_profile>
584 
585     Examples:
586     | begin
587     |   dbms_sql_translator.drop_profile(profile_name => 'tsql_application');
588     | end;
589   */
590   procedure drop_profile(profile_name in varchar2);
591   PRAGMA SUPPLEMENTAL_LOG_DATA(drop_profile, AUTO_WITH_COMMIT);
592 
593   /*----------------------------------------------------------------------
594     Procedure: translate_sql
595 
596       Translates a SQL statement using the session's SQL translation profile.
597 
598     Parameters:
599       sql_text        - SQL statement
600       translated_text - translated SQL statement
601 
602     Exceptions:
603     - <bad_argument>
604     - <insufficient_privilege>
605     - <no_such_user>
606     - <no_such_profile>
607     - <no_translation_found>
608 
609     Examples:
610     | declare
611     |   translated_text CLOB;
612     | begin
613     |   dbms_sql_translator.translate_sql(
614     |       sql_text        => 'select top 5 * from emp',
615     |       translated_text => translated_text);
616     | end;
617   */
618   procedure translate_sql(sql_text        in         clob,
619                           translated_text out nocopy clob);
620 
621   /*----------------------------------------------------------------------
622     Procedure: translate_error
623 
624       Translates an Oracle error code and an ANSI SQLSTATE using the session's
625       SQL translation profile.
626 
627     Parameters:
628       error_code          - Oracle error code
629       translated_code     - translated error code
630       translated_sqlstate - translated SQLSTATE
631 
632     Exceptions:
633     - <bad_argument>
634     - <insufficient_privilege>
635     - <no_such_user>
636     - <no_such_profile>
637     - <no_translation_found>
638 
639     Examples:
640     | declare
641     |   translated_code     BINARY_INTEGER;
642     |   translated_sqlstate VARCHAR2(5);
643     | begin
644     |   dbms_sql_translator.translate_error(
645     |       error_code          => 1,
646     |       translated_code     => translated_code,
647     |       translated_sqlstate => translated_sqlstate);
648     | end;
649   */
650   procedure translate_error(error_code          in         pls_integer,
651                             translated_code     out        pls_integer,
652                             translated_sqlstate out nocopy varchar2);
653 
654   /*----------------------------------------------------------------------
655     Procedure: sql_id
656 
657       Computes the SQL identifier of a SQL statement in the session's SQL
658       translation profile.
659 
660     Parameters:
661       sql_text        - SQL statement
662 
663     Returns:
664       The SQL ID of the SQL statement in the session's SQL translation profile.
665 
666     Exceptions:
667     - <bad_argument>
668 
669     Examples:
670     | declare
671     |   sqltext clob;
672     |   sqlid   varchar2(13);
673     | begin
674     |   sqltext := 'select top 1 * from emp';
675     |   sqlid   := dbms_sql_translator.sql_id(sqltext);
676     | end;
677   */
678   function sql_id(sql_text in clob) return varchar2 deterministic;
679 
680   /*----------------------------------------------------------------------
681     Procedure: sql_hash
682 
683       Computes the hash value of a SQL statement in the session's SQL
684       translation profile. It may be used to speed up the lookup of a SQL
685       translation in SQL translation views.
686 
687     Parameters:
688       sql_text        - SQL statement
689 
690     Returns:
691       The hash value of the SQL statement in the session's SQL translation
692       profile.
693 
694     Exceptions:
695     - <bad_argument>
696 
697     Examples:
698     | declare
699     |   sqltext clob;
700     |   txltext clob;
701     |   sqlhash number;
702     | begin
703     |   sqltext := 'select top 1 * from emp';
704     |   sqlhash := dbms_sql_translator.sql_hash(sqltext);
705     |
706     |   select translated_text into txltext
707     |     from user_sql_translations
708     |    where sql_hash = sqlhash and
709     |          dbms_lob.compare(sql_text, sqltext) = 0;
710     | end;
711   */
712   function sql_hash(sql_text in clob) return number deterministic;
713 
714   /*----------------------------------------------------------------------
715     Procedure: set_sql_translation_module
716 
717       Sets the module and action on a custom translation of a SQL statement in
718       a SQL translation profile.
719 
720     Parameters:
721       profile_name - profile name
722       sql_text     - SQL statement
723       module       - module
724       action       - action
725 
726     Exceptions:
727     - <bad_argument>
728     - <insufficient_privilege>
729     - <no_such_user>
730     - <no_such_profile>
731 
732     Examples:
733     | begin
734     |   dbms_sql_translator.set_sql_translation_module(
735     |       profile_name => 'tsql_application',
736     |       sql_text     => 'select top 5 * from emp',
737     |       module       => 'employee report',
738     |       action       => 'top 5 employees query');
739     | end;
740   */
741   procedure set_sql_translation_module(profile_name in varchar2,
742                                        sql_text     in clob,
743                                        module       in varchar2,
744                                        action       in varchar2);
745   PRAGMA SUPPLEMENTAL_LOG_DATA(set_sql_translation_module, AUTO_WITH_COMMIT);
746 
747   /*----------------------------------------------------------------------
748     Procedure: set_sql_translation_comment
749 
750       Sets the comment on a custom translation of a SQL statement in a SQL
751       translation profile.
752 
753     Parameters:
754       profile_name - profile name
755       sql_text     - SQL statement
756       comment      - comment
757 
758     Exceptions:
759     - <bad_argument>
760     - <insufficient_privilege>
761     - <no_such_user>
762     - <no_such_profile>
763 
764     Examples:
765     | begin
766     |   dbms_sql_translator.set_sql_translation_comment(
767     |       profile_name => 'tsql_application',
768     |       sql_text     => 'select top 5 * from emp',
769     |       comment      => 'the translation has been reviewed');
770     | end;
771   */
772   procedure set_sql_translation_comment(profile_name in varchar2,
776 
773                                         sql_text     in clob,
774                                         comment      in varchar2);
775   PRAGMA SUPPLEMENTAL_LOG_DATA(set_sql_translation_comment, AUTO_WITH_COMMIT);
777   /*----------------------------------------------------------------------
778     Procedure: set_error_translation_comment
779 
780       Sets the comment on a custom translation of an Oracle error code in a SQL
781       translation profile.
782 
783     Parameters:
784       profile_name - profile name
785       error_code   - Oracle error code
786       comment      - comment
787 
788     Exceptions:
789     - <bad_argument>
790     - <insufficient_privilege>
791     - <no_such_user>
792     - <no_such_profile>
793 
794     Examples:
795     | begin
796     |   dbms_sql_translator.set_error_translation_comment(
797     |       profile_name => 'tsql_application',
798     |       error_code   => 1,
799     |       comment      => 'the translation has been reviewed');
800     | end;
801   */
802   procedure set_error_translation_comment(profile_name in varchar2,
803                                           error_code   in pls_integer,
804                                           comment      in varchar2);
805   PRAGMA SUPPLEMENTAL_LOG_DATA(set_error_translation_comment, AUTO_WITH_COMMIT);
806 
807 end;