Showing posts with label size. Show all posts
Showing posts with label size. Show all posts

Wednesday, March 21, 2012

MaxSize on Transaction_Log

Hello,
If I set a MaxSize on my transaction log, what happens when that size is
reached? Will it automatically overwrite old data, or will it be an error?
Our transaction log has suddenly become real huge. I have read a lot in this
list about this, but I haven't found anything about what happens with the
MaxSize enabled.
Regards,
/Mikael SWhat recovery model do you have the database set to..
--
HTH
Ryan Waight, MCDBA, MCSE
"Mikael" <mikael@.DELETETHISslk.nu> wrote in message
news:%23gxY%23QMtDHA.1788@.tk2msftngp13.phx.gbl...
> Hello,
> If I set a MaxSize on my transaction log, what happens when that size is
> reached? Will it automatically overwrite old data, or will it be an error?
> Our transaction log has suddenly become real huge. I have read a lot in
this
> list about this, but I haven't found anything about what happens with the
> MaxSize enabled.
> Regards,
> /Mikael S
>|||I have Recovery Model: FULL
The Transaction Log is set to Automatically Growth
Auto Shrink is not set
I use SQL2000 on a SRV2000.
Thank you for your reply,
/Mikael S
"Ryan Waight" <Ryan_Waight@.nospam.hotmail.com> skrev i meddelandet
news:uvN4pMNtDHA.2416@.TK2MSFTNGP10.phx.gbl...
> What recovery model do you have the database set to..
> --
> HTH
> Ryan Waight, MCDBA, MCSE
> "Mikael" <mikael@.DELETETHISslk.nu> wrote in message
> news:%23gxY%23QMtDHA.1788@.tk2msftngp13.phx.gbl...
> > Hello,
> >
> > If I set a MaxSize on my transaction log, what happens when that size is
> > reached? Will it automatically overwrite old data, or will it be an
error?
> > Our transaction log has suddenly become real huge. I have read a lot in
> this
> > list about this, but I haven't found anything about what happens with
the
> > MaxSize enabled.
> >
> > Regards,
> >
> > /Mikael S
> >
> >
>|||If you reach maxsize, then the connections that executes commands which need to write to the log
(all modification commands, like INSERT, UPDATE, DELETE etc) will receive error number 9002.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Mikael" <mikael@.DELETETHISslk.nu> wrote in message news:O9JIaBOtDHA.1088@.tk2msftngp13.phx.gbl...
> I have Recovery Model: FULL
> The Transaction Log is set to Automatically Growth
> Auto Shrink is not set
> I use SQL2000 on a SRV2000.
> Thank you for your reply,
> /Mikael S
>
>
> "Ryan Waight" <Ryan_Waight@.nospam.hotmail.com> skrev i meddelandet
> news:uvN4pMNtDHA.2416@.TK2MSFTNGP10.phx.gbl...
> > What recovery model do you have the database set to..
> >
> > --
> > HTH
> > Ryan Waight, MCDBA, MCSE
> >
> > "Mikael" <mikael@.DELETETHISslk.nu> wrote in message
> > news:%23gxY%23QMtDHA.1788@.tk2msftngp13.phx.gbl...
> > > Hello,
> > >
> > > If I set a MaxSize on my transaction log, what happens when that size is
> > > reached? Will it automatically overwrite old data, or will it be an
> error?
> > > Our transaction log has suddenly become real huge. I have read a lot in
> > this
> > > list about this, but I haven't found anything about what happens with
> the
> > > MaxSize enabled.
> > >
> > > Regards,
> > >
> > > /Mikael S
> > >
> > >
> >
> >
>|||OK I see.
Is there a way to analyze the Transaction Log to see what caused the file to
rapidly grow the last couple of days? It is now up to 20GB, the database is
400MB. This has worked fine for a year, but the latest days (perhaphs some
weeks) the log has "gone mad".
We use some Stored Procedures and connections, but not very big
transactions. I have read the KBs earlier posted here, and I will backup and
shrink the database (log) this evening. It would be interesting to see what
caused the log to be so big suddenly.
Regards,
/Mikael S
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
skrev i meddelandet news:OPWXmHOtDHA.2340@.TK2MSFTNGP12.phx.gbl...
> If you reach maxsize, then the connections that executes commands which
need to write to the log
> (all modification commands, like INSERT, UPDATE, DELETE etc) will receive
error number 9002.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "Mikael" <mikael@.DELETETHISslk.nu> wrote in message
news:O9JIaBOtDHA.1088@.tk2msftngp13.phx.gbl...
> > I have Recovery Model: FULL
> > The Transaction Log is set to Automatically Growth
> > Auto Shrink is not set
> >
> > I use SQL2000 on a SRV2000.
> >
> > Thank you for your reply,
> >
> > /Mikael S
> >
> >
> >
> >
> > "Ryan Waight" <Ryan_Waight@.nospam.hotmail.com> skrev i meddelandet
> > news:uvN4pMNtDHA.2416@.TK2MSFTNGP10.phx.gbl...
> >
> > > What recovery model do you have the database set to..
> > >
> > > --
> > > HTH
> > > Ryan Waight, MCDBA, MCSE
> > >
> > > "Mikael" <mikael@.DELETETHISslk.nu> wrote in message
> > > news:%23gxY%23QMtDHA.1788@.tk2msftngp13.phx.gbl...
> > > > Hello,
> > > >
> > > > If I set a MaxSize on my transaction log, what happens when that
size is
> > > > reached? Will it automatically overwrite old data, or will it be an
> > error?
> > > > Our transaction log has suddenly become real huge. I have read a lot
in
> > > this
> > > > list about this, but I haven't found anything about what happens
with
> > the
> > > > MaxSize enabled.
> > > >
> > > > Regards,
> > > >
> > > > /Mikael S
> > > >
> > > >
> > >
> > >
> >
> >
>|||It is possible to view the Tran log with a 3rd party tool lumigent log
explorer. In the meantime have a read through the following articles on Tran
Log :-
http://www.support.microsoft.com/?id=256650 INF: How to Shrink the SQL
Server 7.0 Tran Log
http://www.support.microsoft.com/?id=317375 Log File Grows too big
http://www.support.microsoft.com/?id=110139 Log file filling up
http://www.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
and AutoShrink
http://www.support.microsoft.com/?id=272318 INF: Shrinking Log in SQL
Server 2000 with DBCC SHRINKFILE
http://www.support.microsoft.com/?id=317375 Log File Grows too big
http://www.support.microsoft.com/?id=110139 Log file filling up
http://www.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for Autogrow
and AutoShrink
HTH
Ryan Waight, MCDBA, MCSE
"Mikael" <mikael@.DELETETHISslk.nu> wrote in message
news:ePlNYYOtDHA.700@.TK2MSFTNGP11.phx.gbl...
> OK I see.
> Is there a way to analyze the Transaction Log to see what caused the file
to
> rapidly grow the last couple of days? It is now up to 20GB, the database
is
> 400MB. This has worked fine for a year, but the latest days (perhaphs some
> weeks) the log has "gone mad".
> We use some Stored Procedures and connections, but not very big
> transactions. I have read the KBs earlier posted here, and I will backup
and
> shrink the database (log) this evening. It would be interesting to see
what
> caused the log to be so big suddenly.
> Regards,
> /Mikael S
>
>
> "Tibor Karaszi"
<tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
> skrev i meddelandet news:OPWXmHOtDHA.2340@.TK2MSFTNGP12.phx.gbl...
> > If you reach maxsize, then the connections that executes commands which
> need to write to the log
> > (all modification commands, like INSERT, UPDATE, DELETE etc) will
receive
> error number 9002.
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > Archive at:
>
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
> >
> >
> > "Mikael" <mikael@.DELETETHISslk.nu> wrote in message
> news:O9JIaBOtDHA.1088@.tk2msftngp13.phx.gbl...
> > > I have Recovery Model: FULL
> > > The Transaction Log is set to Automatically Growth
> > > Auto Shrink is not set
> > >
> > > I use SQL2000 on a SRV2000.
> > >
> > > Thank you for your reply,
> > >
> > > /Mikael S
> > >
> > >
> > >
> > >
> > > "Ryan Waight" <Ryan_Waight@.nospam.hotmail.com> skrev i meddelandet
> > > news:uvN4pMNtDHA.2416@.TK2MSFTNGP10.phx.gbl...
> > >
> > > > What recovery model do you have the database set to..
> > > >
> > > > --
> > > > HTH
> > > > Ryan Waight, MCDBA, MCSE
> > > >
> > > > "Mikael" <mikael@.DELETETHISslk.nu> wrote in message
> > > > news:%23gxY%23QMtDHA.1788@.tk2msftngp13.phx.gbl...
> > > > > Hello,
> > > > >
> > > > > If I set a MaxSize on my transaction log, what happens when that
> size is
> > > > > reached? Will it automatically overwrite old data, or will it be
an
> > > error?
> > > > > Our transaction log has suddenly become real huge. I have read a
lot
> in
> > > > this
> > > > > list about this, but I haven't found anything about what happens
> with
> > > the
> > > > > MaxSize enabled.
> > > > >
> > > > > Regards,
> > > > >
> > > > > /Mikael S
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>

Maxium Table Size, Change size?

Hello,
Can anyone table if table size can be increased? If so how?
Any help would be greatly appreciated.
Thanks in Advance.
SqLRattler
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
What is your problem?
I'm not sure if I understand your question.
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> a crit dans le message de
news:ug409AvTEHA.3336@.TK2MSFTNGP10.phx.gbl...
> Hello,
> Can anyone table if table size can be increased? If so how?
> Any help would be greatly appreciated.
> Thanks in Advance.
> SqLRattler
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.

Maxium Table Size, Change size?

Hello,
Can anyone table if table size can be increased? If so how?
Any help would be greatly appreciated.
Thanks in Advance.
SqLRattler
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine sup
ports Post Alerts, Ratings, and Searching.What is your problem?
I'm not sure if I understand your question.
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> a crit dans le message de
news:ug409AvTEHA.3336@.TK2MSFTNGP10.phx.gbl...
> Hello,
> Can anyone table if table size can be increased? If so how?
> Any help would be greatly appreciated.
> Thanks in Advance.
> SqLRattler
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
supports Post Alerts, Ratings, and Searching.

Monday, March 19, 2012

Maximum Table Size

We have been recommended by our database designers that 20million rows is th
e
maximum number of rows a data warehouse should be on SQLServer.
What is the opinion of you guys on this benchmark? Have you seen tables
bigger than that? Did you notice any performance impact.
Our table is at 14million rows and is about 14gb, we are analysing all
opportunities at present and would like a second opinion please.
Regards,
Marc> What is the opinion of you guys on this benchmark? Have you seen tables
> bigger than that?
YES!

> Did you notice any performance impact.
There are always performance concerns. The guideline should be more focused
on proper indexing and row widths, rather than number of rows.
A|||My recommendation is to sack your database designers and hire some people
who know what they are talking about. Seriously. The 20 million row comment
is pure rubbish.
There are SQL Server databases (not many though, because not many companies
have that much data) that have tables with billions of rows. 20 million rows
should not present any problems at all in a properly designed SQL Server
database, and I have seen numerous tables that contain that number of rows
or more.14 GB in itself is not much for a SQL Server database, but if the
table only contains 14 million rows, that is 1000 bytes per row, a rather
large rowsize for a datawarehouse fact table. A datawarehouse fact table
should almost exclusively contain numeric columns, and these columns should
be designed to be as small as possible, usually they are 4 byte integers. If
that is the case you are talking about 250 columns in that table, which is
possible from a proper logical design point of view, but sounds a bit much
too me. SQL Server can of course easily handle 250 columns in a table, it is
usually an indication of a bad database design though, to have that many
columns in one table.
Jacco Schalkwijk
SQL Server MVP
"marcmc" <marcmc@.discussions.microsoft.com> wrote in message
news:55BE7712-1CAE-4E6A-9EEA-05286669D9D2@.microsoft.com...
> We have been recommended by our database designers that 20million rows is
> the
> maximum number of rows a data warehouse should be on SQLServer.
> What is the opinion of you guys on this benchmark? Have you seen tables
> bigger than that? Did you notice any performance impact.
> Our table is at 14million rows and is about 14gb, we are analysing all
> opportunities at present and would like a second opinion please.
> Regards,
> Marc|||Depends on a lot of things
for example the wider the tables the slower the selects (less rows on a page
)
CPU, Disk etc etc etc
http://sqlservercode.blogspot.com/
"marcmc" wrote:

> We have been recommended by our database designers that 20million rows is
the
> maximum number of rows a data warehouse should be on SQLServer.
> What is the opinion of you guys on this benchmark? Have you seen tables
> bigger than that? Did you notice any performance impact.
> Our table is at 14million rows and is about 14gb, we are analysing all
> opportunities at present and would like a second opinion please.
> Regards,
> Marc|||> We have been recommended by our database designers that 20million rows is theed">
> maximum number of rows a data warehouse should be on SQLServer.
If your database designers say this then what do they recommend you do about
it? Sounds like either a sales pitch or a lame excuse for poor performance.
There is no fixed limit on the number of rows in a SQL Server table. Even if
there were such a limitation it would be irrelevant in a DW scenario because
you can implement a partitioned view across many tables on many different
devices.
14GB is a fairly modest sized data warehouse. DW on the terabyte scale is
pretty normal in SQL Server today.
David Portas
SQL Server MVP
--|||thx jacco,
we have a table 95 columns wide with 3228 characters.
the table is actually 18million rows(my mistake), we have had some
performance issues with it such as when linked to other large
tables(4million+ records).
Do you think the number of records or the row size is more important
Most of our columns are integers [ID's] but we do have some with
smalldatetime and one with a 19 char length!
we have people coming to talk teradata/oracle etc etc but no one has yet
identified the database design flaws yet. How can we look at this in more
detail especially in respect to the 20million maximum rowcount table size!
Appreciate your input
Marc|||As David emphasised, there is no limit to the number of rows in a table in
SQL Server. That the (flawed) design and lack of performance tuning skills
of your database designers doesn't allow for a reasonable performance with
20 millions row on your system, is their fault and not SQL Server's.
It's almost impossible to give proper advice in a newsgroup post on database
design flaws and performance issues in what seems a reasonably large system.
The best thing you can do is get an independent consultant in for a few days
to check the system. It will cost some money upfront, but will save you
loads in the long run. A number of MVPs work as independent consultants, and
I can forward your details to them if you contact me offline.
Jacco Schalkwijk
SQL Server MVP
"marcmc" <marcmc@.discussions.microsoft.com> wrote in message
news:40A756CA-0E23-4F44-8EE0-D742C1EF9C99@.microsoft.com...
> thx jacco,
> we have a table 95 columns wide with 3228 characters.
> the table is actually 18million rows(my mistake), we have had some
> performance issues with it such as when linked to other large
> tables(4million+ records).
> Do you think the number of records or the row size is more important
> Most of our columns are integers [ID's] but we do have some with
> smalldatetime and one with a 19 char length!
> we have people coming to talk teradata/oracle etc etc but no one has yet
> identified the database design flaws yet. How can we look at this in more
> detail especially in respect to the 20million maximum rowcount table size!
> Appreciate your input
> Marc
>|||> Do you think the number of records or the row size is more important
Neither. Optimal design and implementation are immeasurably more important.
Lousy design can destroy performance with only a few thousand rows. Since yo
u
(or your namesake) just stated in another thread that you "always use
cursors" you may not need to look any further than that for an explanation o
f
why you can't scale.
David Portas
SQL Server MVP
--
"marcmc" wrote:

> thx jacco,
> we have a table 95 columns wide with 3228 characters.
> the table is actually 18million rows(my mistake), we have had some
> performance issues with it such as when linked to other large
> tables(4million+ records).
> Do you think the number of records or the row size is more important
> Most of our columns are integers [ID's] but we do have some with
> smalldatetime and one with a 19 char length!
> we have people coming to talk teradata/oracle etc etc but no one has yet
> identified the database design flaws yet. How can we look at this in more
> detail especially in respect to the 20million maximum rowcount table size!
> Appreciate your input
> Marc
>|||To add to what everyone else says, after design (and a 95 column wide table
may or may not be a design issue, depending on if this is a fact table or
not (if so, then 80+ dimensions may be an issue, but I degress) the hardware
is the key. Too often people who claim some fixed number as a maximum don't
think of a Windows server as scalable. A lot will depend on your disk
subsystem for example. You might be doing your work on IDE drives, or a
slow Raid-5 array, or one of unlimited possibilites. When you start to
approact a large size/many users, the cost does go up greatly, but it is
likely not SQL Server's fault (as these vendors may tell you it is, since
they have a vested interest in you going to Oracle on their hardware)
As Jacco says in particular, you need someone to look at all of these
factors independent of a hardward/software vendor (ie they aren't
salespeople!) to get a valid look at what is going on.
----
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP
"Arguments are to be avoided: they are always vulgar and often convincing."
(Oscar Wilde)
"marcmc" <marcmc@.discussions.microsoft.com> wrote in message
news:40A756CA-0E23-4F44-8EE0-D742C1EF9C99@.microsoft.com...
> thx jacco,
> we have a table 95 columns wide with 3228 characters.
> the table is actually 18million rows(my mistake), we have had some
> performance issues with it such as when linked to other large
> tables(4million+ records).
> Do you think the number of records or the row size is more important
> Most of our columns are integers [ID's] but we do have some with
> smalldatetime and one with a 19 char length!
> we have people coming to talk teradata/oracle etc etc but no one has yet
> identified the database design flaws yet. How can we look at this in more
> detail especially in respect to the 20million maximum rowcount table size!
> Appreciate your input
> Marc
>

Maximum SQL 2005 Database Size

Hello! I'm trying to figure out what the ultimate size limitation for a SQL 2005 Enterprise server is. This document is helpful but I'm a bit confused:

http://msdn2.microsoft.com/en-us/library/ms143432.aspx

In the document, it says that the maximum database size is 524,258 terabytes; however, it also says that the maximum data file size--which I assume is the .MDF file--is 16 terabytes. My question is, how can you create a 524,258 TB database if the maximum file size 16 TB?

Dumb question, I'm sure...please enlighten me!

Norm

A database have minimum a data file and a log file so

(I quote from that document)

File size (data)

16 terabytes

16 terabytes

File size (log)

2 terabytes

2 terabytes

mean that you can have (528,258-2):16=33016 data files (id est 1 mdf file and 33015 ndf files) and 1 log file.

Or other combination of data and log files that totalize 528,258 terabytes.

|||I still don't understand. If I create a database, call it NewJack, the system automatically creates an .MDF file named newjack.mdf. If that file is limited to 16TB, then my NewJack database can only be 16TB...right?|||

In Management Studio right click on your database go to properties then go to files and file groups, these two properties let you add and remove MDF, LDF and NDF as needed. That is you can place a set of tables in a file group and the indexes in separate file groups try the link below for how you can use the file groups to separate fast growing databases into smaller manageable file groups.

http://msdn2.microsoft.com/en-us/library/ms179316.aspx

Maximum size of the SSIS String Variable?

In SSIS, what is the maximum size of the String variable (one that you would define in the Variables dialog box)?

I think its 4000 but I could be mistaken.

|||

4000 is the limit on expressions. I'm not sure what the limit is on strings.

|||

jwelch wrote:

4000 is the limit on expressions. I'm not sure what the limit is on strings.

This is all true. Technically, I'm not sure there's a limit on the string variables. Though you can't really use that variable anywhere without the 4000 character expression limit applying. (Most of the time the variable is used in an expression SOMEWHERE...)

|||

I don't believe there is a limit on the string variable size. As mentioned, there is a 4000 character limit in the expression editor, and I believe the limit for NVARCHAR fields for the SQL Native Client provider is also 4000 (above that it has to be NTEXT).

|||

I'm using the String variable to store the text of an XML File that I then reference in the XML Source component, so the 4000 character limit isn't a concern for me.

I'm wondering, though, when the size of the String variable becomes a problem -- will it handle the text 100K file? I suppose I should just do a quick test and see what happens.

|||

Post back and let us know.

|||

I just loaded a 600,000+ character file into an SSIS String variable without any problems, so I'm assuming that there isn't a built-in maximum size -- although, as the other posters mentioned, there are limitations on size of a String variable you can use in expressions, etc.

This should be very useful for my purposes -- now I'm able able to store my medium-sized XML files as SSIS Strings (for use in the XML Source component) without much worry.

|||

Can you let us know how you loaded this many characters into the SSIS string variable?

Maximum size of the SSIS String Variable?

In SSIS, what is the maximum size of the String variable (one that you would define in the Variables dialog box)?

I think its 4000 but I could be mistaken.

|||

4000 is the limit on expressions. I'm not sure what the limit is on strings.

|||

jwelch wrote:

4000 is the limit on expressions. I'm not sure what the limit is on strings.

This is all true. Technically, I'm not sure there's a limit on the string variables. Though you can't really use that variable anywhere without the 4000 character expression limit applying. (Most of the time the variable is used in an expression SOMEWHERE...)

|||

I don't believe there is a limit on the string variable size. As mentioned, there is a 4000 character limit in the expression editor, and I believe the limit for NVARCHAR fields for the SQL Native Client provider is also 4000 (above that it has to be NTEXT).

|||

I'm using the String variable to store the text of an XML File that I then reference in the XML Source component, so the 4000 character limit isn't a concern for me.

I'm wondering, though, when the size of the String variable becomes a problem -- will it handle the text 100K file? I suppose I should just do a quick test and see what happens.

|||

Post back and let us know.

|||

I just loaded a 600,000+ character file into an SSIS String variable without any problems, so I'm assuming that there isn't a built-in maximum size -- although, as the other posters mentioned, there are limitations on size of a String variable you can use in expressions, etc.

This should be very useful for my purposes -- now I'm able able to store my medium-sized XML files as SSIS Strings (for use in the XML Source component) without much worry.

|||

Can you let us know how you loaded this many characters into the SSIS string variable?

Maximum size of the SSIS String Variable?

In SSIS, what is the maximum size of the String variable (one that you would define in the Variables dialog box)?

I think its 4000 but I could be mistaken.

|||

4000 is the limit on expressions. I'm not sure what the limit is on strings.

|||

jwelch wrote:

4000 is the limit on expressions. I'm not sure what the limit is on strings.

This is all true. Technically, I'm not sure there's a limit on the string variables. Though you can't really use that variable anywhere without the 4000 character expression limit applying. (Most of the time the variable is used in an expression SOMEWHERE...)

|||

I don't believe there is a limit on the string variable size. As mentioned, there is a 4000 character limit in the expression editor, and I believe the limit for NVARCHAR fields for the SQL Native Client provider is also 4000 (above that it has to be NTEXT).

|||

I'm using the String variable to store the text of an XML File that I then reference in the XML Source component, so the 4000 character limit isn't a concern for me.

I'm wondering, though, when the size of the String variable becomes a problem -- will it handle the text 100K file? I suppose I should just do a quick test and see what happens.

|||

Post back and let us know.

|||

I just loaded a 600,000+ character file into an SSIS String variable without any problems, so I'm assuming that there isn't a built-in maximum size -- although, as the other posters mentioned, there are limitations on size of a String variable you can use in expressions, etc.

This should be very useful for my purposes -- now I'm able able to store my medium-sized XML files as SSIS Strings (for use in the XML Source component) without much worry.

|||

Can you let us know how you loaded this many characters into the SSIS string variable?

Maximum size of the contains_search_condition clause in a CONTAINS statement

Hi,
We're using the SQL Server Full Text Engine to implement a search engine. Users can enter queries which are then executed using the CONTAINS statement. I can't find any documentation that indicates the maximum allowable size of the contains_search_conditi
on clause. Our users' search terms can be quite complex with many Boolean predicates. As a result they can become quite long: several hundred or even a few thousand characters long. What is the upper size limit?
Many thanks,
Dan
Dan,
There was an early bug in SQL Server 2000 RTM that limited the max character
length to 1023 (1K -1), but it was fixed in SP1.
I believe that the max character limit was extended to the max length of
char/varchar datatype length of 8000.
Regards,
John
"Dan Crow" <anonymous@.discussions.microsoft.com> wrote in message
news:A46B5192-072F-4DF0-8D9E-F44D955EDB58@.microsoft.com...
> Hi,
> We're using the SQL Server Full Text Engine to implement a search engine.
Users can enter queries which are then executed using the CONTAINS
statement. I can't find any documentation that indicates the maximum
allowable size of the contains_search_condition clause. Our users' search
terms can be quite complex with many Boolean predicates. As a result they
can become quite long: several hundred or even a few thousand characters
long. What is the upper size limit?
> Many thanks,
> Dan

Maximum size of table?

SQL20 Ent SP3 WIN2K Adv SP3
I'm hoping for some guidance here.
I've a single table with 184,000,000 rows, I think this is probably
a good candidate for some kind of partitioning.
My question is, how many rows would constitute a decent sized
table, before partitioning?
I know it's a very subjective question and depends on row size
database size and others, but any opinions would be most welcome.It's more on what you do with the data and how you access it. Explain a
little of how you access this table and we can give a better answer.
--
Andrew J. Kelly
SQL Server MVP
"Stressed" <k@.c.co.uk> wrote in message
news:uIKG5g7SDHA.2248@.TK2MSFTNGP11.phx.gbl...
> SQL20 Ent SP3 WIN2K Adv SP3
> I'm hoping for some guidance here.
> I've a single table with 184,000,000 rows, I think this is probably
> a good candidate for some kind of partitioning.
> My question is, how many rows would constitute a decent sized
> table, before partitioning?
> I know it's a very subjective question and depends on row size
> database size and others, but any opinions would be most welcome.
>|||Sorry,
In addition to the previous, Data Junction is used to load the data, query
analyzer is used by our analysts to query the data.
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:ehcR3u7SDHA.2148@.TK2MSFTNGP11.phx.gbl...
> It's more on what you do with the data and how you access it. Explain a
> little of how you access this table and we can give a better answer.
> --
> Andrew J. Kelly
> SQL Server MVP
>
> "Stressed" <k@.c.co.uk> wrote in message
> news:uIKG5g7SDHA.2248@.TK2MSFTNGP11.phx.gbl...
> > SQL20 Ent SP3 WIN2K Adv SP3
> >
> > I'm hoping for some guidance here.
> >
> > I've a single table with 184,000,000 rows, I think this is probably
> > a good candidate for some kind of partitioning.
> >
> > My question is, how many rows would constitute a decent sized
> > table, before partitioning?
> >
> > I know it's a very subjective question and depends on row size
> > database size and others, but any opinions would be most welcome.
> >
> >
>|||When you do these updates right after you import the data does it involve
any of the previous rows or just the new ones? How about the subsets, are
they created only from the new data? Sounds like you work mainly with
blocks of data, maybe by date. If that's true then you may consider
partitioning the data by date (weeks, Month, quarter etc) so it's easier to
work with only the relevant data. If you do keep it in a single table then
make sure you have a clustered index on the column(s) that will allow you to
differentiate the current data. Otherwise you may be scanning the entire
table over and over for these updates and queries.
--
Andrew J. Kelly
SQL Server MVP
"Stressed" <k@.c.co.uk> wrote in message
news:uaxCE27SDHA.1556@.TK2MSFTNGP10.phx.gbl...
> Thanks for taking the time to reply.
> Table is used in a warehousing type environment. Initially a bulk load,
> then incremental loads, approx once a month. Once the load has taken
> place a series of updates are performed, following that, the table is
> used to create subsets of data in another database, for shipping to our
> client sites for review.
> In short, much loading, some updating, much querying.
> I hope this gives a reasonable insight.
>
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:ehcR3u7SDHA.2148@.TK2MSFTNGP11.phx.gbl...
> > It's more on what you do with the data and how you access it. Explain a
> > little of how you access this table and we can give a better answer.
> >
> > --
> >
> > Andrew J. Kelly
> > SQL Server MVP
> >
> >
> > "Stressed" <k@.c.co.uk> wrote in message
> > news:uIKG5g7SDHA.2248@.TK2MSFTNGP11.phx.gbl...
> > > SQL20 Ent SP3 WIN2K Adv SP3
> > >
> > > I'm hoping for some guidance here.
> > >
> > > I've a single table with 184,000,000 rows, I think this is probably
> > > a good candidate for some kind of partitioning.
> > >
> > > My question is, how many rows would constitute a decent sized
> > > table, before partitioning?
> > >
> > > I know it's a very subjective question and depends on row size
> > > database size and others, but any opinions would be most welcome.
> > >
> > >
> >
> >
>

Maximum Size of OPENXML IN SP

How much data we can pass through as an XML Text into SP by the concept OPENXML

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql90/html/sql2k5xmloptions.asp

"Limitations
...The size of an XML document that can be stored in Novarchar (max) data type is limited to 2GB. ... "

HTH

Maximum Size for UDT

Hi,
I want to use UserDefined format for my CLR UDT and I need a formula to
calculate its MaxSize.
Thanks in advance,
Leila"Leila" <Leilas@.hotpop.com> wrote in
news:eVTHivsHGHA.2300@.TK2MSFTNGP15.phx.gbl:

> Hi,
> I want to use UserDefined format for my CLR UDT and I need a formula
> to calculate its MaxSize.
There is as such, no formula. A UDT can not be bigger than 8k, so the
sum of the sizes of all fields in the UDT is not allowed to be greater
than 8K. In other words, if you have three integer fields, the size is
12. The pronlem occurs when you have variable length fields (strings for
example), then you have to make sure the combined size of the fields do
not exceed 8k.
Niels
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********|||> I want to use UserDefined format for my CLR UDT and I need a formula to
> calculate its MaxSize.
> Thanks in advance,
You have to implement the Write method by yourself, so it is up to you how
long will it be. You have to persist your internal members (variables). So
you check how many of them there are to persist, which data type do they
use, etc. Also, you might add some (8?) bytes in the beginning of the
serialized data for ordering and indexing.
Dejan Sarka, SQL Server MVP
Mentor, www.SolidQualityLearning.com
Anything written in this message represents solely the point of view of the
sender.
This message does not imply endorsement from Solid Quality Learning, and it
does not represent the point of view of Solid Quality Learning or any other
person, company or institution mentioned in this message|||Hi Leila,
There are only two serialization choices in the SQL Server 2005 RTM. With a
Format.Native UDT, you don't need to (in fact shouldn't) specify
MaxByteSize, the Native serialization code will figure it out. Format.Native
has some additional requirements, though, you can't use it with all UDTs.
Check BOL for these requirements.
The other choice is Format.UserDefined. With this format, you are in control
of the UDT serialization, so you must know how you're going to write the UDT
and what MaxByteSize should be.
In no case can the UDT MaxByteSize exceed 8000 bytes in this release.
Cheers,
Bob Beauchemin
http://www.SQLskills.com/blogs/bobb
"Leila" <Leilas@.hotpop.com> wrote in message
news:eVTHivsHGHA.2300@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I want to use UserDefined format for my CLR UDT and I need a formula to
> calculate its MaxSize.
> Thanks in advance,
> Leila
>
>|||Thanks every body :-)
I had poblem with this sentence: "Number of control bytes of overhead
incurred from serializing a binary stream".
By reading your replies, I realized that I must not be worried about
calculating these extra bytes if I am using Format.Native!
But should I still care about it when I'm using Format.UserDefined? or there
will not be extra overhead in addition to what I write on disk?
Leila
"Bob Beauchemin" <no_bobb_spam@.sqlskills.com> wrote in message
news:ORgVKQtHGHA.2012@.TK2MSFTNGP14.phx.gbl...
> Hi Leila,
> There are only two serialization choices in the SQL Server 2005 RTM. With
> a Format.Native UDT, you don't need to (in fact shouldn't) specify
> MaxByteSize, the Native serialization code will figure it out.
> Format.Native has some additional requirements, though, you can't use it
> with all UDTs. Check BOL for these requirements.
> The other choice is Format.UserDefined. With this format, you are in
> control of the UDT serialization, so you must know how you're going to
> write the UDT and what MaxByteSize should be.
> In no case can the UDT MaxByteSize exceed 8000 bytes in this release.
> Cheers,
> Bob Beauchemin
> http://www.SQLskills.com/blogs/bobb
>
> "Leila" <Leilas@.hotpop.com> wrote in message
> news:eVTHivsHGHA.2300@.TK2MSFTNGP15.phx.gbl...
>|||I was thinking they should add a Format.None so you could have something
like an Array type they really needs more then 8K, and you don't need as a
column type either - you just need the type to work with.
William Stacey [MVP]
"Bob Beauchemin" <no_bobb_spam@.sqlskills.com> wrote in message
news:ORgVKQtHGHA.2012@.TK2MSFTNGP14.phx.gbl...
| Hi Leila,
|
| There are only two serialization choices in the SQL Server 2005 RTM. With
a
| Format.Native UDT, you don't need to (in fact shouldn't) specify
| MaxByteSize, the Native serialization code will figure it out.
Format.Native
| has some additional requirements, though, you can't use it with all UDTs.
| Check BOL for these requirements.
|
| The other choice is Format.UserDefined. With this format, you are in
control
| of the UDT serialization, so you must know how you're going to write the
UDT
| and what MaxByteSize should be.
|
| In no case can the UDT MaxByteSize exceed 8000 bytes in this release.
|
| Cheers,
| Bob Beauchemin
| http://www.SQLskills.com/blogs/bobb
|
|
| "Leila" <Leilas@.hotpop.com> wrote in message
| news:eVTHivsHGHA.2300@.TK2MSFTNGP15.phx.gbl...
| > Hi,
| > I want to use UserDefined format for my CLR UDT and I need a formula to
| > calculate its MaxSize.
| > Thanks in advance,
| > Leila
| >
| >
| >
|
|

