サポートと今すぐチャット
サポートとのチャット

LiteSpeed for SQL Server 8.9.8 - Integration with TSM Guide

LiteSpeed Variables

LiteSpeed automatically substitutes variables anywhere you need to specify a backup file name, comment, or description in the LiteSpeed UI Console, from the command-line and when using extended stored procedures.

ALL variables are supported for both files and folders.

ClosedClick here for information about the command-line and extended stored procedure arguments that accept LiteSpeed variables.

Accepted Variables

LiteSpeed accepts the following variables:

Variable

Description

%DATABASENAME% or %D Database name
%TYPE% or %T Backup type (full, diff, log, fast compression folder)
%SERVER% Server name
%INSTANCE% Server instance name
%DEFAULTDIR% Default backup directory
%AG% AlwaysOn Availability Group name
%z

Timestamp, the number of seconds elapsed since 00:00:00 January 1, 1970, UCT. See Note1.

Date and time variables

%DATE%

Date. See Note1.

%TIME%

Time (hhmm). See Note1.

%DATETIME%

Date and time. See Note1.

%a

Abbreviated weekday name. See Note1.

%A

Full weekday name. See Note1.

%b

Abbreviated month name. See Note1.

%B

Full month name. See Note1.

%d

Day of the month (01-31). See Note1.

%H

Hour in 24h format (00-23). See Note1.

%I

Hour in 12h format (01-12). See Note1.

%j

Day of the year (001-366). See Note1.

%m

Month as a decimal number. See Note1.

%M

Minute (00-59). See Note1.

%p

AM or PM designation. See Note1.

%S

Second (00-59). See Note1.

%U

Week number with the first Sunday as the first day of week one (00-53). See Note1.

%w

Weekday as a decimal number with Sunday as 0 (0-6). See Note1.

%W

Week number with the first Monday as the first day of week one (00-53). See Note1.

%y

Year, last two digits (00-99). See Note1.

%Y

Year. See Note1.

%Z

Time zone name or abbreviation.

 

Note1: Not supported for Fast Compression.

Examples

  1. Specify backup destination:

    \\Storage\Backup\%SERVER%\%DATABASENAME%_%TYPE%_%DATETIME%.bak

  2. Back up the Northwind database with the specified backup set name and description.

    EXEC master.dbo.xp_backup_database
    @database='MyDB'
    , @filename='C:\MSSQL\Backup\%D.BAK'
    , @init= 1
    , @backupname = '%D_%w'
    , @desc = '%T Backup of %D'

  3. Restore the Northwind database from the backup device c:\temp\Northwind.bak from the command-line interface.

    sqllitespeed.exe -R Database -D Northwind -F "C:\temp\%D.bak" -W REPLACE

 

関連ドキュメント

The document was helpful.

評価を選択

I easily found the information I needed.

評価を選択