Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 16th, 2011, 01:41 PM
andersonpow andersonpow is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Posts: 4 andersonpow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 45 sec
Reputation 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.

Reply With Quote
  #2  
Old February 17th, 2011, 01:51 AM
mIRCata mIRCata is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Location: Plovdiv. Bulgaria
Posts: 200 mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 6 h 50 m 14 sec
Reputation Power: 11
Quote:
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.

Reply With Quote
  #3  
Old February 17th, 2011, 05:08 AM
andersonpow andersonpow is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Posts: 4 andersonpow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 45 sec
Reputation Power: 0
Quote:
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...

Reply With Quote
  #4  
Old February 17th, 2011, 09:25 PM
andersonpow andersonpow is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Posts: 4 andersonpow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 45 sec
Reputation Power: 0
cmon guys, it cant be very hard

Reply With Quote
  #5  
Old February 18th, 2011, 01:45 AM
mIRCata mIRCata is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Location: Plovdiv. Bulgaria
Posts: 200 mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 6 h 50 m 14 sec
Reputation Power: 11
Quote:
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.

Reply With Quote
  #6  
Old February 18th, 2011, 11:42 AM
andersonpow andersonpow is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Posts: 4 andersonpow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 35 m 45 sec
Reputation Power: 0
Quote:
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.

Quote:
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
Quote:
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...

Reply With Quote
  #7  
Old February 25th, 2011, 07:50 AM
mIRCata mIRCata is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Location: Plovdiv. Bulgaria
Posts: 200 mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level)mIRCata User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 6 h 50 m 14 sec
Reputation Power: 11
Quote:
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 07:53 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > How to bkp and restore preventing users trying to access?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap