You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by "Manohar Menam -T (mmenam - PRIME SOLUTIONS INC at Cisco)" <mm...@cisco.com> on 2013/11/06 00:54:36 UTC

Need Support: 'SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE' is not recognized as a function or procedure.

I have been trying to export a table which has BLOBs. Tables with LOBs work perfectly fine. It's getting complicated using only java code to export / import.
It's been few days that I am trying to export/import. I am running into only issue, and that is tables with LOBs.
Please suggest me what is going wrong. I have even tried taking latest jar files(10.5.X), currently using 10.2.X.

I am connecting to Derby as:
NetworkServerControl server = new NetworkServerControl(InetAddress.getByName("localhost"), 1527);
                  server.start(new PrintWriter(System.out));
                  connect = DriverManager.getConnection("jdbc:derby://localhost:1527/dbName");
Statement used is:
                  PreparedStatement statement = connect.prepareStatement("CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE(?,?,?,?,?,?,?)");
                  statement.setString(1, null);
                  statement.setString(2, "EVENT_TRANSACTION");
                  statement.setString(3, "c:/derbytest/EVENT_TRANSACTION.csv");
                  statement.setString(4, null);
                  statement.setString(5, null);
                  statement.setString(6, null);
                  statement.setString(7, "c:/derbytest/EVENT_TRANSACTION.dat");

                  statement.executeUpdate();
                  statement.close();

Here is the exception I am getting:

Exception in thread "main" java.sql.SQLException: 'SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE' is not recognized as a function or procedure.

at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
      at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
      at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
      at com.pari.db.DerbyConnection.<init>(DerbyConnection.java:102)
      at com.pari.db.DerbyConnection.main(DerbyConnection.java:198)

Caused by: org.apache.derby.client.am.SqlException: 'SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE' is not recognized as a function or procedure.

at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
      at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source)
      at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source)
      at org.apache.derby.client.net.NetStatementReply.readPrepare(Unknown Source)
      at org.apache.derby.client.net.StatementReply.readPrepare(Unknown Source)
      at org.apache.derby.client.net.NetStatement.readPrepare_(Unknown Source)
      at org.apache.derby.client.am.Statement.readPrepare(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInput(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
      at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
      ... 3 more

You can also call me at my mobile.
Thanks,
Manohar Menam
mmenam@cisco.com<ma...@cisco.com>
814 431 0923


Re: Need Support: 'SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE' is not recognized as a function or procedure.

Posted by Knut Anders Hatlen <kn...@oracle.com>.
Mamta Satoor <ms...@gmail.com> writes:

> Manohar, this procedure was added in Derby 10.3 and that would explain
> why it won't work with 10.2. But I am not sure why it is not working
> when you try it with 10.5.

If the database was created with 10.2, the procedure still won't exist
if you just boot it with the 10.5 jar files. You need to upgrade the
database format too in order to make the procedure available.

More info on how to upgrade can be found here:

http://db.apache.org/derby/docs/10.10/devguide/tdevupgradedb.html

-- 
Knut Anders

Re: Need Support: 'SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE' is not recognized as a function or procedure.

Posted by Mamta Satoor <ms...@gmail.com>.
Manohar, this procedure was added in Derby 10.3 and that would explain why
it won't work with 10.2. But I am not sure why it is not working when you
try it with 10.5. The procedure takes 7 parameters and I see that you are
using 7 parameters when invoking it.

Mamta


On Tue, Nov 5, 2013 at 3:54 PM, Manohar Menam -T (mmenam - PRIME SOLUTIONS
INC at Cisco) <mm...@cisco.com> wrote:

>  I have been trying to export a table which has BLOBs. Tables with LOBs
> work perfectly fine. It’s getting complicated using only java code to
> export / import.
>
> It’s been few days that I am trying to export/import. I am running into
> only issue, and that is tables with LOBs.
>
> Please suggest me what is going wrong. I have even tried taking latest jar
> files(10.5.X), currently using 10.2.X.
>
>
>
> I am connecting to Derby as:
>
> NetworkServerControl server = *new* NetworkServerControl(InetAddress.
> *getByName*("localhost"), 1527);
>
>                   server.start(*new* PrintWriter(System.*out*));
>
>                   connect = DriverManager.*getConnection*(
> "jdbc:derby://localhost:1527/dbName");
>
> Statement used is:
>
>                   PreparedStatement statement = connect.prepareStatement("CALL
> SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE(?,?,?,?,?,?,?)");
>
>                   statement.setString(1, *null*);
>
>                   statement.setString(2, "EVENT_TRANSACTION");
>
>                   statement.setString(3,
> "c:/derbytest/EVENT_TRANSACTION.csv");
>
>                   statement.setString(4, *null*);
>
>                   statement.setString(5, *null*);
>
>                   statement.setString(6, *null*);
>
>                   statement.setString(7,
> "c:/derbytest/EVENT_TRANSACTION.dat");
>
>
>
>                   statement.executeUpdate();
>
>                   statement.close();
>
>
>
> Here is the exception I am getting:
>
>
>
> Exception in thread "main" *java.sql.SQLException*:
> 'SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE' is not recognized as a
> function or procedure.
>
>
>
> at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown
> Source)
>
>       at org.apache.derby.client.am.SqlException.getSQLException(Unknown
> Source)
>
>       at org.apache.derby.client.am.Connection.prepareStatement(Unknown
> Source)
>
>       at com.pari.db.DerbyConnection.<init>(*DerbyConnection.java:102*)
>
>       at com.pari.db.DerbyConnection.main(*DerbyConnection.java:198*)
>
>
>
> Caused by: *org.apache.derby.client.am.SqlException*:
> 'SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE' is not recognized as a
> function or procedure.
>
>
>
> at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source)
>
>       at
> org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown
> Source)
>
>       at
> org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown
> Source)
>
>       at org.apache.derby.client.net.NetStatementReply.readPrepare(Unknown
> Source)
>
>       at org.apache.derby.client.net.StatementReply.readPrepare(Unknown
> Source)
>
>       at org.apache.derby.client.net.NetStatement.readPrepare_(Unknown
> Source)
>
>       at org.apache.derby.client.am.Statement.readPrepare(Unknown Source)
>
>       at
> org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInput(Unknown
> Source)
>
>       at
> org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown
> Source)
>
>       at org.apache.derby.client.am.PreparedStatement.prepare(Unknown
> Source)
>
>       at org.apache.derby.client.am.Connection.prepareStatementX(Unknown
> Source)
>
>       ... 3 more
>
>
>
> You can also call me at my mobile.
>
> Thanks,
>
> Manohar Menam
>
> *mmenam@cisco.com <mm...@cisco.com>*
>
> *814 431 0923 <814%20431%200923>*
>
>
>