Maximum size for "ntext" type in sql server

I couldn't insert more than 4000 charachters in "ntext" type in SQL server. Is there anyway, i can increase the size or any suggestions?ntext columns are limited to 2GB? Sounds like how you are setting the ntext is limited to 4000 characters, not the column itself.|||I am using NHibernate as persistent layer, may be NHibernate is limited to 4000 characters.

Thanks|||NText is 1gig because Unicode is multibytes. Hope this helps.|||Hi,

Try to post this problem on this forum http://sqlservercentral.com/forums/Default.aspx.

Or post some code that you are executing, or T-SQL commands to createthe table with column that is truncating your string. It sounds likethis column is nvarchar(4000), not ntext. 8000 bytes, this is the limitfor nvarchar.|||My column data type is "ntext" and acually i tried t-sql command to insert the very long text and there is no problem.

I guess, my problem as i said earlier is the persisten layer "NHibernate". it should've give me exception if i exceed the allowed size but i don't get any. Therefore, what i am guessing is, the maximum allowed size for NHibernate is 4000 chars..most likly is trunckates strings before it saves.

I also know that it is possible to tell NHibernate about the data types of the columns. I will try that.

Thanks|||Sorry,

I wasn't to helpful last time :) but I googled it, and found this post:

http://www.castleproject.org/index.php/ActiveRecord:Troubleshooting#Text_Columns_are_truncated_in_Sql_Server

