> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IBM DB2

> Database connection for an IBM DB2 server

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Use this to connect Alumio to an IBM DB2 database server. Once it is set up, the connection can be reused by other features that read from or write to your DB2 database. The connection always talks to the server over TCP/IP, so you only need to supply where the server lives and how to sign in.

This documentation describes: [Schema](/schemas/database-connection/ibm-db2)

## Fields

<FormField property="hostname" label="Server hostname" required>
  The address of the DB2 server, for example `db2.example.com`. This can be a domain name or an IP address.
</FormField>

<FormField property="port" label="Server port" required>
  The network port the server listens on. Defaults to `50000`, the standard DB2 port. Change it only if your server uses a different port.
</FormField>

<FormField property="database" label="Database name" required>
  The name of the database on the server that you want to work with.
</FormField>

<FormField property="username" label="Username" required>
  The username (or instance name) used to sign in to the database server.
</FormField>

<FormField property="password" label="Password" required>
  The password used to sign in. You can reference an environment variable here instead of typing the secret directly.
</FormField>

## Sample data

A typical IBM DB2 connection:

| Field           | Value                      |
| --------------- | -------------------------- |
| Server hostname | `your-db-host.example.com` |
| Server port     | `50000`                    |
| Database name   | `WAREHOUSE`                |
| Username        | `db2inst1`                 |
| Password        | `your-password`            |

```json theme={null}
{
    "hostname": "your-db-host.example.com",
    "port": "50000",
    "database": "WAREHOUSE",
    "username": "db2inst1",
    "password": "your-password"
}
```

Connection credentials are shown here as placeholders. For the password you can reference an environment variable instead of typing the secret directly; see [Placeholders](/references/placeholders) for the full syntax.

```json Configuration theme={null}
{
  "prototype": "ibm-db2",
  "parameters": {
    "hostname": "your-db-host.example.com",
    "port": "50000",
    "database": "WAREHOUSE",
    "username": "db2inst1",
    "password": "your-password"
  }
}
```
