Subject | Re: Target shutdown mode is invalid for database |
---|---|
Author | patrick_marten |
Post date | 2013-01-24T07:57:06Z |
> >I did some more research. When the state is "force write" (according to gstat), then starting up the database will fail because of the hierarchy, right?Yes, I've figured it out afterwards, when I've done some tests with gstat. The relevant attributes are "single-user maintenance", "multi-user maintenance", "full shutdown" depending on the state used like described in http://www.firebirdsql.org/file/documentation/reference_manuals/user_manuals/html/gfix-dbstartstop.html
> >
> >The articel says "This hierarchy is important, you cannot shutdown a database to a higher or equal level that it currently is, nor can you startup a database to a lower or equal level."
> >
> >It looks as if the database get's restarted somewhere else already, when I try to restart it, so that the level is "force write" again, which equals to "normal" (I think), i.e. it fails, correct?
>
> Force write is a different attribute altogether, unrelated to whether the database is online or not. "online" gives all authenticated users full access.
Like I said in the initial message, I was doing a full shutdown, some updates, back & restore, restart. It looks that after the datatabse gets restored, it's online already, so the last step - i.e. restarting it - "fails". It probably not really a fail or error, but for some reason my colleague was / is checking the log for "ERROR" and an entry like "Target shutdown mode is invalid for database" and was returning false, so that all steps afterwards weren't executed properly.
As far as I see, it doesn't make sense to check the log for "Target shutdown mode is invalid for database" as it seems to be just a note and as the database was already online, the attempt to start it simply doesn't change anything, right? Then I would just need to remove that part of the code. Or can the attemot to start a database, which is online already, cause any problems?
> "Full" is an off-line state that locks out ALL users, including sysdba, owner, etc. As a database can't be both online and off-line at the same time, the arguments are invalid.I'm not allowing my application users to log in as sysdba, that's right.
> You're not allowing your application users to log in as sysdba, are you? "Single" is the only off-line state that gives exclusive access to a single instance of sysdba, owner or equivalent.
Do the quotes above mean, that I shouldn't shutdown the database using "full" and use "single" instead?