Start-NAVDatabaseCompression

Starts the compression of a tenant database. This will compress any tables that do not have an explicit compression level specified to the database default level.

Syntax

Start-NAVDatabaseCompression
     [-ServerInstance] <String>
     [-Timeout <TimeSpan>]
     [-Compression <CompressionType>]
     [-Tenant <TenantId>]
     [-Force]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

You must specify a Business Central Server instance and tenant. For more info on SQL Server data compression and relevant terminology, see https://docs.microsoft.com/en-us/sql/relational-databases/data-compression/data-compression

Examples

EXAMPLE 1

Start-NAVDatabaseCompression -ServerInstance BusinessCentral -Tenant t1

Start compressing the tables in tenant t1.

Parameters

-Compression

Specifies the compression level to use. If this parameter is not set or set to Unspecified the database default level will be used. Specifying a parameter different from Unspecified will also update the database default compression level.

Possible values: Unspecified, None, Row, Page

Type:CompressionType
Accepted values:Unspecified, None, Row, Page
Position:Named
Default value:Unspecified
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ServerInstance

Specifies the name of a Business Central Server instance, for example, BusinessCentral or myinstance. You can specify either the full name of an instance, such as BusinessCentralServer$myinstance or the short name, such as myinstance.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Tenant

Specifies the ID of the tenant that should be compressed, such as Tenant1.

This parameter is required unless the specified service instance is not configured to run multiple tenants.

Type:TenantId
Aliases:Id
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Timeout

Specifies the duration the compression is allowed to execute for. The compression will stop after the time has elapsed and any remaining tables will be left uncompressed. A timeout of 0 means the command will continue untill all tables have been compressed.

Type:TimeSpan
Position:Named
Default value:00:00:00
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

System.String

By value and property name: ServerInstance

System.TimeSpan

By property name: Timeout

Microsoft.Dynamics.Nav.Types.Metadata.CompressionType

By property name: Timeout

Microsoft.Dynamics.Nav.Types.TenantId

By property name: Tenant

Notes

In a single-tenant installation one database contains both the per-tenant tables and the cross-tenant tables. Even in this configuration it is only the per-tenant tables that are compressed.