Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Reference | 2025.1

# p4 dbschema

Report information about metadata in the database on the P4 Server.

## Syntax

    p4 [g-opts] dbschema [tablename[:tableversion]] ...
    p4 [g-opts] dbschema [-A] [tablename] ...

Syntax conventions

## Description

The `p4 dbschema` command is intended for systems integrators. This command provides tagged output about the database structure in which the P4 Server stores metadata.

- To get the current version of all tables, use p4 dbschema
- To get all versions of all tables, use p4 dbschema -A
- To get the current version of a specific table, use p4 dbschema tablename, where the tablename is the name of the corresponding `db.`tablename`` file in the P4 Server root directory. Table names are the file names that start with db., such as db.archmap and db.user.
- To get all versions of particular table, use p4 dbschema -A tablename
- To restrict output to a specified version of a specified table, use the tablename[:tableversion] syntax, such as db.rev:8

See the Examples that follow as well as the P4 Server Database Schema Documentation.

## Options

`tablename` | Restrict output to the specified table name.
`tableversion` | Restrict output to the specified table version.
-A | Display information about all versions.
`g-opts` | See Global options.

## Usage notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
N/A | N/A | `super` available to a service user

## Examples

Command | Display information about ...
--- | ---
p4 dbschema | he current version of all database tables.
p4 dbschema -A | all versions of all database tables.
p4 dbschema db.rev db.have | the current version of the specified tables.
p4 dbschema -A db.rev | all versions of the specified table.
p4 dbschema db.user db.rev:8 | the current version of the `db.user` database table and version 8 of the db.rev table.

Your search for returned results