---
title: 'Connect Multiple Databases'
description: 'Connect and switch between multiple ClickHouse databases in OpenLIT'
sidebarTitle: 'Connect Multiple Databases'
---

OpenLIT allows you to add and switch between multiple ClickHouse databases, which helps manage observability data, prompts, and secrets separately for various environments. This feature enables users to maintain distinct databases tailored to specific environments or tenants, all while using a single OpenLIT deployment for efficient data analysis. The active database you select will power the data displayed across different sections of the application.
## When to Use This Feature

This feature is particularly useful in the following scenarios:

- **Different Environments**: If you're running multiple environments, such as development, testing, and production, you can keep their data separate and easily switch between them as needed.

- **Multi-Tenancy**: When supporting multiple tenants, this feature allows you to maintain isolated datasets for each tenant, ensuring data privacy and organization.

- **Centralized Management**: Manage all your ClickHouse databases from a single OpenLIT deployment, simplifying your AI Engineering data architecture and reducing overhead.

## Get started

<Frame>
  <img src="/images/multiple-db.png" />
</Frame>

1. **Log in** to the OpenLIT.
2. Go to the **database configuration** page.
3. Click on the **Add new** option.
4. Enter the ClickHouse database configuration details.
5. Click **Save** to confirm.
6. Simply **enable** the desired database to view its data. 
7. The selected active database will power data shown on the dashboards, requests page, Prompt Hub, and Vault secrets.

---

<CardGroup cols={2}>
<Card title="Integrations" href="/latest/integrations/introduction" icon='circle-nodes'>
Integrate your AI Stack with OpenLIT 
</Card>
<Card title="Connections" href="/latest/connections/intro" icon='link'>
Connect to your existing Observablity Stack
</Card>
</CardGroup>
