<blockquote>
<p>how to run multi sample bitcoin-qt for one block data dir with different wallets?</p>
</blockquote>
<p>I expect you can't concurrently run two instances of bitcoin-qt using the same block-data directory.</p>
<p>This would be because both would be trying to update the same block files and get in each others way. The data likely would be corrupted if this were not prevented by file-level locking etc.</p>
<hr />
<p>Instead, I suspect the RPC API allows you to switch between two or more wallets using a single instance of bitcoin-qt (or bitcoind) using the  <a href="https://developer.bitcoin.org/reference/rpc/loadwallet.html" rel="nofollow noreferrer"><code>loadwallet</code></a> command.</p>

CC BY-SA 4.0
2024-02-09T12:22:08.887Z
2024-02-09T12:22:08.887Z
RedGrittyBrick
<pre><code>c:\data\bitcoin-qt -wallet=c:\dir\wal\ -datadir=c:\btcdata\ 
</code></pre>
<p>and</p>
<pre><code>c:\data\bitcoin-qt -wallet=c:\dir\wal2\ -datadir=c:\btcdata2\ 
</code></pre>
<p>take error</p>
<pre><code>sqlitedatabase: unable to obtain an exclusive lock on the database is it being used by another instance of bitcoin core
</code></pre>
<p>how to run multi sample bitcoin-qt for one block data dir with different wallets?</p>

<cli>
how multi sample run bitcoin-qt on windows
user148120
# how multi sample run bitcoin-qt on windows

(Asked by: username_0 on 2024-02-08)

```
c:\data\bitcoin-qt -wallet=c:\dir\wal\ -datadir=c:\btcdata\ 

```

and

```
c:\data\bitcoin-qt -wallet=c:\dir\wal2\ -datadir=c:\btcdata2\ 

```

take error

```
sqlitedatabase: unable to obtain an exclusive lock on the database is it being used by another instance of bitcoin core

```

how to run multi sample bitcoin-qt for one block data dir with different wallets?

**Tags:** cli


---

## 1 answers

### Answer by username_1 on 2024-02-09. Score: 0

> how to run multi sample bitcoin-qt for one block data dir with different wallets?

I expect you can't concurrently run two instances of bitcoin-qt using the same block-data directory.

This would be because both would be trying to update the same block files and get in each others way. The data likely would be corrupted if this were not prevented by file-level locking etc.

---

Instead, I suspect the RPC API allows you to switch between two or more wallets using a single instance of bitcoin-qt (or bitcoind) using the [`loadwallet`](https://developer.bitcoin.org/reference/rpc/loadwallet.html) command.


---

