Thursday, March 8, 2012

"Max Database Size" issue

I'm creating a new SQL CE database on a desktop computer via merge replication with an existing SQL 2005 database. The original database is appx. 270MB, so I set the "max database size" parameter in my connection string to 1024 (which should indicate a max SQL CE database size of 1GB). The initial replication works fine. However, when I open the database from my custom application (which does NOT specify a max database size in its connection string), I get an exception telling me that the database has grown beyond its maximum size.

The documentation for SQL CE seems to indicate that the "max database size" connection string parameter is only examined when the database is originally created or compacted. Is this true, or do I need to specify max database size in the connection string even when opening an existing database?

Thanks in advance for any help or direction anyone can offer!

For the final word on Max database size, see http://blogs.msdn.com/sqlservercompact/archive/2007/06/13/the-story-of-max-database-size-connection-string-parameter.aspx

No comments:

Post a Comment