Re: Any workaround for row size > 8060?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Mark Allison (marka_at_no.tinned.meat.mvps.org)
Date: 04/27/04


Date: Tue, 27 Apr 2004 07:32:36 +0100

John,

Does Centura support SQL Server? Perhaps an engineer from Centura would be
required to do this migration work. The problem you are having is that you
will need to use the text data type if you need to store more than 8060
bytes per row. Application changes may need to be made to accomodate this
data type, either at the stored procedure layer or the data access layer in
dynamic SQL in the application itself.

There are many gotchas with the text datatype and they cannot be treated in
the same way as a varchar due to the nature in the way they are stored. i.e.
if the text cannot be stored in row, as in its greater than 8K, then a
pointer is stored in the row to the data pages where the text data can be
found. There is a lot of information on this data type in Books Online, I
recommend you read it.

-- 
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
"John" <johnfull_2000@yahoo.com> wrote in message
news:C8579948-714C-4CA5-9244-9AC486144518@microsoft.com...
> Hi All,
>
> We're converting Oracle databases to SQL Server. In Oracle there's no such
limit for row size and SQL has.
> We've Centura as front-end (Gupta SQL formerly).
> While testing is going on........we are getting row size exceeds max limit
of 8060 bytes...and we don't know what exactly we need to do.
> In the problem tables, I have one TEXT column and various varchar 4000 and
varchar 2000 columns.
> The application will insert more than 8060 characters for sure..
>
> Can anybody suggest any workaround for this? or Any pointers?
>
> The table structure is something like this:
>
> ---------------------------------------------------------------------
> CREATE TABLE [Table1] (
> [Table_ID] [varchar] (10)  NOT NULL ,
> [T_NOTES1] [TEXT]  NULL ,
> [T_NOTES2] [varchar] (4000)  NULL ,
> [C_NOTES] [varchar] (4000)  NULL ,
> [P_NOTES] [varchar] (4000)  NULL ,
> [G_NOTES] [varchar] (256)  NULL ,
> [F_NOTES] [varchar] (256)  NULL ,
> [L_NOTES] [varchar] (256)  NULL ,
> [P_NEEDS] [varchar] (256)  NULL ,
> [F_NEEDS] [varchar] (256)  NULL ,
> [O_NOTE] [varchar] (250)  NULL ,
> [V_SOURCES] [varchar] (2000)  NULL ,
> [T_PROOFS] [varchar] (250)  NULL ,
> [V_SKILLS] [varchar] (2000)  NULL ,
> [R_CREDS] [varchar] (2000)  NULL ,
> [ROWID] [uniqueidentifier] NOT NULL CONSTRAINT
> CONSTRAINT [FK_RO_TES_PROID] FOREIGN KEY
> (
> [PRO_ID]
> ) REFERENCES [Table_INFO1] (
> [PRO_ID]
> ) ON DELETE CASCADE
> ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
> GO
>
> If we split the table, will it help?
> Can we have more than one column as TEXT data type?
> --------------------------------------------------------------------------
-----------------
>
> One more point: I appreciate if somebody can clarify this:
> TEXT data type can store lot of data....right?
> Then if we're inserting > 8060 (row size limit) into the TEXT column why
would it error?
> If this is so, what is the point in using TEXT column?
>
> I'm little bit confused..........I appreciate if somebody can clarify
this..
>
> Thanks much,
> John..


Relevant Pages

  • Re: SQL Datatypes
    ... stored as a varchar, data that should be stored as a float is stored ... The exact validation is different depending on data type. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Data type in audit record
    ... Rather than have an audit table mirroring ... pk_value (varchar) - primary key of the changed record. ... I'm not sure what data type the ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: Access 97 to SQL
    ... The timestamp is a data type, ... the timestamp field does not need to be part of the SELECT ... > converted the Access tables to a SQL Server 2000 database and linked the ... > the way I set up Autonumbering in SQL? ...
    (microsoft.public.access.externaldata)
  • varchar
    ... Is there any disadvantage in defining the data type as ... varchar is the actual length in bytes of the data entered. ... storage is concerend. ... does SQL Server use the ...
    (microsoft.public.sqlserver.programming)
  • Re: Data Types
    ... > moved to SQL Server and I don't know the best newsgroups yet. ... > Does a Unique Identifier data type take up less storage space than a 32 ... A uniqueidentifier uses 16 bytes. ... but I'm looking at the data types and think that the TimeStamp ...
    (microsoft.public.sqlserver.programming)