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] [Issue Comment Edited] (DERBY-5201) Create tools for reading the contents of the seg0 directory
Date Fri, 06 May 2011 18:02:03 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030061#comment-13030061
] 

Rick Hillegas edited comment on DERBY-5201 at 5/6/11 6:00 PM:
--------------------------------------------------------------

Attaching a new version of DataFileReader. This version adds support for pretty-printing data
files in encrypted databases:

Usage:

    java DataFileReader $dataFileName [ -v ] [ -d $D ] [ -p $P ] [ -n $N ] [ -e $bootPassword
$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 boot password and the location
of service.properties.

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

    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.

The following example decrypts and deserializes an entire SYSCONGLOMERATES file, dumping the
result into an xml file for inspection:

java DataFileReader wombat/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 )  )" -e Wednesday wombat/service.properties
> z.xml



      was (Author: rhillegas):
    Attaching a new version of DataFileReader. This version adds support for pretty-printing
log files in encrypted databases:

Usage:

    java DataFileReader $dataFileName [ -v ] [ -d $D ] [ -p $P ] [ -n $N ] [ -e $bootPassword
$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 boot password and the location
of service.properties.

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

    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.

The following example decrypts and deserializes an entire SYSCONGLOMERATES file, dumping the
result into an xml file for inspection:

java DataFileReader wombat/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 )  )" -e Wednesday wombat/service.properties
> z.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: 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message