How to fix the Oracle error ORA-13113: invalid tg_layer_id in sdo_topo_geometry constructor?

In this post, you’ll learn more about the Oracle ErrorORA-13113: invalid tg_layer_id in sdo_topo_geometry constructor with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

ORA-13113: invalid tg_layer_id in sdo_topo_geometry constructor

Reason for the Error ORA-13113: invalid tg_layer_id in sdo_topo_geometry constructor

An invalid layer_id was passed to the SDO_TOPO_GEOMETRY constructor.

How to fix the Error ORA-13113: invalid tg_layer_id in sdo_topo_geometry constructor ?

You can fix this error in Oracle by following the below steps

Valid layer_ids are obtained by adding a topo_geometry layer to the topology. Check USER_SDO_TOPO_METADATA to find out the layer_id for an existing topo_geometry layer.