Subject | Re: [firebird-support] Re: Hibernate, alter table and single user |
---|---|
Author | Helen Borrie |
Post date | 2005-03-08T22:04:38Z |
At 08:53 PM 8/03/2005 +0000, you wrote:
gstat -h d:\path\to\test.gdb -u sysdba -pass masterkey
displays the header page and relevant database attributes, including the
shutdown status if the db is offline:
...
...
Attributes force write, database shutdown
to make sure that everything is OK, though. Things like...whether there is
a valid path to the database, whether dependencies are safely taken care
of, whether the script has quoted identifiers on "illegal" identifiers and
not otherwise (unnecessary q.i. are a life sentence to pain, IMO), et al.,
and also that the script ends with a CRLF.
As you'll see from the book, I break up scripts.
./heLen
>I am sitting at my C:\Program Files\Firebird\Firebird_1_5It's more secure to use -u sysdba -pass masterkey in the command line instead.
>directory. My first attempt was:
>
>bin\gfix -shut -at 0 test.gdb
>Your user name and password are not defined. Ask your database
>administrator to set up a Firebird login.
>
>On page 836 it said I could do this for a local connection, so I did:
>
>SET ISC_USER=SYSDBA
>SET ISC_USER=masterkey
>Then I ran the command again and I guess it worked. There was noThe check is to look at the attributes of the database header:
>error message, at least.
>
>1. Is there a command I could run that would visually confirm that I
>now have exclusive access?
gstat -h d:\path\to\test.gdb -u sysdba -pass masterkey
displays the header page and relevant database attributes, including the
shutdown status if the db is offline:
...
...
Attributes force write, database shutdown
>2. In parallel, I'm trying to figure out how to run a HibernateYes. I wouldn't do this myself without looking carefully over the script
>tool, SchemaExport, which should generate a DDL file containing
>commands to set up tables based on the Hibernate mapping files in
>their example. I'm hoping I can then manually send that DDL file to
>Firebird, and that the rest of the code in the Hibernate example
>will then work. To send the DDL file, would I do this:
>
>bin\isql.exe test.gdb -u sysdba -p masterkey -i foo.sql
>(where foo.sql is the hibernate-generated DDL file)
to make sure that everything is OK, though. Things like...whether there is
a valid path to the database, whether dependencies are safely taken care
of, whether the script has quoted identifiers on "illegal" identifiers and
not otherwise (unnecessary q.i. are a life sentence to pain, IMO), et al.,
and also that the script ends with a CRLF.
As you'll see from the book, I break up scripts.
./heLen