Compartir a través de


TargetServer.LocalTime Propiedad

Gets the current date and time for the referenced target server.

Espacio de nombres:  Microsoft.SqlServer.Management.Smo.Agent
Ensamblado:  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Sintaxis

'Declaración
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public ReadOnly Property LocalTime As DateTime 
    Get
'Uso
Dim instance As TargetServer 
Dim value As DateTime 

value = instance.LocalTime
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public DateTime LocalTime { get; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property DateTime LocalTime {
    DateTime get ();
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member LocalTime : DateTime
function get LocalTime () : DateTime

Valor de la propiedad

Tipo: System.DateTime
A DateTime value that specifies the current date and time at the referenced target server.

Comentarios

Microsoft SQL Server multiserver administration can be configured to administer instances of SQL Server installed throughout the world. The possibility for job scheduling conflicts or errors can arise.

For example, a job created on June 1, 1998 for single execution on that date, by a master server in Seattle could never execute on a server enlisted from Japan. The Japanese target server, having a local date of June 2, will ignore the job because its defined execution date has passed.

Querying the LocalTime property, and using the TimeZoneAdjustment property in scheduling, can help avoid these potential errors.

Ejemplos

Programar tareas administrativas automáticas en el Agente SQL Server

Vea también

Referencia

TargetServer Clase

Espacio de nombres Microsoft.SqlServer.Management.Smo.Agent

Otros recursos

Tareas administrativas automatizadas (Agente SQL Server)

sp_help_targetserver (Transact-SQL)