I am trying to use sp_help_targetserver to retrieve the time_zone_adjustment
from msdb on the local server. "EXEC sp_help_targetserver" returns the field
s
with no data. "EXEC sp_help_targetserver 'servername'" returns an error "The
specified @.server_name ('servername') does not exist.". I tried adding the
server group and the locsl server name by using sp_add_targetservergroup
(which itself said it was successful in both cases), but I get the same
results from sp_help_targetserver. What's am I missing?Hi
sp_help_targetserver is located in msdb and is a SQL Server Agent SP, used
for Master/Target Jobs.
It is not an information SP that can be used in the way you want to.
Regards
Mike
"Lauren" wrote:
> I am trying to use sp_help_targetserver to retrieve the time_zone_adjustme
nt
> from msdb on the local server. "EXEC sp_help_targetserver" returns the fie
lds
> with no data. "EXEC sp_help_targetserver 'servername'" returns an error "T
he
> specified @.server_name ('servername') does not exist.". I tried adding th
e
> server group and the locsl server name by using sp_add_targetservergroup
> (which itself said it was successful in both cases), but I get the same
> results from sp_help_targetserver. What's am I missing?
>|||Lauren wrote:
> I am trying to use sp_help_targetserver to retrieve the
> time_zone_adjustment from msdb on the local server. "EXEC
> sp_help_targetserver" returns the fields with no data. "EXEC
> sp_help_targetserver 'servername'" returns an error "The specified
> @.server_name ('servername') does not exist.". I tried adding the
> server group and the locsl server name by using
> sp_add_targetservergroup (which itself said it was successful in both
> cases), but I get the same results from sp_help_targetserver. What's
> am I missing?
You can probably get the time zone adjustment using:
select DATEDIFF(n, GETUTCDATE(), GETDATE())
David Gugick
Imceda Software
www.imceda.com|||Thanks. The getutcdate will get me what I need.
"David Gugick" wrote:
> Lauren wrote:
> You can probably get the time zone adjustment using:
> select DATEDIFF(n, GETUTCDATE(), GETDATE())
>
> --
> David Gugick
> Imceda Software
> www.imceda.com
>sql
Friday, March 23, 2012
Retrieving time zone adjustment
Labels:
adjustment,
database,
exec,
local,
microsoft,
msdb,
mysql,
oracle,
retrieve,
retrieving,
returns,
server,
sp_help_targetserver,
sql,
time,
time_zone_adjustmentfrom,
zone
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment