New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gbak requires exclusive access [CORE4132] #4459
Comments
Commented by: @dyemanov 1) gbak -b c:\temp\test.fdb c:\temp\test.fbk Without a host name, an embedded access is used. If SharedDatabase = false in your firebird.conf (which is a default), then an error is expected (multiple processes try to share a database file). 2) gbak -b 127.0.0.1/3051:c:\temp\test.fdb c:\temp\test.fbk -user testuser -password testpwd With a host name, you connect to the same server process, but your user is not a privileged one, hence the error. 3) gbak -b 127.0.0.1/3051:c:\temp\test.fdb c:\temp\test.fbk -user sysdba -password masterkey This one smells like a bug. |
Commented by: Sean Leyne (seanleyne) Thomas, Given Dmitry's comments, please edit the case details to focus on the 1 real bug. |
Modified by: Thomas Beckmann (thbeckmann)description: Consider this testcase: isql -user testuser -password testpwd Now: Open second console and run isql Back to first console try Try try try Am I missing something or is this a bug? => Consider this testcase: isql -user testuser -password testpwd Now: Open second console and run isql Back to first console try try try Am I missing something or is this a bug? |
Commented by: Thomas Beckmann (thbeckmann) While SharedDatabase was not set, gbak with embedded server would not work - it's different behavior than with 2.5, but fine with me. User "testuser" is ADMIN and creator of the database and really should be able to gbak database as SYSDBA should be able too, also... |
Commented by: Sean Leyne (seanleyne) Please retry without performing initial backup/restore. I suspect that the gbak will run without issue, even with an active connection. |
Commented by: @dyemanov Thomas, > User "testuser" is ADMIN and creator of the database I don't see this given the command line: gbak -rep c:\temp\test.fbk c:\temp\test1.fdb Do you have ISC_USER set to 'testuser' behind the scenes? |
Commented by: Thomas Beckmann (thbeckmann) No, Dimitri, not on the one connecting directly - via embedded, as you stated correctly - and that will not work because of SharedDatabase settings. But I provided two examples explicitly connecting localhost, both with explicit user/password, one beeing admin and owner of db, the other beeing SYSDBA, both failed. And, Sean, gbak does not run if there's a second connection to the database. First gbak-restore is just to show, that everything works fine when there's no second connection on the database. |
Commented by: @dyemanov Confirmed. |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Alpha 2 [ 10560 ] |
Commented by: Thomas Beckmann (thbeckmann) Thanx. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Thomas Beckmann (thbeckmann)
Consider this testcase:
isql -user testuser -password testpwd
create database c:\temp\test.fdb
exit;
Now:
gbak -b c:\temp\test.fdb c:\temp\test.fbk
gbak -rep c:\temp\test.fbk c:\temp\test1.fdb
works fine
Open second console and run isql
isql 127.0.0.1/3051:c:\temp\test.fdb -user testuser -password testpwd
Back to first console try
isql 127.0.0.1/3051:c:\temp\test.fdb -user testuser -password testpwd
exit;
works fine.
try
gbak -b 127.0.0.1/3051:c:\temp\test.fdb c:\temp\test.fbk -user testuser -password testpwd
yields to
gbak: ERROR:Unable to perform operation. You must be either SYSDBA or owner of the database
gbak:Exiting before completion due to errors
try
gbak -b 127.0.0.1/3051:c:\temp\test.fdb c:\temp\test.fbk -user sysdba -password masterkey
yields to
gbak: ERROR:Unable to perform operation. You must be either SYSDBA or owner of the database
gbak:Exiting before completion due to errors
Am I missing something or is this a bug?
Commits: 8524f63 FirebirdSQL/fbt-repository@66abced
The text was updated successfully, but these errors were encountered: