# Provision a warehouse

> Create your first sanda warehouse, add more, and recover if provisioning stops partway.

Nothing can land in your workspace until a warehouse exists, so provisioning is the first step after signing up. sanda creates the database for you; there is no host, password or database name to fill in.

## Before you start

- You need to be an owner or admin. Other members see the **Warehouse** page but cannot provision.
- Your edition sets how many warehouses you can hold: 1 on Basic, 3 on Standard (and on a trial) and 50 on Enterprise. See [sanda warehouse](https://docs.sanda-os.com.au/warehouse) for the full comparison.

## Create your first warehouse

:::steps
1. **Open the Warehouse page.** In the console, go to **Data · Warehouse**. Before you have a warehouse, the page shows **Let sanda provision it**, and a **Pricing** panel with the storage and compute rates and the most a warehouse can be set to.

   ![The Let sanda provision it panel with the Provision warehouse button](https://docs.sanda-os.com.au/media/warehouse-provision.png "The first-run panel on the Warehouse page")
2. **Press Provision warehouse.** The button reads **Provisioning…** while sanda works. The console says it takes under a minute.
3. **Check the status.** When it finishes, the new card shows the status `healthy`, and buttons for **Explore**, **Optimise** and **SQL shell** appear on it.
4. **Bring data in.** A healthy warehouse with nothing in it shows **Your warehouse is ready**, with two ways on: **Connect a source** and **Upload a CSV**.
:::

## What sanda sets up

While the status is `provisioning`, sanda:

1. creates a new PostgreSQL database in your workspace's [data region](https://docs.sanda-os.com.au/reference/glossary#data-region);
2. creates its schemas: `raw`, `derived`, `mapping`, `search` and `meta` (see [sanda warehouse](https://docs.sanda-os.com.au/warehouse)), plus a private working area the managed sync uses;
3. creates separate logins for loading, modelling, reading and your own building, each with only the access its job needs, and stores their credentials encrypted;
4. applies your edition's limits from the first minute, so a runaway query is stopped rather than reviewed afterwards;
5. takes a first storage and compute reading, which is the baseline every later reading is measured from.

None of the credentials is shown to you. That is deliberate: the console, cherry and the sync all connect on your behalf.

## Names

You do not name a warehouse. sanda names the database after your workspace:

- your first warehouse is `becca_` followed by eight characters (digits and the letters a to f), for example `becca_1a2b3c4d`;
- each further one adds an underscore and four more, for example `becca_1a2b3c4d_9f3e`.

The name is what you see in the Explorer, the SQL shell and the Modelling warehouse picker.

## Add another warehouse

Press **New warehouse** at the top of the **Warehouse** page. It appears once you have a warehouse of your own.

If your workspace is already at its limit, sanda tells you how many your edition holds and how many you have. Delete one you no longer need, or move to a larger edition.

Three things to know before you add another:

- **Every warehouse is in your workspace's data region.** A new one is created in the same region as the first, and a workspace cannot hold a warehouse anywhere else.
- **Each connection lands in one warehouse.** You choose it on the **Configure** step when you add the connection.
- **The semantic fluid reads one warehouse: the newest healthy one you own.** Views and tables in your other warehouses are real and readable in the Explorer and the SQL shell, but you cannot put them on the fluid.

## If provisioning fails

A failed attempt leaves a card behind with the reason, rather than nothing at all. The card shows the status `error` and a **Retry provisioning** button. A healthy warehouse with no credentials on file shows the same button under the message **No credentials on file**.

:::steps
1. **Read the reason on the card.** A refusal such as an edition limit says what to do. A failure partway through says **Provisioning stopped partway** and gives a short reference.
2. **Press Retry provisioning.** sanda re-runs the setup on the same database, with the same name and new passwords. It never creates a second warehouse, so a retry cannot use up a second slot.
3. **If it fails again, contact sanda support** and quote the reference from the card.
:::

If you would rather start again, use **Delete warehouse** on the failed card.

## Delete a warehouse

:::danger
Deleting a warehouse drops its database and everything landed in it. There is no undo. Take a copy of anything you need first: see [Take your data with you](https://docs.sanda-os.com.au/warehouse/export).
:::

**Delete warehouse** is disabled while any connection still lands in the warehouse. The card says how many, for example **3 connections land here: repoint or delete them before deleting this warehouse**. Once none remain, press **Delete warehouse**, then **Yes, delete it** (or **Keep it** to back out).

Usage already measured stays in your billing history, and metering stops when the warehouse is deleted.

:::links
- [Upload a CSV](https://docs.sanda-os.com.au/connections/upload-a-csv): Put a file in your new warehouse.
- [Add a connection](https://docs.sanda-os.com.au/connections/add-a-connection): Sync a business system into it.
- [Usage, budgets and suspension](https://docs.sanda-os.com.au/warehouse/usage-and-suspension): How limits and budgets protect your bill.
:::
