Subject | Re: How is it possible to change Page_Size to 2048 ? |
---|---|
Author | Ashok122 |
Post date | 2006-11-14T21:05:11Z |
Hi Gabriel,
You are correct. I am able to Restore database with any Page_Size.
That is the way the Page_Size can be changed.
And GDS implementation may allow to use same "CREATE DATABASE" which
is what I have to learn.
All the Page_Size confusion is now gone.
Thanks,
Ashok
--- In Firebird-Java@yahoogroups.com, Gabriel Reid <gabriel.reid@...>
wrote:
You are correct. I am able to Restore database with any Page_Size.
That is the way the Page_Size can be changed.
And GDS implementation may allow to use same "CREATE DATABASE" which
is what I have to learn.
All the Page_Size confusion is now gone.
Thanks,
Ashok
--- In Firebird-Java@yahoogroups.com, Gabriel Reid <gabriel.reid@...>
wrote:
>org.firebirdsql.management.FBManager; however, that
>
> > If you use iSQL,
> > you can send
> > > > Create Database 'NewDB.fdb' user 'sysdba' password 'masterkey'
> > > > page_size 2048
> >
> > in above case, we are creating new Database with specified Page_Size
> > (so that it does not use the DEFAULT PAGE_SIZE).
> >
> > I want to know if it is possible to do same thing, but in Java.
> >
> > My other question is that
> > can I send CREATE DATABASE statement from Java is the database does
> > not yet exist?
>
> You can create a database using the
> doesn't give you the option of setting the pagesize.Database
>
> It is possible to set the page size of a database before you create it
> from Java if you use the GDS implementations directly; however, I'd say
> that the easiest way to do this at the moment with the current API is
> the backup and restore method as I explained in the previous message.
>
>
> - Gabriel
>
>
>
>
>
> > --- In Firebird-Java@yahoogroups.com, Gabriel Reid <gabriel.reid@>
> > wrote:
> > >
> > > On Mon, Nov 13, 2006 at 08:51:25PM -0000, Ashok122 wrote:
> > > > I want to do this in Java.
> > > >
> > > > But I am not sure about getting a Connection object without
> > > > is first created.to the
> > > >
> > > > Because it is possible to use executeUpdate with
> > > > Create Database 'NewDB.fdb' user 'sysdba' password 'masterkey'
> > > > page_size 2048
> > > >
> > > > before I can use above statement, I need to get the Connection
> > > > database which does not yet exist.FBBackupManager, I
> > > >
> > > > or
> > > >
> > > > If someone knows how to do this using Service API /
> > > > would appreciate the Source Code example.code should
> > > >
> > >
> > > You can indeed do it with the FBBackupManager. The following
> > > do it:
> > >
> > > BackupManager mgr = new FBBackupManager();
> > > mgr.setUser("sysdba");
> > > mgr.setPassword("masterkey");
> > > mgr.setHost("somehost");
> > > mgr.setVerbose(true);
> > > mgr.setLogger(System.out);
> > > mgr.setDatabase("/path/to/db.fdb");
> > > mgr.setBackupPath("/tmp/backed_up.fbk");
> > > mgr.backupDatabase();
> > > mgr.setRestorePageSize(2048);
> > > mgr.setRestoreReplace(true);
> > > mgr.restoreDatabase();
> > >
> > >
> > > - Gabriel
> > >
> >
> >
> >
>