SQL Nvarchar(max)

Home Page Forums BizTalk 2004 – BizTalk 2010 SQL Nvarchar(max)

Viewing 2 reply threads
  • Author
    Posts
    • #20466

       We write our trace/log to an SQL table.  One column can contain text or xml, and is defined as nvarchar(max).

      Often, using SQL Server Mgt Studio, I take the value of this column, copy and paste it into something like notepad, StylusStudio, or XmlSpy.  However, the max I get out of it when i copy/paste if 65535.

      Is there an easy way to get the value in teh field from Studio without having to write a .net program?

      Thanks,
      Neal

    • #20469

       Did you try with “Results to text” or “Results to File” option from the query menu?

    • #20474

      Neal,

      Is the maximum length of the nvarchar data type 65635 characters? I would suggest possibly using a text data type for this particular column.

      Nick.

      • #20480

        nvarchar(max) can hold this many bytes: 2*31-1 = 2147483647 

        http://msdn.microsoft.com/en-us/library/ms186939.aspx

        I think the data there, it’s just the GUI interface is hiding it all. I did try text instead of grid for the display, same issue.  I didn’t try file yet.  Maybe the save to CSV will work.  Haven’t tried every last resort yet.

        Neal

         

        • #21474

          data is there – its simply hidden by the GUI (I had the same issue with a ~250.000 char long string). Either copy it directly or save the output as a file or report.

Viewing 2 reply threads
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.