Conversion failed

  • Hi,

    Can someone please assist me with the following:

    SELECT CAST(record as xml) as record

    FROM sys.dm_os_ring_buffers

    and I'm getting error

    Msg 241, Level 16, State 1, Line 1

    Conversion failed when converting date and/or time from character string.

    Thanks

  • Strange, this works fine for me, what version of sql are you using?

    [font="Times New Roman"]There's no kill switch on awesome![/font]
  • I've tried it on another instance, it works. Very strange as both instances are set up the same?

  • SQL 2008 Sp1

  • For me also it's working. mine also same SQl Server 2008 SP1

  • TST1 (1/27/2012)


    Can someone please assist me with the following:

    SELECT CAST(record as xml) as record

    FROM sys.dm_os_ring_buffers

    and I'm getting error

    Msg 241, Level 16, State 1, Line 1

    Conversion failed when converting date and/or time from character string.

    Is that the whole query, or are you calling methods on the xml result, or using the [timestamp] column in some way? If that is the whole query, it is possible that an internal ring buffer record is corrupted and the error is occurring in internal code you cannot see. Try storing the output without the CAST in a temporary table (record is NVARCHAR(4096)). Better still, work with a specific type of ring buffer using sample queries from http://technet.microsoft.com/en-us/library/cc966540.aspx

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply