Recent

Author Topic: FBAdmin... how do I select a PageSize on restore?  (Read 2684 times)

RedOctober

  • Sr. Member
  • ****
  • Posts: 450
FBAdmin... how do I select a PageSize on restore?
« on: January 19, 2018, 06:29:19 am »
When restoring a .Fbk into a .Fdb, there doesn't seem to be a setting for page size for the new database.  Am I missing something?  Does it simply use the largest page size possible (about 16K?)  I couldn't find a default page size setting in the firebird.conf file.

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: FBAdmin... how do I select a PageSize on restore?
« Reply #1 on: January 19, 2018, 07:04:35 am »
When restoring a .Fbk into a .Fdb, there doesn't seem to be a setting for page size for the new database.  Am I missing something?  Does it simply use the largest page size possible (about 16K?)  I couldn't find a default page size setting in the firebird.conf file.

FBAdmin doesn't appear to include this feature. With FBAdmin, the .FBK file already has a page size. Restoring from the .FBK file will use that same page size.

To my knowledge, the only ways to specify page size are when using the CREATE DATABASE DDL statement, or when using GBAK.EXE to restore with the -P argument.

Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: FBAdmin... how do I select a PageSize on restore?
« Reply #2 on: January 19, 2018, 07:38:17 am »
To my knowledge, the only ways to specify page size are when using the CREATE DATABASE DDL statement, or when using GBAK.EXE to restore with the -P argument.

Just checked IBX for Lazarus. It has a TIBRestoreService component with a PageSize property to emulate the functionality in GBAK restore.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

RedOctober

  • Sr. Member
  • ****
  • Posts: 450
Re: FBAdmin... how do I select a PageSize on restore?
« Reply #3 on: January 19, 2018, 05:59:04 pm »
Hi dsiders, my project is about 40% done using FBAdmin component and other SQLdb components.  To switch to IBX now would be a real pain.  I guess I'll have to use a GBAK wrapper, or, just use the default page size that gets assigned by the FB service, which I think is always the 16K page size, which is what I want 100% of the time anyway.

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: FBAdmin... how do I select a PageSize on restore?
« Reply #4 on: January 19, 2018, 09:15:37 pm »
I guess I'll have to use a GBAK wrapper, or, just use the default page size that gets assigned by the FB service, which I think is always the 16K page size, which is what I want 100% of the time anyway.

According to the Firebird docs, the default value is 4096:

Optional Parameters for CREATE DATABASE

Optional PAGE_SIZE: Clause for specifying the database page size. This size will be set for the primary file
and all secondary files of the database. If you specify the database page size less than 4,096, it will be changed
automatically to the default page size, 4,096. Other values not equal to either 4,096, 8,192 or 16,384 will be
changed to the closest smaller supported value. If the database page size is not specified, it is set to the default
value of 4,096.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

RedOctober

  • Sr. Member
  • ****
  • Posts: 450
Re: FBAdmin... how do I select a PageSize on restore?
« Reply #5 on: January 20, 2018, 01:52:41 am »
Hi dsiders, I think this must have changed for FB 3x.   When I do a restore without specifying a page size, whether the .fbk is from a .fdb with a page size of 16K or 4K... the restored DB always has a page size of 16K, not 4K like the documentation says.

 

TinyPortal © 2005-2018