> For the complete documentation index, see [llms.txt](https://docs.primeur.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.primeur.com/data-one-installation-manager/cli-and-configuration-files/dataonedbmgr.sh-reference.md).

# dataonedbmgr.sh reference

## **Introduction to the Data One database update**

`dataonedbmgr.sh` is a command that assists the Administrator in **updating the Data One database before installing product update packages**. This command will analyze and process, in sequence, all the pending installation update packages stored in the `<DOIM_HOME>/pkg-repo/tf-inbox` folder.

To **run SQL scripts from DOIM control node in an assisted way** see `dataonedbmgr.sh -sqlrun` here below.

The database schema and base product data update is driven by the `<DOIM_HOME>/config/dataonedb.cfg` file. Before running the `dataonedbmgr.sh` database update command, make sure you carefully fill in all the required parameters as described in the [reference page of the `dataonedb.cfg` configuration file](/data-one-installation-manager/cli-and-configuration-files/dataonedb.cfg-reference.md).

NOTE: It is recommended to perform a full database backup before updating your database with dataonedbmgr.sh.

## **dataonedbmgr.sh -sqlrun**

To run SQL scripts from the DOIM control node in an assisted way, make sure you filled it all the required database configuration parameters in `<DOIM_HOME>/config/dataonedb.cfg` (see the [`dataonedb.cfg` reference](/data-one-installation-manager/cli-and-configuration-files/dataonedb.cfg-reference.md) page).

### **Syntax**

Run the command from `<DOIM_HOME>/bin`:

* `./dataonedbmgr.sh -sqlrun`

### **Description**

This **dataonedbmgr.sh** verb runs SQL scripts from DOIM control node.

### **Checking the command outcome**

The command outcome can be checked at several levels of detail:

* On the console output, to have a very short outcome indicator
* On the global log file `<DOIM_HOME>/log/dataonedbmgr.log`
* On script-specific log files, one for each distinct SQL script `<DOIM_HOME>/log/dataonedbmgr_<packagename>_<sqlscriptname>.log`

The command processes all the required DDL and DML SQL scripts in sequence. When an error occurs, the command immediately terminates, reporting a detailed error message in the logs.

Once the cause of the error has been analyzed by an Administrator and resolved, the command can be safely run again because all DDL and DML SQL scripts that were successfully processed in a previous run will be automatically skipped.
