#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0

    How to bkp and restore preventing users trying to access?


    Hello guys, usually I unplug lan cable to prevent users acess to my database.gdb, so...

    How can i assure bkp and restore process preventing users trying to access?

    T.y.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Location
    Plovdiv. Bulgaria
    Posts
    226
    Rep Power
    13
    Originally Posted by andersonpow
    Hello guys, usually I unplug lan cable to prevent users acess to my database.gdb, so...

    How can i assure bkp and restore process preventing users trying to access?

    T.y.
    Use another name for the restored DB and rename the file after that.
    If you use alias - comment it when you do the restore.
    But I think that the Firebird won't give access to a database that is in process of restoration. I'm not 100% sure but the database file is in shutdown state when you do restore. And when the restore is complete Firebird brings the database online again if there are no errors.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0
    Originally Posted by mIRCata
    Use another name for the restored DB and rename the file after that.
    If you use alias - comment it when you do the restore.
    But I think that the Firebird won't give access to a database that is in process of restoration. I'm not 100% sure but the database file is in shutdown state when you do restore. And when the restore is complete Firebird brings the database online again if there are no errors.
    Yes, you right, on restore firebirg stays in shutdown mode, but it doenst happen in backup mode. when backup is running users can access flawlessly the database... I just wondering if there is any kind command to avoid it or stop access to start backup process...
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0
    cmon guys, it cant be very hard
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Location
    Plovdiv. Bulgaria
    Posts
    226
    Rep Power
    13
    Originally Posted by andersonpow
    cmon guys, it cant be very hard
    Use gfix to shutdown the database manually before the backup.
    And bring it online after restore.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    4
    Rep Power
    0
    Originally Posted by mIRCata
    Use gfix to shutdown the database manually before the backup.
    And bring it online after restore.
    Ty Dude, we getting close, but look this article.

    Exclusive Access When a database is in a shutdown state, SYSDBA or the owner can log in and have exclusive access. However, watch out for these “gotchas”:

    •If either the owner or SYSDBA was already logged in when the shutdown took effect, the server will not block the other from logging in once the shutdown is ineffect.

    •Once either SYSDBA or the owner logs in after the shutdown, the other will be blocked from logging in. That’s good. If the same user wants to log in again, it will be permitted. That’s not so good. This puts the onus on the SYSDBA or owner user who needs exclusive access to ensure that either itself or the other is not logged in somewhere, using a visual admin tool, an SQL monitor, another command-line tool, or even another gfix option, for example. Once you get exclusive access, keep it exclusive—don’t start up more than one application.
    After reading this article from
    The Firebird Book:
    A Reference for Database Developers HELEN BORRIE
    reading the second blackball I got a doubt...how to ensure users to NOT try to connect...after all, users uses the same sysdba / masterkey password to connect on database...
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2006
    Location
    Plovdiv. Bulgaria
    Posts
    226
    Rep Power
    13
    Originally Posted by andersonpow
    Ty Dude, we getting close, but look this article.



    After reading this article from

    reading the second blackball I got a doubt...how to ensure users to NOT try to connect...after all, users uses the same sysdba / masterkey password to connect on database...
    Change the user's password and shutdown the database. You can use force shutdown, but be careful. After the restore return the old password
    Last edited by mIRCata; February 25th, 2011 at 08:53 AM.

IMN logo majestic logo threadwatch logo seochat tools logo