January 27, 2012 at 2:50 am
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
January 27, 2012 at 2:52 am
Strange, this works fine for me, what version of sql are you using?
January 27, 2012 at 3:04 am
I've tried it on another instance, it works. Very strange as both instances are set up the same?
January 27, 2012 at 3:05 am
SQL 2008 Sp1
January 27, 2012 at 3:19 am
For me also it's working. mine also same SQl Server 2008 SP1
January 27, 2012 at 7:02 am
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
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply