:02

El lun., 7 de agosto de 2023 4:56 p. m., fed <fury...@gmail.com> escribió:

> Hi,
>
> I have a derby network server running with some databases connected and I
> want to backup the databases directory with my backup utility.
> My idea is to connect to every database in the network server and call the
> freeze procedure, execute the backup of the databases directories and then
> call the unfreeze procedure on every db, but I have some doubts.
>
> Q1:
> I am going for every database to get a connection, execute
>
> CALL SYSCS_UTIL.SYSCS_FREEZE_DATABASE()
>
> and then close the connection. After this I execute the backup with my
> backup utility and then later after the backup is finished for every
> database get a new connection and execute:
>
> CALL SYSCS_UTIL.SYSCS_UNFREEZE_DATABASE()   , is this correct?
>
> From the example in the documentation it seems that I have to use the same
> connection to call the two stored procedures, but this is not required,
> right?
>
> public static void backUpDatabaseWithFreeze(Connection conn)
>       throws SQLException {
>     Statement s = conn.createStatement();
>     s.executeUpdate(
>         "CALL SYSCS_UTIL.SYSCS_FREEZE_DATABASE()");
>     *//copy the database directory during this interval*
>     s.executeUpdate(
>         "CALL SYSCS_UTIL.SYSCS_UNFREEZE_DATABASE()");
>     s.close();
> }
>
>
> Q2:
> If I stop the network server while the database is in "freeze" state when
> I restart it, it is still in "freeze" state and I have to call unfreeze on
> it?
> My concern is that It is not possible that I get stuck in the "freeze"
> state of the database, I can always "unfreeze" it, right?
>
> Q3:
> Last question, sorry for lots of questions: just to confirm even if in a
> freeze state I can acquire a connection and execute a read operation
> (select) on the database even in a transaction, right?
>
> Thanks for the help
> - fed
>
>
>
>
>

Reply via email to