Firebird 4 – Shared memory area is probably already created by another engine instance in another Windows session

huangapple go评论90阅读模式
英文:

Firebird 4 - Shared memory area is probably already created by another engine instance in another Windows session

问题

我们使用Firebird,并打算从FB 2.5升级到FB 4.0.2.2816,但在进行数据库还原时遇到了一个奇怪的问题。

当我们在命令提示符中使用以下命令还原数据库:

gbak.exe -c -o -v -user {ProgramAdmin} -password {Password} -page_size 8192 "C:\MyFolder\fb4.fbk" "C:\MyFolder\Restore.fdb"

我们收到以下错误消息:

gbak:打开文件 C:\MyFolder\fb4.fbk 
gbak:可传输备份 -- 数据以XDR格式存储
gbak:		备份文件已压缩
gbak:备份版本为11
gbak: 错误: 共享内存区域可能已被另一个引擎实例在另一个Windows会话中创建
gbak: 错误: 无法创建数据库 C:\MyFolder\Restore.fdb
gbak:由于错误而在完成之前退出

我们以Windows 10用户的身份运行此命令,该用户是受限域用户(不是管理员),这个消息出现的频率约为90%,另外的10%正常,数据库如预期还原。

没有其他Firebird实例在运行,也没有其他用户登录到计算机。

如果我们以本地管理员身份运行命令提示符,错误似乎消失了。

所以我不确定这是否是用户访问问题还是网络访问问题。以受限用户身份备份数据库总是正常的。

{ProgramAdmin}用户被设置为RDB:ADMIN,但不是SYSDBA,我们已尝试将其设置为SYSDBA,或在参数中不使用用户名/密码,但仍然出现错误。

这在Firebird 2.5中工作正常,所以看起来是FB 4的问题。

有人以前遇到过这个问题或者有任何解决方法吗?

英文:

We use Firebird and are looking to move from FB 2.5 to FB 4.0.2.2816 and have run into an odd problem doing database restores.

When we restore a database using the following command in command prompt

gbak.exe -c -o -v -user {ProgramAdmin} -password {Password} -page_size 8192 "C:\MyFolder\fb4.fbk" "C:\MyFolder\Restore.fdb"

We get the error message

gbak:opened file C:\MyFolder\fb4.fbk 
gbak:transportable backup -- data in XDR format
gbak:		backup file is compressed
gbak:backup version is 11
gbak: ERROR:Shared memory area is probably already created by another engine instance in another Windows session
gbak: ERROR:failed to create database C:\MyFolder\Restore.fdb
gbak:Exiting before completion due to errors

The Windows 10 user we run this as is a limited domain user (not an admin) with this message appearing ~90% of the time, with the other 10% been ok and the database restoring as expected.

No other firebird instances are running, and no other user is logged into the computer.

If we run command prompt as a local admin, the error appears to go away.

So I am not sure if this is a user access problem or a network access problem. Backing up the database as the limited user works 100% of the time.

The {ProgramAdmin} user is set as RDB:ADMIN but is not SYSDBA, we have tried it with SYSDBA and without a username / password in the parameters and that still raised the error.

This worked fine in Firebird 2.5 so it looks to be a FB 4 thing.

Has anyone encountered this before or have any idea how to solve the problem?

答案1

得分: 2

在Windows上,Firebird 2.5与Firebird 3.0及更高版本的区别在于,如果没有指定服务器,Firebird 2.5会使用XNET连接到本地服务器,而Firebird 3.0及更高版本默认使用嵌入引擎。

据我所知,如果你的Firebird服务器作为服务运行,这可能导致错误(如果我没记错,下一个版本将修复此错误)。为了避免这个错误,你需要确保通过服务器连接,而不是使用嵌入引擎。

为此,请将 "C:\MyFolder\Restore.fdb" 替换为 "xnet://C:\MyFolder\Restore.fdb"(使用XNET)或 "localhost:C:\MyFolder\Restore.fdb""inet://localhost/C:\MyFolder\Restore.fdb"(都使用TCP/IP)。例如:

gbak.exe -c -o -v -user {ProgramAdmin} -password {Password} -page_size 8192 "C:\MyFolder\fb4.fbk" "xnet://C:\MyFolder\Restore.fdb"

英文:

The difference between Firebird 2.5 and Firebird 3.0 and higher is that - on Windows - if you didn't specify a server, Firebird 2.5 would connect to the local server with XNET, while Firebird 3.0 and higher use the embedded engine by default.

As far as I'm aware, that is what is causing the error here if your Firebird server is running as a service (IIRC, there is a bug fix that will prevent this error in the next version). To avoid this error, you will need to make sure you connect through the server instead of using the embedded engine.

To do that, replace "C:\MyFolder\Restore.fdb" with "xnet://C:\MyFolder\Restore.fdb" (uses XNET) or "localhost:C:\MyFolder\Restore.fdb" or "inet://localhost/C:\MyFolder\Restore.fdb" (both use TCP/IP). For example:

gbak.exe -c -o -v -user {ProgramAdmin} -password {Password} -page_size 8192 "C:\MyFolder\fb4.fbk" "xnet://C:\MyFolder\Restore.fdb"

huangapple
  • 本文由 发表于 2023年6月5日 23:24:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76407890.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定