Edit

Share via


O2SS0104: Unpackaged function call is missing a parameter (Error)

This article describes why SQL Server Migration Assistant (SSMA) for Oracle doesn't convert the function call when number of parameters passed is less than the defined number of parameters.

Background

When calling functions in Oracle, you can pass parameters by using:

  • Positional notation. Parameters are specified in the order in which they're declared in the procedure.
  • Named notation. The name of each parameter is specified along with its value. An arrow (=>) serves as the association operator. The order of the parameters isn't significant.
  • Mixed notation. The first parameters are specified with positional notation, and then they're switched to named notation for the subsequent parameters.

Whenever parameter is omitted in a stand-alone function call, SSMA generates an error message.

Example

In the following example, you create a function and pass one default parameter in that function:

CREATE OR REPLACE FUNCTION MULTIPLICATION (
   a int,
   b int DEFAULT 1
)
RETURN NUMBER
AS
BEGIN
 RETURN a*b;
END;
/

SELECT MULTIPLICATION(20) FROM DUAL;

When you try to convert the previous code in SSMA, it generates the following error message:

O2SS0104: Unpackaged function call is missing a parameter

Possible remedies

To resolve this error, you must ensure that the SSMA project settings are properly configured:

  1. Navigate to the Tools menu, and select Project Settings.
  2. Then, select the General tab.
  3. Under Statements Conversion, change Convert calls to subprograms that use default arguments to Yes.
  • O2SS0102: Procedure (function) call is missing a parameter
  • O2SS0105: Function (procedure) call is missing a parameter