MSSQL databases greater than 4GB

Get help on databases - MySQL, Oracle, Access, etc.
Post Reply
User avatar
Ron2K
Forum Technical Administrator
Posts: 9050
Joined: 04 Jul 2006, 16:45
Location: Upper Hutt, New Zealand
Contact:

MSSQL databases greater than 4GB

Post by Ron2K »

Hi,

I'm developing an application that reads log files and writes the data to database (MS SQL Server 2005). There's around 10,000 VERY large log files, so the database is going to be huge. I've noticed during testing that as soon as the database hits 4GB in size, SQL Server refuses to grow the database any more which results in data not being written to the database. Now, that 4GB is probably only a third of the data, so that's a problem.

My guess (which may or may not be correct) is that I'll have to use secondary data files, but I can't come up with a way to automatically create a secondary data file and make it the default file on the fly. If anyone has any solutions (or something better than what I'm thinking), I'd much appreciate it.
Kia kaha, Kia māia, Kia manawanui.
User avatar
rustypup
Registered User
Posts: 8872
Joined: 13 Dec 2004, 02:00
Location: nullus pixius demonica
Contact:

Post by rustypup »

compression and store/retrieve as BLOB?...

4GB is a miniscule limit for any db... shamefully small - is there a reason you're not using postgre / mysql / etc..?
Most people would sooner die than think; in fact, they do so - Bertrand Russel
User avatar
Ron2K
Forum Technical Administrator
Posts: 9050
Joined: 04 Jul 2006, 16:45
Location: Upper Hutt, New Zealand
Contact:

Post by Ron2K »

Unfortunately I'm working on Microsoft servers so I'm locked into their pathetic solution.
Kia kaha, Kia māia, Kia manawanui.
bootsie
Registered User
Posts: 436
Joined: 25 Dec 2006, 02:00
Location: J.H.B
Contact:

Post by bootsie »

i think that your problem may be else wher as 4GB limit is not an issue. MS SQL dbs can handle much much more than that.
User avatar
rustypup
Registered User
Posts: 8872
Joined: 13 Dec 2004, 02:00
Location: nullus pixius demonica
Contact:

Post by rustypup »

bootsie wrote:MS SQL dbs can handle much much more than that.
i'm almost convinced of this... ours only started blinking at 3tb+... 4gb sounds like the db activity log may be the issue, (i've seen that one once or twice... )

admittedly, later upgrades to mssql server removes any cap... at a price, of course :evil:

<edit>
hang about... is this the "express" edition?
</edit>
Last edited by rustypup on 03 Jan 2007, 10:47, edited 1 time in total.
Most people would sooner die than think; in fact, they do so - Bertrand Russel
User avatar
Ron2K
Forum Technical Administrator
Posts: 9050
Joined: 04 Jul 2006, 16:45
Location: Upper Hutt, New Zealand
Contact:

Post by Ron2K »

Could also be an NTFS limitation - but either way, I'm going have to work around this one...

The reason why I'm saying that is that I build a logging mechanism into the app to view any queries that failed to execute. That file also hit 4GB because of all the queries that were now not being executed and I got an "invalid file handle" exception.
Kia kaha, Kia māia, Kia manawanui.
User avatar
rustypup
Registered User
Posts: 8872
Joined: 13 Dec 2004, 02:00
Location: nullus pixius demonica
Contact:

Post by rustypup »

hmm...

the bulk of the space consumed by a log file is ' '... so:
1) compression ->BLOB should recover a huge chunk of space... or
2) the compressed flat-file approach, (will probably require a certain level of encryption), which begs the "why use a database?" question... unless you use an alternate/built-in database purely for logging?...
Most people would sooner die than think; in fact, they do so - Bertrand Russel
User avatar
Ron2K
Forum Technical Administrator
Posts: 9050
Joined: 04 Jul 2006, 16:45
Location: Upper Hutt, New Zealand
Contact:

Post by Ron2K »

Problem solved.

We were all wrong. I've just attempted to manually increase the file size (why the hell didn't I think of that before?) and got this error:

Code: Select all

CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 4096MB per database. (Microsoft SQL Server, Error: 1827)
I'm writing to a SQL database on my local machine using the version of SQL Server that comes with Visual Studio 2005, which now appears to be handicapped. *sigh*

So, it's nothing to do with me or my code, it's Microsoft. Who wants to join me in cursing them?
Kia kaha, Kia māia, Kia manawanui.
User avatar
rustypup
Registered User
Posts: 8872
Joined: 13 Dec 2004, 02:00
Location: nullus pixius demonica
Contact:

Post by rustypup »

hence my question about which version... i dimly recall that the express flavour was capped at 4gb... and yes, much cursing was involved...

seriously... mysql/postgre etc and let m$ hang...
Most people would sooner die than think; in fact, they do so - Bertrand Russel
Post Reply