0

I've decided to develop VB.net Application With SQL server Express 2008, but Microsoft says:

They limit 4 GB Size per DB!

So I'm developing my app for Single user Desktop pc, so what should I do when the DB reached the Maximum size?

When the DB size reached to maximum size, is it a good thing to create a new DB and allow my vb.net application to work with both DBs?

James
  • 4,644
  • 5
  • 37
  • 48
Amila
  • 21
  • 1
  • 2
    The best way, and easiest technically, is to use the full version of SQL. As an aside, unless you are storing lots of binary file data in the database, 4GB will last you a really long time. – Brian Dishaw Aug 04 '11 at 17:35
  • 2
    **[SQL Server Express 2008 R2 supports 10GB storage, and 1 GB ram usage](http://www.microsoft.com/sqlserver/en/us/editions/express.aspx)** – KM. Aug 04 '11 at 17:40

4 Answers4

3

in regards to the 4GB limit of your free version of SQL Server, your options as I see them:

1) purge old data as it becomes unnecessary
2) hack application to use multiple databases (would this even work on a single pc?)
3) hack your application to move items to data files as necessary and out of the DB
4) pay for the proper version of SQL Server
5) go to MySql or something similar

KM.
  • 101,727
  • 34
  • 178
  • 212
  • 1
    Agreed. DB switching strikes me as problematic (which record is where?). Most (simple) end-user applications are unlikely to exceed 4GB for a properly-designed database. – Clockwork-Muse Aug 04 '11 at 17:41
  • To your note "would this even work on a single pc?" - sure it would; the application would just need to know where to find what data (eg different tables in different databases) – Tao Aug 05 '11 at 11:40
  • @Tao, I've never tried it, have you? so I'm not sure how Microsoft enforces this. Is it each database running on the pc, or the sum total of all databases running on that pc? The documentation I've been able to find is vague. – KM. Aug 05 '11 at 11:51
  • @KM: I haven't personally tried it, but other sources (eg http://stackoverflow.com/questions/1169634/limitations-of-sql-server-express/1169641#1169641) claim that it is a per-DB limit, and the MSDN doc referenced does seem pretty clear. – Tao Aug 05 '11 at 12:00
  • (more reliable source, but still devoid of unambiguous references: http://stackoverflow.com/questions/955926/sql-server-express-4gb-limit) – Tao Aug 05 '11 at 12:06
2

SQL Server 2008 R2 Express size limit was increased to 10 GB, so if your just starting a new project you should use 2008 R2.

Zachary
  • 6,522
  • 22
  • 34
1

Nothing wrong to attempt for free tools. I suggest that you redesign your application to use multiple databases.

1) Create a new table for storing multiple databases setting data

2) Things to store in that table include: total databases, connection string for each database, and so on.

Consider storing each table in a separate database (where appropriate)

user774411
  • 1,749
  • 6
  • 28
  • 47
0

If you expect to exceed 4GB (are you sure?) then some options might include...

  1. archive older data into a separate database
  2. don't use sql-server express -- use a standard version that can grow.
Rowland Shaw
  • 37,700
  • 14
  • 97
  • 166
Chains
  • 12,541
  • 8
  • 45
  • 62