sp_modify_time_range

Changes the start day, start time, end day, and end time associated with a named time range.

Syntax

sp_modify_time_range name, startday, endday, starttime, endtime

Parameters

Examples

Usage

There are additional considerations when using sp_modify_time_range:
  • You cannot modify the “at all times” time range.

  • It is possible to modify a time range so that it overlaps with one or more other time ranges.

  • The modification of time ranges through the system stored procedures does not affect the active time ranges for sessions currently in progress.

  • Changes to a resource limit that has a transaction as its scope does not affect any transactions currently in progress.

For more information, see the System Administration Guide.

Permissions

The permission checks for sp_modify_time_range differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must be a user with manage resource limit privilege.

Disabled

With granular permissions disabled, you must be a user with sa_role.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

Related reference
sp_add_resource_limit
sp_add_time_range
sp_drop_time_range