473,404 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

SQL Server Row Byte Limit

The documentation from M'soft for the limits on SQL Server DataBase is:

"SQL Server can have as many as two billion tables per database and 1,024
columns per table. The number of rows and total size of the table are limited
only by the available storage. The maximum number of bytes per row is 8,060.
If you create tables with varchar, nvarchar, or varbinary columns in which
the total defined width exceeds 8,060 bytes, the table is created, but a
warning message appears. Trying to insert more than 8,060 bytes into such a
row or to update a row so that its total row size exceeds 8,060 produces an
error message and the statement fails."

I have a database that has large binary fields representing images that far
exceeds the 8060 bytes per row but yet I don't get an error...why is this?
--
Dennis in Houston
Nov 21 '05 #1
2 5217

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com...
The documentation from M'soft for the limits on SQL Server DataBase is:

"SQL Server can have as many as two billion tables per database and 1,024
columns per table. The number of rows and total size of the table are
limited
only by the available storage. The maximum number of bytes per row is
8,060.
If you create tables with varchar, nvarchar, or varbinary columns in which
the total defined width exceeds 8,060 bytes, the table is created, but a
warning message appears. Trying to insert more than 8,060 bytes into such
a
row or to update a row so that its total row size exceeds 8,060 produces
an
error message and the statement fails."

I have a database that has large binary fields representing images that
far
exceeds the 8060 bytes per row but yet I don't get an error...why is this?


BLOB types (Text and Image datatypes) don't count. For these types a
16-byte pointer is stored on the page, and the data is stored elsewehre in
the file. It's just varchar and varbinary which are stored on the page and
count toward the 8060 byte limit.

David
Nov 21 '05 #2
Hey thanks a lot for the explaination...wonder why M'soft couldn't have
expanded their's a bit. However, believe it or not, I'm not sure what I'm
using for the images. I have an access database and when I create the table,
I use OLEOBJECT for the field type then convert images to a byte array and
save it using parameters and OleDb.OleDbType.LongVarBinary as the param type.
It seems to work since I can store two pictures of 500k bytes each in one
record.

--
Dennis in Houston
"David Browne" wrote:

"Dennis" <De****@discussions.microsoft.com> wrote in message
news:89**********************************@microsof t.com...
The documentation from M'soft for the limits on SQL Server DataBase is:

"SQL Server can have as many as two billion tables per database and 1,024
columns per table. The number of rows and total size of the table are
limited
only by the available storage. The maximum number of bytes per row is
8,060.
If you create tables with varchar, nvarchar, or varbinary columns in which
the total defined width exceeds 8,060 bytes, the table is created, but a
warning message appears. Trying to insert more than 8,060 bytes into such
a
row or to update a row so that its total row size exceeds 8,060 produces
an
error message and the statement fails."

I have a database that has large binary fields representing images that
far
exceeds the 8060 bytes per row but yet I don't get an error...why is this?


BLOB types (Text and Image datatypes) don't count. For these types a
16-byte pointer is stored on the page, and the data is stored elsewehre in
the file. It's just varchar and varbinary which are stored on the page and
count toward the 8060 byte limit.

David

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lurre | last post by:
Hallo! I have small or big problem. I want creat Store Procedurs whit limit rows. For example I need rows from 100 to 200. --Select * from table How I doing best way.
1
by: 1944USA | last post by:
I have a C# application written as a Windows Service. It spawns a number of threads, each thread has very large memory intensive processes running on it. I can keep adding threads as long as the...
3
by: Big Dave | last post by:
Hello All, I was wondering wether anyone could help me solve what is probably a very easy issue. I keep getting this damn "The administrative limit for this request was exceeded" whenever I try to...
9
by: Terry E Dow | last post by:
Howdy, I am having trouble with the objectCategory=group member.Count attribute. I get one of three counts, a number between 1-999, no member (does not contain member property), or 0. Using...
26
by: John Grandy | last post by:
Is it possible to generate a 20 byte integer from a GUID that is "unique enough" ( just like a GUID is not truly unique , but is "unique enough" ). We identify transactions with GUIDs , but a...
8
by: ZRexRider | last post by:
Hi, I have a .NET application that I want to save the Config.EXE contents to my SQL database for remote review/testing. This config file is 3700+ bytes long. I created a field in one of my...
1
by: Daniel | last post by:
is there any limit to how long of a string SqlDataReader.GetString() can return?
5
by: Gerrit | last post by:
Hi all, I'm getting an OutOfMemoryException when I initialize a byte array in C# like this: Byte test = new Byte; I'm using ASP.NET 2.0. In ASP.Net 1.1 it works fine. So what am I doing
1
by: katysei | last post by:
when I look at stdio.h function for accessing file,the type that represent location of the file file size etc is long which in win32 platform===fbytes==4Giga byte file. How can handle files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.