Hope this time it will help :)|||I really thanks you...
I was guessing but now you make me sure of the NHibernate bug.
Thanks again

maximum row size.. 8060 bytes ?

I got a warning like this.
Warning: The table 'tbSOTransHeader' has been created but
its maximum row size (9911) exceeds the maximum number of
bytes per row (8060). INSERT or UPDATE of a row in this
table will fail if the resulting row length exceeds 8060
bytes.
My questions are :
1. Is it true max row size is 8060 bytes ?
2. Can we make it larger ?
Thanks.Yes the max amount of actual data in the row can only be 8060. You can
create a table, view etc larger than that with variable length columns as
long as when populated they don't total more than that. NO you can't make
it larger.
--
Andrew J. Kelly
SQL Server MVP
"kresna rudy kurniawan" <kresnark@.yahoo.com> wrote in message
news:082a01c3728f$48917d50$a301280a@.phx.gbl...
> I got a warning like this.
> Warning: The table 'tbSOTransHeader' has been created but
> its maximum row size (9911) exceeds the maximum number of
> bytes per row (8060). INSERT or UPDATE of a row in this
> table will fail if the resulting row length exceeds 8060
> bytes.
> My questions are :
> 1. Is it true max row size is 8060 bytes ?
> 2. Can we make it larger ?
> Thanks.
>|||Is there a function or stored procedure in T-sql to
calculate bytes in a row ?
thx.
>--Original Message--
>Yes the max amount of actual data in the row can only be
8060. You can
>create a table, view etc larger than that with variable
length columns as
>long as when populated they don't total more than that.
NO you can't make
>it larger.
>--
>Andrew J. Kelly
>SQL Server MVP
>
>"kresna rudy kurniawan" <kresnark@.yahoo.com> wrote in
message
>news:082a01c3728f$48917d50$a301280a@.phx.gbl...
>> I got a warning like this.
>> Warning: The table 'tbSOTransHeader' has been created
but
>> its maximum row size (9911) exceeds the maximum number
of
>> bytes per row (8060). INSERT or UPDATE of a row in this
>> table will fail if the resulting row length exceeds 8060
>> bytes.
>> My questions are :
>> 1. Is it true max row size is 8060 bytes ?
>> 2. Can we make it larger ?
>> Thanks.
>>
>
>.
>|||use datalength.
ex: select datalength(col1) + datalength(col2) ... from <table>
--
-Vishal
kresna rudy kurniawan <kresnark@.yahoo.com> wrote in message
news:163c01c37293$55393f80$a601280a@.phx.gbl...
> Is there a function or stored procedure in T-sql to
> calculate bytes in a row ?
> thx.
>
> >--Original Message--
> >Yes the max amount of actual data in the row can only be
> 8060. You can
> >create a table, view etc larger than that with variable
> length columns as
> >long as when populated they don't total more than that.
> NO you can't make
> >it larger.
> >
> >--
> >
> >Andrew J. Kelly
> >SQL Server MVP
> >
> >
> >"kresna rudy kurniawan" <kresnark@.yahoo.com> wrote in
> message
> >news:082a01c3728f$48917d50$a301280a@.phx.gbl...
> >> I got a warning like this.
> >>
> >> Warning: The table 'tbSOTransHeader' has been created
> but
> >> its maximum row size (9911) exceeds the maximum number
> of
> >> bytes per row (8060). INSERT or UPDATE of a row in this
> >> table will fail if the resulting row length exceeds 8060
> >> bytes.
> >>
> >> My questions are :
> >>
> >> 1. Is it true max row size is 8060 bytes ?
> >> 2. Can we make it larger ?
> >>
> >> Thanks.
> >>
> >>
> >
> >
> >.
> >|||kresna rudy kurniawan wrote:
> I got a warning like this.
> Warning: The table 'tbSOTransHeader' has been created but
> its maximum row size (9911) exceeds the maximum number of
> bytes per row (8060). INSERT or UPDATE of a row in this
> table will fail if the resulting row length exceeds 8060
> bytes.
> My questions are :
> 1. Is it true max row size is 8060 bytes ?
> 2. Can we make it larger ?
> Thanks.
All columns of the row have to fit in the page (maximum 8060 bytes),
except for data types text, ntext and image. For those data types, only
16 bytes (for each text/ntext/image column) are needed in the page that
stores the row.
So if the current data does not fit the page, it might be an option to
change large char, nchar, varchar or nvarchar columns to text or ntext.
Hope this helps,
Gert-Jan

maximum row size problem

Hi,
I've got a table in a database [columns: int, int, int, nvarchar(100), nvarchar(200), nvarchar(500), nvarchar(4000) ]

The problem I have is that when I try to insert a record, sqlserver is returning "Cannot create a row of size 9629 which is greater than the allowable maximum of 8060."

I had a search before posting here and best answer I could find was to alter maxlen in sysindexes - however, I'm far from being an expert on sqlserver so I dont really want to just blindly alter things and find I screw something up.

Any ideas on how to solve this?

Thanksnvarchar(4000)? Why? Why not an NTEXT?

NTEXT can be up to 2gb, and does NOT count against the limit.

Otherwise you can NOT change this limit. 8060 is a hardcoded limit.|||ok, i'll try that, thanks

Maximum Row Size Limitation

