<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: dbtools api and java? in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820101#M4850944</link>
    <description>&lt;P&gt;Be aware that the size of the backed up transaction log / database may not exactly match the size of the database prior to the backup. (e.g. the database size can change depending on the '&lt;A href="http://dcx.sybase.com/index.html#1201/en/dbreference/backup-statement.html"&gt;CHECKPOINT LOG COPY&lt;/A&gt;' options, and the &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbadmin/recovery-internals-backup.html"&gt;transaction log grows&lt;/A&gt; while the backup is taking place on the database file).&lt;/P&gt;</description>
    <pubDate>Wed, 15 Feb 2012 17:09:58 GMT</pubDate>
    <dc:creator>jeff_albion</dc:creator>
    <dc:date>2012-02-15T17:09:58Z</dc:date>
    <item>
      <title>dbtools api and java?</title>
      <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaq-p/13820094</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;we have webinterface to manage our different client installations and also copy over whole databases via the dbbackup command.&lt;/P&gt;
&lt;P&gt;The serverside is all written in java (And vaadin)
Sometimes we have very lengthy backup processes (500MB databases over 20MBit/sec Lines) and wish to show a progres bar.&lt;/P&gt;
&lt;P&gt;Is there a way to use dbtools from java to get some sort of progress informations ? (As on the commandline of dbbackup for example)&lt;/P&gt;
&lt;P&gt;Or is there another way to make backups across the wire and show some progress?&lt;/P&gt;
&lt;P&gt;André&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 12:15:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaq-p/13820094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T12:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: dbtools api and java?</title>
      <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820095#M4850938</link>
      <description>&lt;P&gt;The &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbreference/connection-extended-property-function.html"&gt;PROGRESS connection property&lt;/A&gt; can give you this information. This property was introduced in version 12.0.0.&lt;/P&gt;
&lt;P&gt;FWIW: In order to get such messages, the according &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbadmin/progress-messages-option.html"&gt;progress_messages database option&lt;/A&gt; must have been set to Raw or Formatted.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 12:42:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820095#M4850938</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T12:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: dbtools api and java?</title>
      <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820097#M4850940</link>
      <description>&lt;P&gt;Hmm...
unfortunally the servers are mainly v9 and v11&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 12:47:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820097#M4850940</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T12:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: dbtools api and java?</title>
      <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820098#M4850941</link>
      <description>&lt;P&gt;Is that a client-side or server-side backup (dbbackup -s)?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 13:56:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820098#M4850941</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2012-02-14T13:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: dbtools api and java?</title>
      <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820099#M4850942</link>
      <description>&lt;P&gt;Currently it's a client side backup,
but I could transform it into a server side backup and then download the db files with sftp or similar...&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 14:24:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820099#M4850942</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-14T14:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: dbtools api and java?</title>
      <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820096#M4850939</link>
      <description>&lt;P&gt;As DBTools is a C-based API, I guess a usage from Java will require some kind of &lt;A href="http://en.wikipedia.org/wiki/Java_Native_Interface"&gt;JNI interface&lt;/A&gt; or the like - can't tell more, haven't done that...&lt;/P&gt;
&lt;P&gt;Another approach with a looser coupling might be to make use of the MESSAGE statement to pass messages to other connections. ODBC apps can process such messages by using a &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbprogramming/pg-odbcdev-connectattr.html"&gt;particular callback&lt;/A&gt; - that works well IMHO. SA 11 JDBC clients seems to be able to read them as well, but I don't have a sample at hands.&lt;/P&gt;
&lt;P&gt;The basic idea would be to&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;have a JDBC app that waits for input&lt;/LI&gt;
&lt;LI&gt;turn the connection id of that waiting connection to a program that can call a C DLL&lt;/LI&gt;
&lt;LI&gt;use a classic DBTools C DLL that calls DBBackup() and uses the callbacks to build according MESSAGE statements for a given connection ID, such as:&lt;BR /&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;extern short _callback MessageRtn(char * messagestr)&lt;BR /&gt;
{&lt;BR /&gt;
    if (messagestr != NULL)&lt;BR /&gt;
    {&lt;BR /&gt;
        // build message string from messagestr, such as&lt;BR /&gt;
        // sqlstr = "MESSAGE messagestr + " TO CLIENT FOR CONNECTION " + MyConnId + " IMMEDIATE" &lt;BR /&gt;
        // use ODBC or whatever C DB APO to execute that SQL statement&lt;BR /&gt;
    }&lt;BR /&gt;
    return (0);&lt;BR /&gt;
}&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So the DBTools DLL could "send" the progress messages of the backup to the JDBC connection.&lt;/P&gt;
&lt;P&gt;Apparently, one could also make the DBTools API DLL to write messages to a file or send them via some IPC mechanism, and make the JDBC app read them...&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2012 03:58:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820096#M4850939</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2012-02-15T03:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: dbtools api and java?</title>
      <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820100#M4850943</link>
      <description>&lt;P&gt;Ok, that would be a way to go, but it looks like a long way and a stony one (ASA wersion dependent etc.)&lt;/P&gt;
&lt;P&gt;I think we will take a simpler track:
- Ask the asa server for the size of the .db and .log files
- Start a server side backup
- Via java remoting (which we already have) poll on the backup file sizes
- Then transfer the backupfiles via sftp or java remoting back to the management server&lt;/P&gt;
&lt;P&gt;Since we already have the java remoting file transfer in place, it will not require that much changes.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;André&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2012 15:25:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820100#M4850943</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-15T15:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: dbtools api and java?</title>
      <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820101#M4850944</link>
      <description>&lt;P&gt;Be aware that the size of the backed up transaction log / database may not exactly match the size of the database prior to the backup. (e.g. the database size can change depending on the '&lt;A href="http://dcx.sybase.com/index.html#1201/en/dbreference/backup-statement.html"&gt;CHECKPOINT LOG COPY&lt;/A&gt;' options, and the &lt;A href="http://dcx.sybase.com/index.html#1201/en/dbadmin/recovery-internals-backup.html"&gt;transaction log grows&lt;/A&gt; while the backup is taking place on the database file).&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2012 17:09:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820101#M4850944</guid>
      <dc:creator>jeff_albion</dc:creator>
      <dc:date>2012-02-15T17:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: dbtools api and java?</title>
      <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820102#M4850945</link>
      <description>&lt;P&gt;I did now still do a remote dbbackup (From remote to local)
First I ask the dbserver for the size of the DB file and then watch it grow as it is copied to the local system. (Apparently dbbackup does not preallocate the space)&lt;/P&gt;
&lt;P&gt;With these two I can detect the current DB file size:&lt;/P&gt;
&lt;P&gt;SELECT PropName, PropDescription, Value FROM sa_db_properties() where propname='FileSize'&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;SELECT PropName, PropDescription, Value FROM sa_db_properties() where propname='PageSize'&lt;/P&gt;
&lt;P&gt;Is there a similar possibility to ask teh DB server for the size of the transaction log file ?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 11:34:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820102#M4850945</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-17T11:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: dbtools api and java?</title>
      <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820103#M4850946</link>
      <description>&lt;P&gt;select DB_EXTENDED_PROPERTY('FileSize', 'translog')&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 11:44:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820103#M4850946</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2012-02-17T11:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: dbtools api and java?</title>
      <link>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820104#M4850947</link>
      <description>&lt;P&gt;Almost realtime support, cool &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;
&lt;P&gt;And thanks a lot&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 11:55:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/dbtools-api-and-java/qaa-p/13820104#M4850947</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-02-17T11:55:46Z</dc:date>
    </item>
  </channel>
</rss>

