How to shut down just one Database?

99 views
Skip to first unread message

Luciano Rodrigues Nunes Mendes

unread,
May 25, 2024, 8:58:17 PMMay 25
to firebird-support
Hey guys,

I have a Firebird 4.0 server with 6 databases and I need to update one of the databases. Is it possible to turn off (offline) only the database that I need to update for local access and keep the other databases active (online) for remote access or is the only way to do this is to turn off the Firebird service?

Thanks in advance,
Luciano

Dimitry Sibiryakov

unread,
May 26, 2024, 5:28:28 AMMay 26
to firebird...@googlegroups.com
Use 'gfix -shutdown' with desired mode.

--
WBR, SD.

Mark Rotteveel

unread,
May 26, 2024, 6:02:23 AMMay 26
to firebird...@googlegroups.com
See the gfix documentation for more information:
https://firebirdsql.org/file/documentation/html/en/firebirddocs/gfix/firebird-gfix.html#gfix-dbstartstop
--
Mark Rotteveel

Luciano Rodrigues Nunes Mendes

unread,
May 26, 2024, 10:15:14 PMMay 26
to firebird...@googlegroups.com
Hi Dimitry and Mark,

Thank you very much for your prompt reply!

I tried to shut down a database that has some clients connected to it and it is returning the following error message:

gfix.png

Could you say what could be happening?

Thanks in advance,
Luciano


--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/299d5eb1-3e32-476c-b6b6-6c6cc004408a%40lawinegevaar.nl.

Stefan Heymann

unread,
May 27, 2024, 3:33:50 AMMay 27
to firebird...@googlegroups.com
> I tried to shut down a database that has some clients connected to it and
> it is returning the following error message:

You should provide the complete database string, not only the alias name.

So try something like this:

gfix -user sysdba -password masterkey myservername:chronos_cin -shut full -force 0


Best Regards

Stefan

Dimitry Sibiryakov

unread,
May 27, 2024, 5:03:43 AMMay 27
to firebird...@googlegroups.com
Luciano Rodrigues Nunes Mendes wrote 27.05.2024 4:14:
> Could you say what could be happening?

You tried to use embedded access in superserver mode and you conflict with
another instance of engine. Exactly as written in the error text.

--
WBR, SD.

Luciano Rodrigues Nunes Mendes

unread,
May 29, 2024, 10:56:04 PMMay 29
to firebird...@googlegroups.com
Hi Stefan and Dimitry

This right here is exactly what I need:
  • gfix -user sysdba -password masterkey -shutdown -force_shutdown 0 LOCALHOST:CHRONOS_CIN
  • gfix -user sysdba -password masterkey -online LOCALHOST:CHRONOS_CIN
Thank you very much for your help!

Best Regards,
Luciano

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.

Luciano Rodrigues Nunes Mendes

unread,
May 30, 2024, 10:12:41 PMMay 30
to firebird...@googlegroups.com
Hey guys,

Is there a way to restrict access to the database to just one user, for example: SYSDBA, or can any database owner have access to the database while it is offline?

Thanks in advance,
Luciano

Stefan Heymann

unread,
Jun 3, 2024, 8:06:22 AMJun 3
to firebird...@googlegroups.com
> Is there a way to restrict access to the database to just one user, for
> example: SYSDBA, or can any database owner have access to the database
> while it is offline?

You can restrict it to one user, which can be SYSDBA or the owner, by using

-shutdown single

in the GFIX call.

There are four options for -shutdown and -online:

* normal
* multi
* single
* full


Best Regards

Stefan

Luciano Rodrigues Nunes Mendes

unread,
Jun 9, 2024, 12:21:27 PMJun 9
to firebird...@googlegroups.com
Hi Stefan,

Thank you very much for your support.

The command to shutdown the database worked correctly but the error message when a non-admin user tries to connect to the shut down database is not the same as when trying to authenticate via SRP256 or WIN_SSPI. Is this a bug? The WIN_SSPI message does not seem so clear to the user that the database is turned off.

SRP256_vs_WINSSPI.png
Thanks in advance,
Luciano

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.

Stefan Heymann

unread,
Jun 12, 2024, 8:44:50 AMJun 12
to firebird...@googlegroups.com
Luciano,

> The command to shutdown the database worked correctly but the error message
> when a non-admin user tries to connect to the shut down database is not the
> same as when trying to authenticate via SRP256 or WIN_SSPI. Is this a bug?
> The WIN_SSPI message does not seem so clear to the user that the database
> is turned off.

The two messages are different from each other because the two drivers obviously use their own wording for error situations. Is this a bug? Not really. But it's not good either.

Best Regards

Stefan






Reply all
Reply to author
Forward
0 new messages