From: sjoshi on
I'm trying to execute DBMS_DATAPUMP.METADATA_FILTER using ODP.NET and
get the Message: ORA-39001: invalid argument value. The same argument
works fine thru. PL/SQL as in

DBMS_DATAPUMP.METADATA_FILTER(jobNo, 'SCHEMA_LIST','''ERLS'',
''ERLS_SCHEMA''', NULL, NULL);

In DotNet I use:

cmd.CommandText = "DBMS_DATAPUMP.METADATA_FILTER";
cmd.CommandType = CommandType.StoredProcedure;

cmd.Parameters.Add("HANDLE", OracleDbType.Decimal,
ParameterDirection.Input).Value = odec.Value;
cmd.Parameters.Add("NAME", OracleDbType.Varchar2,
ParameterDirection.Input).Value = "SCHEMA_LIST";
cmd.Parameters.Add("VALUE", OracleDbType.Varchar2,
ParameterDirection.Input).Value = schemaList;
cmd.Parameters.Add("OBJECT_PATH", OracleDbType.Varchar2,
ParameterDirection.Input).Value = string.Empty;
cmd.Parameters.Add("OBJECT_TYPE", OracleDbType.Varchar2,
ParameterDirection.Input).Value = string.Empty;

cmd.ExecuteNonQuery();

The trace file shows the parameter that comes thru. correctly

PARSING IN CURSOR #50 len=66 dep=0 uid=238 oct=47 lid=238
tim=1429532982 hv=4011255448 ad='2b5b9708'
Begin DBMS_DATAPUMP.METADATA_FILTER(:v0, :v1, :v2, :v3, :v4); End;
END OF STMT
PARSE #50:c=0,e=852,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=1429532977
BINDS #50:
kkscoacd
Bind#0
oacdty=02 mxl=22(21) mxlc=00 mal=00 scl=00 pre=00
oacflg=03 fl2=1000000 frm=00 csi=00 siz=152 off=0
kxsbbbfp=086208b4 bln=22 avl=02 flg=05
value=67
Bind#1
oacdty=01 mxl=32(11) mxlc=11 mal=00 scl=00 pre=00
oacflg=03 fl2=1000010 frm=01 csi=178 siz=0 off=24
kxsbbbfp=086208cc bln=32 avl=11 flg=01
value="SCHEMA_LIST"
Bind#2
oacdty=01 mxl=32(24) mxlc=24 mal=00 scl=00 pre=00
oacflg=03 fl2=1000010 frm=01 csi=178 siz=0 off=56
kxsbbbfp=086208ec bln=32 avl=24 flg=01
value="''ERLS'',''ERLS_SCHEMA''"
Bind#3
oacdty=01 mxl=32(00) mxlc=00 mal=00 scl=00 pre=00
oacflg=03 fl2=1000010 frm=01 csi=178 siz=0 off=88
kxsbbbfp=0862090c bln=32 avl=00 flg=01
Bind#4
oacdty=01 mxl=32(00) mxlc=00 mal=00 scl=00 pre=00
oacflg=03 fl2=1000010 frm=01 csi=178 siz=0 off=120
kxsbbbfp=0862092c bln=32 avl=00 flg=01

Any hints are appreaciated.

Sunit