db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: Overriding one database's content with another
Date Thu, 05 Nov 2009 08:40:03 GMT
Brian Shields wrote:
> Bryan Pendleton <bpendleton@...> writes:
>   
>>> not exactly sure which files represent what, and there's no noticeable naming
>>> scheme to the DAT files I can go off of.
>>>       
>> The naming scheme is based off the conglomerate ID, which can be used to
>> cross-reference back to the system catalogs.
>>
>> This should help you get the hang of figuring out which file goes with
>> which conglomerate, and hence with which table/index:
>> http://db.apache.org/derby/javadoc/engine/org/apache/derby/diag/SpaceTable.html
>>     
>
> The vast majority of the CONGLOMERATEIDs for my tables contain either c16f or
> c20e, and end in c00 or c30. My filenames range from c1a1 to cf0, so unless you
> can tell me how the filenames are generated from the CONGLOMERATEID, I don't see
> how that solves my problem...
Hi Brian,

I think what Bryan meant was the conglomerate number. See in 
SYS.SYSCONGLOMERATES.
You may also want to filter based on the schema id etc, and you have to 
join data from SYS.SYSTABLES if you want to target a specific table/index.
The conglomerate number is represented as an integer in the system 
tables. To get the corresponding file, convert the integer to 
hexadecimal, prefix a 'c' and append '.dat'.

Remember that indexes are stored in their own separate file (also 
recorded in the system tables).
I've never tried to update parts of a database in this way, let us know 
how it works out :)


Regards,
-- 
Kristian

Mime
View raw message