Is the maximum row size per table really limited to
8K bytes? Or is this the internal organization of SQL
data structures. I have imported a legacy table that
wound up having over 100 columns that came in as
NVARCHAR(255) or roughly 25K + in size. Any comments?
ThanksIt will allow you to create the object with the warning something as
The table % has been created but its maximum row size (%) exceeds the
maximum number of bytes per row (8060)
Ex:
create table test_size
(i1 nvarchar(255),
i2 nvarchar(255),
i3 nvarchar(255),
i4 nvarchar(255),
i6 nvarchar(255),
i8 nvarchar(255),
i9 nvarchar(255),
i10 nvarchar(255),
i11 nvarchar(255),
i12 nvarchar(255),
i14 nvarchar(255),
i19 nvarchar(255),
i20 nvarchar(255),
i21 nvarchar(255),
i22 nvarchar(255),
i23 nvarchar(255),
i24 nvarchar(255),
i30 nvarchar(255),
i31 nvarchar(255),
i32 nvarchar(255),
i33 nvarchar(255))
This is because you are using nvarchar datatype which is variable length
data type. Hence it will give you
error at runtime if actual data that you are going to insert goes beyond
8060 bytes. Also point to be noted
that nvarchar table 2 bytes to store a single character.
So SQL server is happy to create a table though a table crosses limit of
8060 bytes per row so far you use
variable data type like varchar/nvarchar but it will throw you an error
while inserting/updating data if actual
row size that a row will occupy goes beyond this limit.
--
-Vishal
"wringland" <bill@.tiati.com> wrote in message
news:001001c34fa3$3447a540$a401280a@.phx.gbl...
> Is the maximum row size per table really limited to
> 8K bytes? Or is this the internal organization of SQL
> data structures. I have imported a legacy table that
> wound up having over 100 columns that came in as
> NVARCHAR(255) or roughly 25K + in size. Any comments?
> Thanks|||And Dinesh is referring to the "hard" limit of the row size. When you have
varchar columns, you need to figure in the "soft" factor: the actual limit
is applied to the actual size of content. If you have 100 nvarchar(255)
columns and each column has only 1 character in it, the row size would be
(100 (columns) x 1 (character each column) x 2 (for Nvarchar) + 9 (row
overhead) ) = 209 bytes.
"Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
news:OsEUMR6TDHA.3700@.tk2msftngp13.phx.gbl...
> Bill,
> The maximum row size is 8060 bytes except for blob data types as TEXT ,
> IMAGE etc.That means your 25K table wont fit in.Moreover, you are using
the
> unicode datatype, NVARCHAR, which itself take twice as much storage space
as
> non-unicode data types.
> --
> Dinesh.
> SQL Server FAQ at
> http://www.tkdinesh.com
> "wringland" <bill@.tiati.com> wrote in message
> news:001001c34fa3$3447a540$a401280a@.phx.gbl...
> > Is the maximum row size per table really limited to
> > 8K bytes? Or is this the internal organization of SQL
> > data structures. I have imported a legacy table that
> > wound up having over 100 columns that came in as
> > NVARCHAR(255) or roughly 25K + in size. Any comments?
> >
> > Thanks
>|||Thanks for the reply. Can you perhaps explain why the
table was imported into SQL and the table design show the
proper format and size for the columns. All does seem to
be well with the data.
Thanks
>--Original Message--
>Bill,
>The maximum row size is 8060 bytes except for blob data
types as TEXT ,
>IMAGE etc.That means your 25K table wont fit in.Moreover,
you are using the
>unicode datatype, NVARCHAR, which itself take twice as
much storage space as
>non-unicode data types.
>--
>Dinesh.
>SQL Server FAQ at
>http://www.tkdinesh.com
>"wringland" <bill@.tiati.com> wrote in message
>news:001001c34fa3$3447a540$a401280a@.phx.gbl...
>> Is the maximum row size per table really limited to
>> 8K bytes? Or is this the internal organization of SQL
>> data structures. I have imported a legacy table that
>> wound up having over 100 columns that came in as
>> NVARCHAR(255) or roughly 25K + in size. Any comments?
>> Thanks
>
>.
>|||> Thanks for the reply. Can you perhaps explain why the
> table was imported into SQL and the table design show the
> proper format and size for the columns. All does seem to
> be well with the data.
Because the data is not "full" - you will only get an error if you attempt
to put more than 8,060 bytes of *actual data* into the table. I am guessing
that many of your nvarchar(255) columns are NULL or blank.|||Bill,
As mentioned in other posts, SQL server will let you create the table with a
warning about data truncation.While inserting data, the moment a particular
rowsize exceeds 8060, the rest would be truncated and you wouldnt even
know.Means while querying the table, you may be looking at incomplete and
thus false data.
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"wringland" <bill@.tiati.com> wrote in message
news:009201c34fa7$6db8dbb0$a401280a@.phx.gbl...
> Thanks for the reply. Can you perhaps explain why the
> table was imported into SQL and the table design show the
> proper format and size for the columns. All does seem to
> be well with the data.
> Thanks
> >--Original Message--
> >Bill,
> >
> >The maximum row size is 8060 bytes except for blob data
> types as TEXT ,
> >IMAGE etc.That means your 25K table wont fit in.Moreover,
> you are using the
> >unicode datatype, NVARCHAR, which itself take twice as
> much storage space as
> >non-unicode data types.
> >
> >--
> >Dinesh.
> >SQL Server FAQ at
> >http://www.tkdinesh.com
> >
> >"wringland" <bill@.tiati.com> wrote in message
> >news:001001c34fa3$3447a540$a401280a@.phx.gbl...
> >> Is the maximum row size per table really limited to
> >> 8K bytes? Or is this the internal organization of SQL
> >> data structures. I have imported a legacy table that
> >> wound up having over 100 columns that came in as
> >> NVARCHAR(255) or roughly 25K + in size. Any comments?
> >>
> >> Thanks
> >
> >
> >.
> >|||> As mentioned in other posts, SQL server will let you create the table with
a
> warning about data truncation.While inserting data, the moment a
particular
> rowsize exceeds 8060, the rest would be truncated and you wouldnt even
> know.
Actually in this case, wouldn't you get the "string or binary data would be
truncated" error message?|||I have five fields each varchar(5000) and about
8 other columns between 50 and 100 bytes each.
so in answer to your question, none is > 8060.
>--Original Message--
>What is your current table structure? Are there one or
two columns forcing
>it beyond 8,060, or do you have 100 columns that are 255
characters?
>
>
>"Alice" <mygth@.hotmail.com> wrote in message
>news:056401c34fce$de321fb0$a101280a@.phx.gbl...
>> I am running into similar situation,
>> I am creating new table with rowsize > 8060,
>> my rowsize is 25000, is there any way by which
>> I can increase the rowsize to this limit?
>> I read on microsoft site that this limiation existed
>> on 6.5 and u.s. pack 2 fixed it. Any ideas?
>> BTW, I am on Sql 7.
>
>.
>|||Alice,
>> Then why do they say US patch 4 fixes it for sql 6.5?
What article are you talking about?
Thanks!
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Alice" <mygth@.hotmail.com> wrote in message
news:04a101c34fda$1dcc50e0$a401280a@.phx.gbl...
> well, I was thinking on those lines, but I am surprised
> that we cannot have > 8060 characters in a row.
> Then why do they say US patch 4 fixes it for sql 6.5?
> unless I am mistaken.
> >--Original Message--
> >> I have five fields each varchar(5000) and about
> >> 8 other columns between 50 and 100 bytes each.
> >>
> >> so in answer to your question, none is > 8060.
> >
> >If you expect to ever fill more than 8,060 characters
> across the row, then
> >you're going to have to make a decision. You could use
> text columns, or you
> >could put each varchar(5000) in its own table with a
> foreign key to this
> >tables pk. Are you expecting to use all 5000 characters
> in any row/column
> >combination? If not, you might consider decreasing the
> size to reduce the
> >number of columns you'll have to store off-row.
> >
> >
> >.
> >

Maximum Row Size in SQL Server 2000

