与Derby有其他连接(只读) [英] Have additional connections to Derby (read-only)

查看:207
本文介绍了与Derby有其他连接(只读)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想做的事情:我的应用程序与Derby DB具有完整的连接,我想并行地(使用其他工具)在DB(只读)中四处浏览。

What I want to do: My application has a full connection to a Derby DB, and I want to poke around in the DB (read-only) in parallel (using a different tool).

我不确定Derby实际在内部如何工作,但是我知道我只能与Derby DB建立1个活动连接。
但是,由于数据库仅由硬盘上的文件组成,我是否应该以只读模式打开与其相连的其他连接?

I'm not sure how Derby actually works internally, but I understand that I can have only 1 active connection to a Derby DB. However, since the DB is only consisting of files on my HDD, shouldn't I be able to open additional connections to it, in read-only mode?

是否有任何工具可以做到这一点?

Are there any tools to do just that?

推荐答案

有两种方法可以运行Apache Derby DB。

There are two possibilities how to run Apache Derby DB.


  1. 嵌入:您可以在应用程序中运行数据库→只能建立一个连接

  2. 客户端:您可以在单独的过程中将数据库作为服务器启动→具有许多连接的经典数据库

  1. Embedded: You run DB within your application → only one connection possible
  2. Client: You start DB as server in separate process → classic DB with many connections

您可以根据驱动程序大小。如果驱动程序有2MB以上的空间供您使用嵌入式版本。

You can recognize the type upon driver size. If the driver has more then 2MB that you use embedded version.

启动derby引擎(服务器或嵌入式)时,它将独占使用

When you startup the derby engine (server or embedded) it gets exclusive access to database files.


如果需要从多个Java虚拟机(JVM)访问单个数据库,则需要放置服务器解决方案到位。您可以允许来自需要访问该数据库的多个JVM的应用程序连接到服务器。

If you need to access a single database from more than one Java Virtual Machine (JVM), you will need to put a server solution in place. You can allow applications from multiple JVMs that need to access that database to connect to the server.

有关详细信息,请参见双重启动系统行为

For details see Double-booting system behavior.

这篇关于与Derby有其他连接(只读)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