Chat now with support
Chat mit Support

LiteSpeed for SQL Server 8.9.8 - User Guide

About Backing Up/Restoring with LiteSpeed LiteSpeed User Interface Configure LiteSpeed for First Use Cloud Back Up Databases Automate Maintenance Tasks Restore Databases Restore Objects View Activity and History Use Command-Line Interface Use Extended Stored Procedures Troubleshoot LiteSpeed Review Additional Resources

Purge Repository Data

You can remove historical data using any of the following:

LiteSpeed_DeleteActivity

This stored procedure removes LiteSpeed activity and information about LiteSpeed backups based on the date and time specified. Additionally, if appropriate parameters are specified, it removes log shipping history, jobs and maintenance plans history, DST status, and information about deleted databases.

NOTE: You must run the LiteSpeed_DeleteActivity procedure against the database that has the LiteSpeed procedures installed and can be the one of the following:

  • LiteSpeedLocal.
  • LiteSpeedCentral.
  • Custom database—You can use the LiteSpeed Instance Configuration wizard (Start | All Programs | Quest Software | LiteSpeed for SQL Server | Instance Configuration) to choose where to store the repository data.

This topic covers:

Syntax

USE {LiteSpeedLocal|LiteSpeedCentral|<custom_database_name>}
EXEС LiteSpeed_DeleteActivity
{ @deleteDate = 'date_time' | ( @delUnit = n,@delUnitType = 'time' )}
, {@delLocal = 0 | 1 | @delCentral = 0 | 1 |( @delLocal = 0 | 1 , @delCentral = 0 | 1)}
[, @purgeDeleted = 0 | 1 ]
[, @delLogshipping = 0 | 1 ]
[, @delStatus = 0 | 1]

Arguments

This stored procedure accepts the following arguments:

Argument Description

@deleteDate

Deletes data older than the date and time specified. The argument accepts the following format:

YYYYMMDD HH:MM:SS

where

  • YYYY—4-digit year
  • MM—2-digit month
  • DD—2-digit day of the month
  • HH—2-digit hour using the local 24-hour clock
  • MM—2-digit minute
  • SS—2-digit second

@delLocal

Deletes old data from the LitespeedActivity and LitespeedBackupFile tables in the Local repository or in the custom database (if the Local repository tables were created in the custom database). This argument accepts one of the following values:

  • 0—false
  • 1—true

@delCentral

Deletes old data from the LitespeedActivity and LitespeedBackupFile tables in the Central repository or in the custom database (if the Central repository tables were created in the custom database). This argument accepts one of the following values:

  • 0—false
  • 1—true
@delUnit

Deletes the rows older than the age specified.

@delUnitType

Specifies a unit of measurement of time for @delUnit. This argument accepts one of the following values:

  • MINUTES
  • HOURS
  • DAYS
  • WEEKS
  • MONTHS
  • YEARS
@purgeDeleted

Deletes information about deleted databases from dbo.LitespeedDatabase in the following databases:

  • Local repository or custom database, if @delLocal was supplied
  • Central repository or custom database, if @delCentral was supplied
  • Both, if both @delLocal and @delCentral were supplied

This argument accepts one of the following values:

  • 0—false
  • 1—true

@delLogshipping

Deletes old log shipping history entries from dbo.LogShippingHistory in the following databases:

  • Local repository or custom database, if @delLocal was supplied
  • Central repository or custom database, if @delCentral was supplied
  • Both, if both @delLocal and @delCentral were supplied

This argument accepts one of the following values:

  • 0—false
  • 1—true

@delStatus

Deletes old data from dbo.DbMaintStatus, dbo.DTSStatus, dbo.JobStatus in the following databases:

  • Local repository or custom database, if @delLocal was supplied
  • Central repository or custom database, if @delCentral was supplied
  • Both, if both @delLocal and @delCentral were supplied

This argument accepts one of the following values:

  • 0—false
  • 1—true