Using this code:
CREATE TABLE [dbo].[test] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[COMMENT1] [varchar] (8000) NULL ,
[COMMENT2] [varchar] (8000) NULL
) ON [PRIMARY]
GO
I get the error: Warning: The table 'test' has been created but its maximum
row size (16029) exceeds the maximum number of bytes per row (8060).
However, I can create a table with smaller field lengths:
CREATE TABLE [dbo].[test] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[COMMENT1] [varchar] (10) NULL ,
[COMMENT2] [varchar] (10) NULL
) ON [PRIMARY]
GO
I can then alter the field lengths in Enterprise Manager back to 8000 and
not get the error. I also notice I can import data from a text file and a
table will be created with numerous varchar fields that are each 8000 in
size. Why cannot I create the table with multiple 8000 length fields but SQ
L
Server allows me to modify an existing table or import into a table that has
multiple 8000 length fields?
Thank you.Hi,
like you said, you get a "Warning" no error. SQL Server just wants to
keep you informed that the data *might* be truncated, if you insert
more than 8000 characters, but the table *will* be created.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--|||The warning you get is only a warning. The table is still created. Read the
warning text carefully.
The table is created, but if you , for a row, try to have > 8060 bytes (when
you do INSERT or
UPDATE), then that operation will fail.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Brian P" <BrianP@.discussions.microsoft.com> wrote in message
news:7F71DB7B-6F5E-4ABC-90AA-A988691D095A@.microsoft.com...
> Using this code:
> CREATE TABLE [dbo].[test] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [COMMENT1] [varchar] (8000) NULL ,
> [COMMENT2] [varchar] (8000) NULL
> ) ON [PRIMARY]
> GO
> I get the error: Warning: The table 'test' has been created but its maximu
m
> row size (16029) exceeds the maximum number of bytes per row (8060).
> However, I can create a table with smaller field lengths:
> CREATE TABLE [dbo].[test] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [COMMENT1] [varchar] (10) NULL ,
> [COMMENT2] [varchar] (10) NULL
> ) ON [PRIMARY]
> GO
> I can then alter the field lengths in Enterprise Manager back to 8000 and
> not get the error. I also notice I can import data from a text file and a
> table will be created with numerous varchar fields that are each 8000 in
> size. Why cannot I create the table with multiple 8000 length fields but
SQL
> Server allows me to modify an existing table or import into a table that h
as
> multiple 8000 length fields?
> Thank you.
>
>
>|||Thank you for the information. So I can have a table with numerous varchar
8000 fields and I'm ok as long as a single inserted row does not contain mor
e
than 8060 characters. Is this correct?
"Tibor Karaszi" wrote:

> The warning you get is only a warning. The table is still created. Read th
e warning text carefully.
> The table is created, but if you , for a row, try to have > 8060 bytes (wh
en you do INSERT or
> UPDATE), then that operation will fail.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Brian P" <BrianP@.discussions.microsoft.com> wrote in message
> news:7F71DB7B-6F5E-4ABC-90AA-A988691D095A@.microsoft.com...
>
>|||Try it :
INSERT INTO TEST VALUES (REPLICATE('*', 80000), REPLICATE('*', 44))
A +
Brian P a écrit :[vbcol=seagreen]
> Thank you for the information. So I can have a table with numerous varcha
r
> 8000 fields and I'm ok as long as a single inserted row does not contain m
ore
> than 8060 characters. Is this correct?
> "Tibor Karaszi" wrote:
>
Frédéric BROUARD, MVP SQL Server, expert bases de données et langage SQL
Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
Audit, conseil, expertise, formation, modélisation, tuning, optimisation
********************* http://www.datasapiens.com ***********************|||Correct. And, btw, this restriction has been removed in SQL Server 2005 ("pa
ge overflow").
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Brian P" <BrianP@.discussions.microsoft.com> wrote in message
news:4AA95B81-5246-470E-A270-11810106F346@.microsoft.com...
> Thank you for the information. So I can have a table with numerous varcha
r
> 8000 fields and I'm ok as long as a single inserted row does not contain m
ore
> than 8060 characters. Is this correct?
>|||Brian
But be aware that SQL Server 2005 row_overflow data only applies to variable
length fields.
You cannot have multiple char(8000) columns, for example.
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ecx6jdYXGHA.4132@.TK2MSFTNGP04.phx.gbl...[vbcol=seagreen]
> Correct. And, btw, this restriction has been removed in SQL Server 2005
> ("page overflow").
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Brian P" <BrianP@.discussions.microsoft.com> wrote in message
> news:4AA95B81-5246-470E-A270-11810106F346@.microsoft.com...|||Thanks everyone for the good information. I appreciate the feedback.
Brian
"Kalen Delaney" wrote:

> Brian
> But be aware that SQL Server 2005 row_overflow data only applies to variab
le
> length fields.
> You cannot have multiple char(8000) columns, for example.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:ecx6jdYXGHA.4132@.TK2MSFTNGP04.phx.gbl...
>
>

Maximum Row Size in SQL Server 2000

