Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

databases

Manage Grooper databases from the command line.

Remarks

The databases command group enables you to manage Microsoft SQL Server databases used by Grooper directly from the command line, without needing to use SQL Server Management Studio or other external tools.

With these commands, you can quickly list all databases on a server, create new databases for use as Grooper repositories, or delete databases that are no longer needed. This streamlines the process of setting up new environments, preparing repositories, or cleaning up after migrations and tests.

The databases group is designed to make essential database operations accessible and efficient for Grooper administrators, supporting both Windows and SQL authentication, as well as built-in accounts for containerized environments.

Use these commands to prepare, maintain, and clean up your Grooper database infrastructure, all from within the GCC environment.

For help on a specific command, use:
gcc help databases <command>

Commands

Below are the commands in this group


create <serverName> <databaseName> [user] [password]

Create a new MSSQL database for use as a Grooper repository.

Creates a new, empty database on the specified SQL Server. This is typically used to prepare a new repository for Grooper. The command connects to the server using the provided credentials and creates the database with the given name.

If the database already exists, the command will fail.

Examples:

  1. Create a new database using Windows authentication:
    gcc databases create MyServer GrooperRepo

  2. Create a new database using SQL authentication:
    gcc databases create MyServer GrooperRepo sa MyPassword

  3. Create a new database using a built-in account (for Docker):
    gcc databases create MyServer GrooperRepo "NT AUTHORITY\NetworkService"

serverName

The name or network address of the SQL Server instance where the database will be created. Required.

databaseName

The name of the new database to create. This must be unique on the server and conform to SQL Server naming rules.

user

The user name for SQL authentication. Leave blank to use Windows authentication. When running in a Docker container, use a built-in account such as "NT AUTHORITY\NetworkService" or "NT AUTHORITY\SYSTEM".

password

The password for the specified user. Leave blank for Windows authentication or built-in accounts. If set to a single question mark ("?"), you will be prompted to enter the password securely.

delete <serverName> <databaseName> [user] [password]

Delete an MSSQL database from the specified server.

Permanently deletes the specified database from the SQL Server. This operation cannot be undone and will destroy all data in the database. The command will prompt for confirmation before proceeding, and will not delete a database that is currently in use by an active connection in the system configuration.

Use this command to clean up unused repositories or free up server resources.

Examples:

  1. Delete a database using Windows authentication:
    gcc databases delete MyServer GrooperRepo

  2. Delete a database using SQL authentication:
    gcc databases delete MyServer GrooperRepo sa MyPassword

  3. Delete a database using a built-in account (for Docker):
    gcc databases delete MyServer GrooperRepo "NT AUTHORITY\NetworkService"

serverName

The name or network address of the SQL Server instance containing the database to delete. Required.

databaseName

The name of the database to delete. This must match an existing database on the server.

user

The user name for SQL authentication. Leave blank to use Windows authentication. When running in a Docker container, use a built-in account such as "NT AUTHORITY\NetworkService" or "NT AUTHORITY\SYSTEM".

password

The password for the specified user. Leave blank for Windows authentication or built-in accounts. If set to a single question mark ("?"), you will be prompted to enter the password securely.

list <serverName> [user] [password]

List all databases on a specified MSSQL server.
Lists the names of all databases available on the given SQL Server instance. This command is useful for verifying which databases exist before creating or deleting repositories, or for general server administration.

The command connects to the specified server using either Windows authentication or SQL authentication, depending on the parameters provided.

Examples:

  1. List all databases on a server:
    gcc databases list MyServer'

  2. List databases using SQL authentication:
    gcc databases list MyServer sa MyPassword

  3. List databases using a built-in account (for Docker):
    gcc databases list MyServer "NT AUTHORITY\NetworkService"

Related commands: GCC databases create, GCC databases delete

serverName

The name or network address of the SQL Server instance to connect to. This can be a server name, IP address, or server\instance format. Required.

user

The user name for SQL authentication. Leave blank to use Windows authentication. When running in a Docker container, use a built-in account such as "NT AUTHORITY\NetworkService" or "NT AUTHORITY\SYSTEM".

password

The password for the specified user. Leave blank for Windows authentication or built-in accounts. If set to a single question mark ("?"), you will be prompted to enter the password securely.
Notification