> Hi, Ginny.
> Now, I'm using sqlce 3.1......
>
> AS
Hi, Laxmi.
Tnx for the link.
Now, I'm stopping all to THINK....
Therefore, i've a simple question...
At this link:
http://msdn.microsoft.com/en-us/library/system.data.sqlserverce.sqlceconnection.
connectionstring(VS.80).aspx
I see this:
<cut>
flush interval
Specified the interval time (in seconds) before all committed
transactions are flushed to disk. If not specified, the default value
is 10.
autoshrink threshold
The percent of free space in the database file that is allowed before
autoshrink begins. A value of 100 disables autoshrink. If not
specified, the default value is 60.
temp path
The location of the temporary database. If not specified, the default
is to use the database specified in the data source property for
temporary storage.
<cut>
I've these simle questions...
1) Now, i'm not using transaction...
So, flush interval is rilevants for my context?
2) Now, My app does a compact operation each time starts...
But, if default is 60, I dont' need this operation
3) in my connection string I've not specified temp path...
My english isn't good, ok, but WHAT' S MEAN "the default is to use the
database specified in the data source property for temporary storage"?
This is LAST ppc projects, for me....! :-((
tnx all for these answer
AS
On 1 Dic, 05:32, "Laxmi Narsimha Rao Oruganti [MSFT]"
<laxmi.onl...@msnews.com> wrote:
> If you just want an answer to "WHY" then Checkout this blog post:http://blogs.msdn.com/sqlservercompact/archive/2008/06/25/insight-int...
> Thanks,
> Laxmi
[quoted text clipped - 3 lines]
>
> > AS
Laxmi Narsimha Rao Oruganti - 01 Dec 2008 14:44 GMT
Alberto> 1) Now, i'm not using transaction...
Alberto> So, flush interval is rilevants for my context?
Whether or not you use a transaction, there is always a transaction in the
system and that is what database system revolves around. If you don't
create one, system creates a temporary one internally!
Flush Interval is to Minimize the disk I/O to accumulate the dirty pages
till 10ms and then flush them all in a single go. This also helps the user
thread to be more responsive as the main thread is not blocked on finishing
the I/O but rather is delegated to a background thread and the background
thread works at this interval.
Alberto> 2) Now, My app does a compact operation each time starts...
Alberto> But, if default is 60, I dont' need this operation
There is a difference between Shrink and Compaction. "Autoshrink
threshold" is about Shrink and Compact does not have any parameters but to
be explicitly invoked.
Assume each page is of 4096 bytes and 16 bytes is reserved for page header.
Now the remaining space is 4080 bytes.
Shrink deals with fragmentation inside a page, like:
Page has 2 rows of sizes 1000 bytes each. But are not together one after
other, rather they are separated by 1000 bytes. So, in effect there is a
space of 2080 bytes. However, if I need to insert a row of 2000 bytes we
can not use this page as 2080 bytes is not continuous. Shrink deals with
fragmentation in a page.
Compact deals with fragmentation outside a page, like:
Database has 10 pages, out of these let us say 5 pages are occupied and 5
are not. The free pages are not together, but database system want to have
a colocated space of 5 pages to flush the pages in a single I/O call which
would not be possible with this database state. Compacting database moves
the pages around.
Thanks,
Laxmi
> Hi, Laxmi.
> Tnx for the link.
[quoted text clipped - 56 lines]
>>
>> > AS
Alberto Salvati - 01 Dec 2008 15:12 GMT
> Flush Interval is to Minimize the disk I/O to accumulate the dirty pages
> till 10ms and then flush them all in a single go. This also helps the user
> thread to be more responsive as the main thread is not blocked on finishing
> the I/O but rather is delegated to a background thread and the background
> thread works at this interval.
ok.. but at link in my prev post, you can read that:
<cut>
flush interval
Specified the interval time
>>>>>>>>>> (in seconds) <<<<<<<<<<<<<<<<<
before all committed transactions are flushed to disk. If not
specified, the default value is 10.
<cut>
So, 10 are seconds or milliseconds? I think tah 10 SECONDS delay is
very dangerous.
Tnx
AS
Laxmi Narsimha Rao Oruganti [MSFT] - 02 Dec 2008 11:16 GMT
Sorry for missing the details. Yes, default is 10 seconds (and not
milli-seconds).
Thanks,
Laxmi
> Flush Interval is to Minimize the disk I/O to accumulate the dirty pages
> till 10ms and then flush them all in a single go. This also helps the user
> thread to be more responsive as the main thread is not blocked on
> finishing
> the I/O but rather is delegated to a background thread and the background
> thread works at this interval.
ok.. but at link in my prev post, you can read that:
<cut>
flush interval
Specified the interval time
>>>>>>>>>> (in seconds) <<<<<<<<<<<<<<<<<
before all committed transactions are flushed to disk. If not
specified, the default value is 10.
<cut>
So, 10 are seconds or milliseconds? I think tah 10 SECONDS delay is
very dangerous.
Tnx
AS
Alberto Salvati - 03 Dec 2008 10:30 GMT
Hi, Laxmi...
Now, after 3 days, I never replicate database corruption on my pcc.
I've killed application, none
I've writed a "stress" application that does a lot of insert and
delete on my database... None.
I've used a lot of files to fill main memory of my pcc to try
situation like "disk full", none.
And so on....
I dont understand how application user's put database in corrupted
state.
Yesterday, I found a difference....
On my pcc, I've settings enabled to turn off device after inactivity
of 3 minutes..
Users have this settings disabled. Therefore, device never turn off.
I've done a lot of test after changed this setting on my pcc, today,
and I've started a save operation in my app with device with low
battery.
Device goes off during save operation, ok.
But, whenn I get database from device to check it, it is not
corrupted.
I'm going crazy to think other test to replicate database
corruption....
TIA
AS
On 2 Dic, 12:16, "Laxmi Narsimha Rao Oruganti [MSFT]"
<laxmi.onl...@msnews.com> wrote:
> Sorry for missing the details. Yes, default is 10 seconds (and not
> milli-seconds).
[quoted text clipped - 25 lines]
>
> AS