Using this code:
CREATE TABLE [dbo].[test] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[COMMENT1] [varchar] (8000) NULL ,
[COMMENT2] [varchar] (8000) NULL
) ON [PRIMARY]
GO
I get the error: Warning: The table 'test' has been created but its maximum
row size (16029) exceeds the maximum number of bytes per row (8060).
However, I can create a table with smaller field lengths:
CREATE TABLE [dbo].[test] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[COMMENT1] [varchar] (10) NULL ,
[COMMENT2] [varchar] (10) NULL
) ON [PRIMARY]
GO
I can then alter the field lengths in Enterprise Manager back to 8000 and
not get the error. I also notice I can import data from a text file and a
table will be created with numerous varchar fields that are each 8000 in
size. Why cannot I create the table with multiple 8000 length fields but SQL
Server allows me to modify an existing table or import into a table that has
multiple 8000 length fields?
Thank you.Hi,
like you said, you get a "Warning" no error. SQL Server just wants to
keep you informed that the data *might* be truncated, if you insert
more than 8000 characters, but the table *will* be created.
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--|||The warning you get is only a warning. The table is still created. Read the warning text carefully.
The table is created, but if you , for a row, try to have > 8060 bytes (when you do INSERT or
UPDATE), then that operation will fail.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Brian P" <BrianP@.discussions.microsoft.com> wrote in message
news:7F71DB7B-6F5E-4ABC-90AA-A988691D095A@.microsoft.com...
> Using this code:
> CREATE TABLE [dbo].[test] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [COMMENT1] [varchar] (8000) NULL ,
> [COMMENT2] [varchar] (8000) NULL
> ) ON [PRIMARY]
> GO
> I get the error: Warning: The table 'test' has been created but its maximum
> row size (16029) exceeds the maximum number of bytes per row (8060).
> However, I can create a table with smaller field lengths:
> CREATE TABLE [dbo].[test] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [COMMENT1] [varchar] (10) NULL ,
> [COMMENT2] [varchar] (10) NULL
> ) ON [PRIMARY]
> GO
> I can then alter the field lengths in Enterprise Manager back to 8000 and
> not get the error. I also notice I can import data from a text file and a
> table will be created with numerous varchar fields that are each 8000 in
> size. Why cannot I create the table with multiple 8000 length fields but SQL
> Server allows me to modify an existing table or import into a table that has
> multiple 8000 length fields?
> Thank you.
>
>
>|||Thank you for the information. So I can have a table with numerous varchar
8000 fields and I'm ok as long as a single inserted row does not contain more
than 8060 characters. Is this correct?
"Tibor Karaszi" wrote:
> The warning you get is only a warning. The table is still created. Read the warning text carefully.
> The table is created, but if you , for a row, try to have > 8060 bytes (when you do INSERT or
> UPDATE), then that operation will fail.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Brian P" <BrianP@.discussions.microsoft.com> wrote in message
> news:7F71DB7B-6F5E-4ABC-90AA-A988691D095A@.microsoft.com...
> > Using this code:
> >
> > CREATE TABLE [dbo].[test] (
> > [ID] [int] IDENTITY (1, 1) NOT NULL ,
> > [COMMENT1] [varchar] (8000) NULL ,
> > [COMMENT2] [varchar] (8000) NULL
> > ) ON [PRIMARY]
> > GO
> >
> > I get the error: Warning: The table 'test' has been created but its maximum
> > row size (16029) exceeds the maximum number of bytes per row (8060).
> >
> > However, I can create a table with smaller field lengths:
> >
> > CREATE TABLE [dbo].[test] (
> > [ID] [int] IDENTITY (1, 1) NOT NULL ,
> > [COMMENT1] [varchar] (10) NULL ,
> > [COMMENT2] [varchar] (10) NULL
> > ) ON [PRIMARY]
> > GO
> >
> > I can then alter the field lengths in Enterprise Manager back to 8000 and
> > not get the error. I also notice I can import data from a text file and a
> > table will be created with numerous varchar fields that are each 8000 in
> > size. Why cannot I create the table with multiple 8000 length fields but SQL
> > Server allows me to modify an existing table or import into a table that has
> > multiple 8000 length fields?
> >
> > Thank you.
> >
> >
> >
> >
> >
> >
>
>|||Try it :
INSERT INTO TEST VALUES (REPLICATE('*', 80000), REPLICATE('*', 44))
A +
Brian P a écrit :
> Thank you for the information. So I can have a table with numerous varchar
> 8000 fields and I'm ok as long as a single inserted row does not contain more
> than 8060 characters. Is this correct?
> "Tibor Karaszi" wrote:
>> The warning you get is only a warning. The table is still created. Read the warning text carefully.
>> The table is created, but if you , for a row, try to have > 8060 bytes (when you do INSERT or
>> UPDATE), then that operation will fail.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Brian P" <BrianP@.discussions.microsoft.com> wrote in message
>> news:7F71DB7B-6F5E-4ABC-90AA-A988691D095A@.microsoft.com...
>> Using this code:
>> CREATE TABLE [dbo].[test] (
>> [ID] [int] IDENTITY (1, 1) NOT NULL ,
>> [COMMENT1] [varchar] (8000) NULL ,
>> [COMMENT2] [varchar] (8000) NULL
>> ) ON [PRIMARY]
>> GO
>> I get the error: Warning: The table 'test' has been created but its maximum
>> row size (16029) exceeds the maximum number of bytes per row (8060).
>> However, I can create a table with smaller field lengths:
>> CREATE TABLE [dbo].[test] (
>> [ID] [int] IDENTITY (1, 1) NOT NULL ,
>> [COMMENT1] [varchar] (10) NULL ,
>> [COMMENT2] [varchar] (10) NULL
>> ) ON [PRIMARY]
>> GO
>> I can then alter the field lengths in Enterprise Manager back to 8000 and
>> not get the error. I also notice I can import data from a text file and a
>> table will be created with numerous varchar fields that are each 8000 in
>> size. Why cannot I create the table with multiple 8000 length fields but SQL
>> Server allows me to modify an existing table or import into a table that has
>> multiple 8000 length fields?
>> Thank you.
>>
>>
>>
>>
Frédéric BROUARD, MVP SQL Server, expert bases de données et langage SQL
Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
Audit, conseil, expertise, formation, modélisation, tuning, optimisation
********************* http://www.datasapiens.com ***********************|||Correct. And, btw, this restriction has been removed in SQL Server 2005 ("page overflow").
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Brian P" <BrianP@.discussions.microsoft.com> wrote in message
news:4AA95B81-5246-470E-A270-11810106F346@.microsoft.com...
> Thank you for the information. So I can have a table with numerous varchar
> 8000 fields and I'm ok as long as a single inserted row does not contain more
> than 8060 characters. Is this correct?
>|||Brian
But be aware that SQL Server 2005 row_overflow data only applies to variable
length fields.
You cannot have multiple char(8000) columns, for example.
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ecx6jdYXGHA.4132@.TK2MSFTNGP04.phx.gbl...
> Correct. And, btw, this restriction has been removed in SQL Server 2005
> ("page overflow").
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Brian P" <BrianP@.discussions.microsoft.com> wrote in message
> news:4AA95B81-5246-470E-A270-11810106F346@.microsoft.com...
>> Thank you for the information. So I can have a table with numerous
>> varchar
>> 8000 fields and I'm ok as long as a single inserted row does not contain
>> more
>> than 8060 characters. Is this correct?|||Thanks everyone for the good information. I appreciate the feedback.
Brian
"Kalen Delaney" wrote:
> Brian
> But be aware that SQL Server 2005 row_overflow data only applies to variable
> length fields.
> You cannot have multiple char(8000) columns, for example.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:ecx6jdYXGHA.4132@.TK2MSFTNGP04.phx.gbl...
> > Correct. And, btw, this restriction has been removed in SQL Server 2005
> > ("page overflow").
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> > Blog: http://solidqualitylearning.com/blogs/tibor/
> >
> >
> > "Brian P" <BrianP@.discussions.microsoft.com> wrote in message
> > news:4AA95B81-5246-470E-A270-11810106F346@.microsoft.com...
> >> Thank you for the information. So I can have a table with numerous
> >> varchar
> >> 8000 fields and I'm ok as long as a single inserted row does not contain
> >> more
> >> than 8060 characters. Is this correct?
> >>
>
>

Maximum row size for SQLExpress

I was just wondering if SQLExpress will have the same maximum row size
funcationality as SQL Server 2005. (being able to have a single row go
accross multiple pages and allow the entire row to exceed 8060 bytes)?
Thanks,
John Scott.
Hi
8060 applies. If you use the new datatypes NVARCHAR(max) and VARCHAR(max),
those data types get sliced up the SQL Server itself across multiple pages.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"John Scott" <johnscott@.despammed.com> wrote in message
news:08F62DEB-4D56-4E0F-8560-403B46F513B0@.microsoft.com...
>I was just wondering if SQLExpress will have the same maximum row size
> funcationality as SQL Server 2005. (being able to have a single row go
> accross multiple pages and allow the entire row to exceed 8060 bytes)?
>
> Thanks,
> John Scott.
|||Yes, Express has the extended row size functionality introduced in SQL
Server 2005.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"John Scott" <johnscott@.despammed.com> wrote in message
news:08F62DEB-4D56-4E0F-8560-403B46F513B0@.microsoft.com...
>I was just wondering if SQLExpress will have the same maximum row size
> funcationality as SQL Server 2005. (being able to have a single row go
> accross multiple pages and allow the entire row to exceed 8060 bytes)?
>
> Thanks,
> John Scott.

maximum row size exceeds the maximum number of bytes per row (8060

Hi,
I have created a table (say Table1) with few columns, with one of the
columns (say column1) having the data type as Varchar(8000).
Now I run the below query -
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
if not exists (select * from dbo.syscolumns
where id = object_id(N'[dbo].[Table1]')
and OBJECTPROPERTY(id, N'IsUserTable') = 1
and name = 'Column1')
ALTER TABLE dbo.Table1 ADD
Column1 varchar(500) NULL
GO
COMMIT
Now that the column Column1 already exists, the add column statement won't
be executed. But still I get the warning -
"Warning: The table 'Table1' has been created but its maximum row size
(8579) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE
of a row in this table will fail if the resulting row length exceeds 8060
bytes."
My question is, now that the column already exists, the statement itself
won't be executed. Then why do I still get this warning?That has to do with the sequence of query processing and when the warning is generated. Obviously
the warning (the fact that this table will have a row size for which you can exceed the limit in
your data) is generated in a stage which is earlier than when the statements are actually executed.
In other words, the If statement haven't been executed at this stage.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"swap@.@.@." <swap@.discussions.microsoft.com> wrote in message
news:73AC8FFC-4041-4B22-AB25-4CCDB94598FC@.microsoft.com...
> Hi,
> I have created a table (say Table1) with few columns, with one of the
> columns (say column1) having the data type as Varchar(8000).
> Now I run the below query -
> BEGIN TRANSACTION
> SET QUOTED_IDENTIFIER ON
> SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
> SET ARITHABORT ON
> SET NUMERIC_ROUNDABORT OFF
> SET CONCAT_NULL_YIELDS_NULL ON
> SET ANSI_NULLS ON
> SET ANSI_PADDING ON
> SET ANSI_WARNINGS ON
> COMMIT
> BEGIN TRANSACTION
> if not exists (select * from dbo.syscolumns
> where id = object_id(N'[dbo].[Table1]')
> and OBJECTPROPERTY(id, N'IsUserTable') = 1
> and name = 'Column1')
> ALTER TABLE dbo.Table1 ADD
> Column1 varchar(500) NULL
> GO
> COMMIT
> Now that the column Column1 already exists, the add column statement won't
> be executed. But still I get the warning -
> "Warning: The table 'Table1' has been created but its maximum row size
> (8579) exceeds the maximum number of bytes per row (8060). INSERT or UPDATE
> of a row in this table will fail if the resulting row length exceeds 8060
> bytes."
> My question is, now that the column already exists, the statement itself
> won't be executed. Then why do I still get this warning?
>