Examples

  1. Delete the following data older than 08/21/2009 from the Local and Central repositories:

    • LiteSpeed activity
    • Information about deleted databases

    exec LiteSpeedLocal.dbo.LiteSpeed_DeleteActivity
    @delLocal=1
    , @delCentral=1
    , @purgeDeleted = 1
    , @deleteDate = '20090821 00:00:00'

  2. Delete the following data older than 6 months in the Local repository:

    • LiteSpeed activity
    • Log shipping history
    • Data from dbo.DbMaintStatus, dbo.DTSStatus, dbo.JobStatus

    USE LiteSpeedLocal
    EXEC LiteSpeed_DeleteActivity
    @delLocal=1,
    @delLogshipping = 1,
    @delStatus = 1 ,
    @delUnit = 6,
    @delUnitType = 'MONTHS'

In a graphical user interface, right-clicking on a server reveals the option Sync Local and Central Activities.

This option opens the Configure LiteSpeed Local and Central Synchronization dialog, where a user selects Server instances and option to Delete data from Central repository. The date from which the data should be deleted can be selected from the calendar view.

NOTE: This option deletes only data from Central repository.

 

Related Topic

Synchronize Repository Data

You can synchronize historical data using the following:

LiteSpeed_SyncActivity_Stats

This stored procedure synchronize LiteSpeed activity and information from LiteSpeed Local to the Central database. Using the procedure the date and time can be defined from which to which date and time the data will be synchronized

NOTE: Run the LiteSpeed_SyncActivity_Stats procedure against the desired Local database that is installed on the SQL Server from which you want to synchronize data to the Central database.LiteSpeed databases (Local and Central) by default are named LiteSpeedLocal and LiteSpeedCentral.

  • NOTE: Custom database—You can use the LiteSpeed Instance Configuration wizard (Start | All Programs | Quest Software | LiteSpeed for SQL Server | Instance Configuration) to choose where to store the repository data if is not set by default names.

This topic covers:

Syntax

exec LiteSpeedLocal.dbo.LiteSpeed_SyncActivity_Stats @startDate = '20210517 04:05'
{ @startDate = 'date time' }

or

exec LiteSpeedLocal.dbo.LiteSpeed_SyncActivity_Stats @startDate = '20210517 04:05', @endDate = '20210516 04:04'
{ @startDate = 'date time' | ( @endDate = 'date time' )}

Arguments

This stored procedure accepts the following arguments:

Argument Description

@startDate

Deletes data older than the date and time specified. The argument accepts the following format:

YYYYMMDD HH:MM:SS

where

  • YYYY—4-digit year
  • MM—2-digit month
  • DD—2-digit day of the month
  • HH—2-digit hour using the local 24-hour clock
  • MM—2-digit minute
  • SS—2-digit second

@endDate

Deletes data until the date and time specified. The argument accepts the following format:

YYYYMMDD HH:MM:SS

where

  • YYYY—4-digit year
  • MM—2-digit month
  • DD—2-digit day of the month
  • HH—2-digit hour using the local 24-hour clock
  • MM—2-digit minute
  • SS—2-digit second

Examples

  1. Synchronize the following data from the beginning until 08/08/2021 08:00 from the Local to the Central repository:

    • LiteSpeed activity
    • The data from the activity will be synchronized from the Local to the Central repository

    exec LiteSpeedLocal.dbo.LiteSpeed_SyncActivity_Stats @startDate = '20210808 08:00'

  2. Synchronize the following data from the 04/04/2020 07:15 until 08/08/2021 08:00 from the Local to the Central repository:

    • LiteSpeed activity
    • The data from the activity will be synchronized from the Local to the Central repository

    exec LiteSpeedLocal.dbo.LiteSpeed_SyncActivity_Stats
    @startDate = '20210808 08:00',
    @endDate = '20210404 07:15'

In a graphical user interface, right-clicking on a server reveals the option Sync Local and Central Activities.

This option opens the Configure LiteSpeed Local and Central Synchronization dialog, where a user selects Server instances and the option to Sync LiteSpeed activity between local and central repositories. The date range for data synchronization can be selected from the calendar view.

 

Related Topic

Verwandte Dokumente

The document was helpful.

Bewertung auswählen

I easily found the information I needed.

Bewertung auswählen