db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5201) Create tools for reading the contents of the seg0 directory
Date Tue, 02 Apr 2013 16:43:16 GMT

     [ https://issues.apache.org/jira/browse/DERBY-5201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Rick Hillegas updated DERBY-5201:

    Attachment: DataFileReader.java

Attaching a new version of DataFileReader. This version incorporates changes made to DataFileVTI
on DERBY-6136: the bootPassword argument has been turned into a more general encryptionAttributes
argument. Here is the new usage:


    java DataFileReader $dataFileName [ -v ] [ -d $D ] [ -p $P ] [ -n $N ] [ -e $encryptionAttributes
$serviceProperties ]

    -v   Verbose. Print out records and slot tables. Field data appears as byte arrays. If
you do not set this flag, the tool just decodes the page headers.
    -d   Data signature. This makes a verbose printout turn the field data into objects. $D
is a row signature, e.g., "( a int, b varchar( 30 ) )"
    -p   Starting page. $P is a number which must be at least 1, the first page to read after
the header. Page 0 (the header) is always read.
    -n   Number of pages to read. $N is a positive number. Defaults to all subsequent pages.
    -e   If the database is encrypted, you must supply the encryption attributes and the location
of service.properties.

  For example, the following command deserializes all of the records in the SYSCONGLOMERATES

    java DataFileReader db/seg0/c20.dat -v -d "( a char(36), b char(36), c bigint, d varchar(
128), e boolean, f serializable, g boolean, h char( 36 )  )"

  Note the special 'serializable' type in the preceding example. Use 'serializable' for user-defined
types and for the system columns which are objects.

Here are examples of using this tool on encrypted databases:

java DataFileReader encryptedDB/seg0/c490.dat -v -d "( a varchar( 50 ), b char( 11 ) )" -e
"encryptionKey=abcd1234efab5678" encryptedDB/service.properties > ~/junk/z.xml

java DataFileReader bootpasswordDB/seg0/c490.dat -v -d "( a varchar( 50 ), b char( 11 ) )"
-e "bootPassword=mysecretpassword" bootpasswordDB/service.properties > ~/junk/zz.xml

> Create tools for reading the contents of the seg0 directory
> -----------------------------------------------------------
>                 Key: DERBY-5201
>                 URL: https://issues.apache.org/jira/browse/DERBY-5201
>             Project: Derby
>          Issue Type: Task
>          Components: Tools
>    Affects Versions:
>            Reporter: Rick Hillegas
>         Attachments: DataFileReader.java, DataFileReader.java, DataFileReader.java, DataFileReader.java,
> It would be nice to have tools which read Derby data files (the files in the seg0 directory)
without disturbing their contents.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message