Page History
...
Schedule Options
You can schedule the secondary database options to create log shipping policies by using the following options:
Options | Description |
---|---|
-Schedule <occurs_type> | Specifies the schedule type (occurs type). <occurs_type> - OnDemand, Daily, Weekly, Monthly. |
-Every <n> | Specifies how often the policy runs. It depends on the schedule type. For Daily: every <n> day(s). For Weekly: every <n> week(s). For Monthly: every <n> month(s). Note: the default value is "1". |
-Day <day> | <day> - specifies a day of the week or a day of a month. Note: it is valid only with Weekly, Monthly schedule types. Valid values for Weekly: MON - SUN and * (every day). SUN is default. Valid values for Monthly: MON - SUN, Weekday, WeekendDay, Day or number 1 - 31. Is required when -MonthDay option is used. |
-MonthDay <month_day> | Specifies how often the policy runs. <month_day> - FIRST, SECOND, THIRD, FOURTH, LAST use with -Day option. LASTDAY - the policy runs on the last day of the month. |
-StartTime <time> | <time> - specifies the time of day that the policy runs. Note: it is required with a "once" frequency. The default value is the current local time when policy creates. |
-EndTime <time> | <time> - specifies the time of day that the policy ends. Note: it is is not valid in a "once" frequency. The default value is the "23:59:59". |
-Frequency <n><time_period> | Specifies daily frequency (how often the policy runs within a day). <n> - amount of time. <time_period> - {hour, minute}. E.g., -Frequency 2hours. Special keyword: Once. E.g., -Frequency Once. |
-StartDate <date> | <date> - specifies the date that the policy starts. Note: the default value is the current date. This parameter is optional. |
-EndDate <date> | <date> - specifies the last date that the policy is scheduled to run. Note: by default, the schedules have no ending date. This parameter is optional. |
-SetRestoreLocation <path> | <path> - specifies different location for restore. Special keyword: "AsBackup" sets location the same as backup. Note: the default value is the same location as backup. This parameter is optional. |
Note: you can optionally specify restore job occur schedule for secondary database.
For detailed descriptions and available options, see the CLI Help (SQLsafeCmd help Create-Policy
).