Switch off and on versioning

As an Admin user, you can switch off versioning to reduce the size of the repository. If you switch off versioning, you can switch it on anytime. By default, versioning is on.

All Tricentis Tosca installations used within the same project must be of the same version.

This is particularly true if you want to use versioning. Turning off versioning may break older Tosca Commander versions.

Switching off versioning truncates version history. Truncating large version history takes time and can require large amount of free space for temporary use. The temporarily required space is maximum the size of your workspace.

Switching off versioning on MSSQL databases require additional actions from the database administrator. For more information, see the section about switching off versioning on MSSQL databases.

Search for checked-out items

Before you switch off or on versioning, make sure that all objects in the master branch are checked in. You cannot switch off or on versioning if a user has objects checked out.

To make sure that all objects are checked in, do the following:

  1. Right-click the project file and select Search all from the mini toolbar.

  2. Select CheckedOut objects (by any user) from the list.

  3. In the subsequent dialog, select the TQL search tab and search for checked out items. Tosca lists the checked-out items.

If you still cannot switch off or on versioning, there might be some lost objects which prevent the operation. To find these objects, do the following:

  1. Right-click the project file and select Search all from the mini toolbar.

  2. Select Lost objects from the list.

  3. In the subsequent dialog, select the TQL search tab and search for lost objects. As a result, Tosca lists the lost objects that prevent you from switching off or on versioining.

Switch off versioning

Before you switch off versioning, make sure that all objects in the master branch are checked in.

Once you switch off versioning, all versioning-related functions are disabled.

To switch off versioning, follow the steps below:

  1. Select Manage Versioning from the Versioning ribbon item.

  2. In the Manage Versioning dialog, click Switch Off.

    If you switch off versioning, Tosca updates entire objects instead of storing object versions. You can't create branches or merge branches together. Tosca permanently truncates the entire version history and deletes all affected branches.

Switch off versioning

  1. In the subsequent dialog, click Switch Off to confirm.

Switch on versioning

Before you switch on versioning, make sure that all objects in the master branch are checked in.

You cannot switch on versioning if a user has objects checked out.

To switch on versioning, follow the steps below:

  1. Select Manage Versioning from the Versioning ribbon item.

  2. In the Manage Versioning dialog, click Switch On.

    If you switch on versioning, Tosca stores object revisions.

Switch on versioning

  1. In the subsequent dialog, click Switch On to confirm.

Switch off and on versioning via TC-Shell or TC API

You can switch off and on versioning via TC-Shell, in both interactive and script mode.

Switch off and on versioning via TC-Shell in interactive mode

You can switch off and on versioning via TC-Shell. To do so in TC-Shell interactive mode, follow the steps below:

  1. Open your workspace in TC-Shell.

  2. Navigate to the project node.

  3. Run TC-Shell task ToggleVersionHistory.

  4. Enter c to continue.

  5. In the subsequent dialog, confirm that you want Tosca to toggle version history:

    • Enter Yes to confirm. Tosca switches versioning off or on, based on your versioning settings: If versioning was on, Tosca switches it off. If versioning was off, Tosca switches it on. By default, versioning is switched on.

    • Enter No to cancel the task.

Switch off and on versioning via TC-Shell in script mode

To switch off and on versioning via TC-Shell in script mode, run the following TC-Shell task: ToggleVersionHistory c Yes.

Tosca switches versioning off or on, based on your versioning settings: If versioning was on, Tosca switches it off. If versioning was off, Tosca switches it on. By default, versioning is switched on.

Switch off and on versioning via TC API

You can switch off and on versioning using TC API. For more information about TC-API, access the Tosca Commander API documentation.

Switch off versioning on an MSSQL database

Switching off versioning truncates version history. After the truncation, in MSSQL databases, the database server keeps the space that had been taken up by the version history data as reserved disk space. As a consequence, the database size doesn't decrease only by switching off versioning.

In order to free up this disk space and reduce the database size, switching off versioning requires an additional step for MSSQL users. To complete the truncation of version history on MSSQL databases, follow the steps below:

  1. Follow the instructions to switch off versioning.

  2. As the following operation requires database administrator rights, ask your database administrator to run the following MSSQL command on the database: DBCC SHRINKDATABASE(<the name of your database>, <the percentage of space that you want left in the database server as reserved disk space>).

    This way, your database administrator frees up space from the reserved disk space of the database server that used to be taken up by the version history data.

For example, the following command instructs the server to keep 1% of the reserved disk space in the My_DB database. This way, 99% of the reserved disk space is freed up: DBCC SHRINKDATABASE(MY_DB, 1).

For more information, see the MSSQL documentation.