Changes the start day, start time, end day, and end time associated with a named time range.
sp_modify_time_range name, startday, endday, starttime, endtime
"HH:MM"
"HH:MM"
The endtime must occur later in the day than the starttime, unless endtime is 00:00.
sp_modify_time_range business_hours, NULL, Saturday, NULL, NULL
sp_modify_time_range before_hours, Monday, Saturday, NULL, "08:00"
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.
The permission checks for sp_modify_time_range differ based on your granular permissions settings.
Setting | Description |
---|---|
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. |
Values in event and extrainfo columns from the sysaudits table are:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|