# Connecting to different databases with multiple client instance

**URL:** https://discuss.tryton.org/t/connecting-to-different-databases-with-multiple-client-instance/7854
**Category:** System Administrator
**Created:** [September 14, 2024, 3:15pm UTC](https://discuss.tryton.org/t/connecting-to-different-databases-with-multiple-client-instance/7854 "2024-09-14T15:15:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cjm51213](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/cjm51213/32/3084_2.png) [@cjm51213](https://discuss.tryton.org/u/cjm51213)
#### Post date: [September 14, 2024, 3:15pm UTC](https://discuss.tryton.org/t/connecting-to-different-databases-with-multiple-client-instance/7854/1 "2024-09-14T15:15:39Z")

</div>

Hi Folks,

Both Trytond.conf and Tryton.conf reference a database. What happens if they reference different databases?

Suppose I have several companies – “Company A”, “Company B”, and “Company C”. I have corresponding PostgreSQL databases, “CompanyA”, “CompanyB” and “CompanyC”. Can I specify my database of interest in the Tryton client? And maybe run several copies of the client at once to see multiple companies simultaneously? Or will I be restricted by what the Tryton server has been told, meaning I’ll need a copy of the server for each different database I need?

Thanks for the help,

Chris.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 14, 2024, 3:25pm UTC](https://discuss.tryton.org/t/connecting-to-different-databases-with-multiple-client-instance/7854/2 "2024-09-14T15:25:21Z")

</div>

> [@cjm51213](#):
>
> What happens if they reference different databases?

It does not matter because the client configuration is an internal file that exists just to restore user preferences at startup.

> [@cjm51213](#):
>
> Can I specify my database of interest in the Tryton client?

You already do it at login because the client request you to select a database.

> [@cjm51213](#):
>
> And maybe run several copies of the client at once to see multiple companies simultaneously?

For the desktop client:  
You can launch the client as much times you want as long as it is for different combinaison of server and database.  
If you try to login to a server/database for which you have already a client connected, the new client will stop and the existing client will be raised.

For the web client:  
You can open as many browser/tab as you want. But the browser will be kept logged to only one server/database couple at a time.

> [@cjm51213](#):
>
> Or will I be restricted by what the Tryton server has been told, meaning I’ll need a copy of the server for each different database I need?

No because the server is not started for a specific database.

Side note, it is also possible to create multiple companies on the same database. This is only useful if the companies share a common referential (like same product catalogue, same parties etc.).

---

<div class="post-metadata">

### Author: ![cjm51213](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/cjm51213/32/3084_2.png) [@cjm51213](https://discuss.tryton.org/u/cjm51213)
#### Post date: [September 14, 2024, 3:42pm UTC](https://discuss.tryton.org/t/connecting-to-different-databases-with-multiple-client-instance/7854/3 "2024-09-14T15:42:19Z")

</div>

Hi Ced,

That was exceptionally helpful. You answered all of my questions clearly and you even answered one I hadn’t yet asked, but probably would have at some point.

Outstanding!

Thanks for the help,

Chris.

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [September 15, 2024, 3:42am UTC](https://discuss.tryton.org/t/connecting-to-different-databases-with-multiple-client-instance/7854/4 "2024-09-15T03:42:49Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
