Failed to view PL objects or garbled characters are returned

2024-01-04 02:59:52  Updated

Garbled Chinese characters displayed for DDL statements of stored procedures

Symptom

Chinese content is garbled in DDL statements of stored procedures in the object structure tree in ODC.

1

Possible causes

This issue is caused by the defect that the OceanBase Database kernel has in handling DDL character sets.

Affected versions

OceanBase Database V2.2.77

Solutions

Solution 1

  1. Execute the following statement:

    select s.* , o.created, o.last_ddl_time, o.status from  
    (select * from all_objects where object_type='PROCEDURE') o
    right join all_source s on s.name = o.object_name and s.owner = o.owner
    and s.type = o.object_type
    where s.owner='schema_name' and s.name='procedure_name' and s.type = 'PROCEDURE';
    

    The following figure shows the sample result:

    2

  2. In the figure, the TEXT field is a DDL statement. Move the pointer over a CLOB-type cell and click the Zoom In icon on the right side of the cell to view the content.

Solution 2

Upgrade the OBServer node to the latest PATCH version of V2.2.77.

Failed to view the PL object structure tree

Symptom

When you view the DDL statements of a stored procedure, function, or package in the object structure tree in ODC, the structure information, such as the secondary structures of variables, parameters, and subprograms, is not displayed.

Possible causes

Some versions of ODC have known issues while parsing DDL statements of PL objects and may fail to parse complex DDL statements, resulting in the failure to display the structure tree of PL objects.

Affected versions

All versions of client ODC and web ODC

Solutions

Upgrade ODC to the latest version.

Failed to view the PL object list and details

Symptom

The structure tree and DDL statements of PL objects, such as packages, functions, and stored procedures, are not displayed.

Possible causes

A stored procedure that contains special characters or Chinese characters is created in the GBK character set. The name of the stored procedure is incorrectly converted in the GBK character set, making all_source unavailable. However, DDL statements of PL objects, such as packages, functions, and stored procedures, depend on all_source.

Affected versions

All versions of client ODC and web ODC

Solutions

Drop PL objects that contain special characters.

Contact Us