Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using DBMS_DATAPUMP with .NET
I tried string.Empty for remote_link and now I get this:
Message: ORA-39001: invalid argument value
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79 ORA-06512: at "SYS.DBMS_DATAPUMP", line 911 ORA-06512: at "SYS.DBMS_DATAPUMP", line 4255 ORA-06512: at line 1
Sunit
sjoshi wrote:
> Hello All
>
> I'm trying to use the DBMS_DATAPUMP.OPEN procedure but it keeps failing
> with this message
>
> 1) Exception Information
> *********************************************
> Exception Type: Oracle.DataAccess.Types.OracleNullValueException
> Message: Invalid operation on null data
> Number: -2502
> Source: Oracle Data Provider for .NET
> Data: System.Collections.ListDictionaryInternal
> TargetSite: Int32 get_Length()
> HelpLink: NULL
>
> StackTrace Information
> *********************************************
> at Oracle.DataAccess.Types.OracleString.get_Length()
> at
> Oracle.DataAccess.Client.OracleParameter.GetBindingSize_Char(Int32 idx)
> at Oracle.DataAccess.Client.OracleParameter.PreBind_Char()
> at Oracle.DataAccess.Client.OracleParameter.PreBind(OracleConnection
> conn, IntPtr errCtx, Int32 arraySize)
> at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
> at DAO.OracleConcreteFactory.ExecuteNonQuery(DAORequest request) in
> F:\Sunit\CSharpFiles\Scripts\DAO
>
> The procedure signature as per Oracle docs is:
>
> DBMS_DATAPUMP.OPEN (
> operation IN VARCHAR2,
> mode IN VARCHAR2,
> remote_link IN VARCHAR2 DEFAULT NULL,
> job_name IN VARCHAR2 DEFAULT NULL,
> version IN VARCHAR2 DEFAULT 'COMPATIBLE'
> compression IN NUMBER DEFAULT KU$_COMPRESS_METADATA)
> RETURN NUMBER;
>
> In code I do this:
>
> _conRequest.Command = "DBMS_DATAPUMP.OPEN";
> _conRequest.CommandType = CommandType.StoredProcedure;
> _conRequest.AddParameter("operation",OracleDbType.Varchar2, "EXPORT",
> ParameterDirection.Input);
> _conRequest.AddParameter("mode", OracleDbType.Varchar2, "SCHEMA",
> ParameterDirection.Input);
> _conRequest.AddParameter("remote_link", OracleDbType.Varchar2,
> OracleString.Null, ParameterDirection.Input);
> _conRequest.AddParameter("job_name", OracleDbType.Varchar2, "EXP_TEST",
> ParameterDirection.Input);
> _conRequest.AddParameter("version", OracleDbType.Varchar2, "LATEST",
> ParameterDirection.Input);
>
> _conRequest.AddParameter("jobhandle", DBDataType.DBInteger, null,
> ParameterDirection.ReturnValue);
>
> I think it fails when trying to evaluate the remote_link parameter. Any
> hints are greatly appreciated.
>
> thanks
> Sunit
Received on Wed Jan 17 2007 - 14:48:58 CST