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.
MSSQL databases greater than 4GB
- Ron2K
- Forum Technical Administrator
- Posts: 9050
- Joined: 04 Jul 2006, 16:45
- Location: Upper Hutt, New Zealand
- Contact:
MSSQL databases greater than 4GB
Kia kaha, Kia māia, Kia manawanui.
- rustypup
- Registered User
- Posts: 8872
- Joined: 13 Dec 2004, 02:00
- Location: nullus pixius demonica
- Contact:
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... )bootsie wrote:MS SQL dbs can handle much much more than that.
admittedly, later upgrades to mssql server removes any cap... at a price, of course
<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
- Ron2K
- Forum Technical Administrator
- Posts: 9050
- Joined: 04 Jul 2006, 16:45
- Location: Upper Hutt, New Zealand
- Contact:
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.
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.
- rustypup
- Registered User
- Posts: 8872
- Joined: 13 Dec 2004, 02:00
- Location: nullus pixius demonica
- Contact:
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?...
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
- Ron2K
- Forum Technical Administrator
- Posts: 9050
- Joined: 04 Jul 2006, 16:45
- Location: Upper Hutt, New Zealand
- Contact:
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:
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?
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)
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.