DorothyZ


Hi everyone,

What are the consequences for just setting the Max DB Size to 4GB and letting it go at that

Is the MAX Size any arbitrary value I want or must it be close to what the actual database is expected to be

Also, why did they default to 128MB Wouldn't it have been better to set it to a larger value

Thanks

Dorothy




Re: SQL CE 3.0 (Mobile 2005) Max DB Size Question

William Vaughn


Consider that years ago the SQLCe engine's predecessor was designed to work on a phone or PDA--a device with a very small amount of memory. The Max size parameter permitted one to make sure the database didn't exaust the available RAM--remember, most phones did not have disk drives... ;).

Sure, set it to 4GB if you have the disk space.







Re: SQL CE 3.0 (Mobile 2005) Max DB Size Question

DorothyZ

Thanks William.

Just one more question then - if i set it to a max size of 4G, would that automatically generate a database that is 4G or does it just retain that information internally that it can grow to be 4G

Thanks

Dorothy






Re: SQL CE 3.0 (Mobile 2005) Max DB Size Question

William Vaughn

My tests show that when I set Max Database Size=4090 it created a 20K SDF. If it works anything like most DBMS engines, as you add data, it just adds "extents" (big blocks of data) to accommodate the new rows. I used the "Create Database in Code" example (from my EBook) to test this.

hth






Re: SQL CE 3.0 (Mobile 2005) Max DB Size Question

DorothyZ

Great! Thanks.

BTW - where can i find your EBook I'm new to this forum.

I'm looking for a way to set the DB size programmatically in C++.

Thanks again

Dorothy





Re: SQL CE 3.0 (Mobile 2005) Max DB Size Question

Roger Jennings

Dorothy,

Excuse me for butting in, but you can buy Bill's book at http://www.hitchhikerguides.net/. The purchasing process is a bit confusing, but the book's well worth the money and effort IMO.

--rj





Re: SQL CE 3.0 (Mobile 2005) Max DB Size Question

William Vaughn

Yup, we're publishing it ourselves--testing the waters to see if it's practical. We're still trying to work out the kinks.

Thanks for the plug RJ... ;)






Re: SQL CE 3.0 (Mobile 2005) Max DB Size Question

Okugops

Here we have comeup with tool (beta release not fully functioning) you can test it in SDF database (SQL Compact Edition)....

Here the url to download the tool http://www.satwhiz.com/datapump/info.html

Thanks

Gops

India






Re: SQL CE 3.0 (Mobile 2005) Max DB Size Question

Luthfi

Hi,

I found that there is a difference in the way sqlce allocate memory for different max database size setting. In my device which is running Windows CE 5.0 with only 4 MB free storage space and 8 MB free program memory, I can not set the max db size setting larger than 512, if I set it to larger value the sqlce engine will throw a native exception -2147024882 with no exception message.

Can someone confirm this behaviour or is there something wrong with my device.

Thanks,

Luthfi




Re: SQL CE 3.0 (Mobile 2005) Max DB Size Question

ErikEJ

Yes, increasing the max database size allocates more memory. 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






Re: SQL CE 3.0 (Mobile 2005) Max DB Size Question

Luthfi

Thanks, that's explained it, so how do we calculate the memory needed to support 4 GB of database Is it 4GB / 4KB per page times 1 byte per reference