views:

134

answers:

2

Hi

i have a ms sql database that is getting replicated to mobile sqlce databases.

My question is the following:

Are the indexes getting propagated to the sqlce database tables as well?

A: 

If I'm not mistaken, the answer is no. Mirror: yes, replication: no.

I've learnt something new.

Randolph Potter
actually they are being replicated, did some tests and found out for my self
Konstantinos
Good to hear. You might want to answer your own question then.
Randolph Potter
+1  A: 

Actually the answer is "it depends". Some are, and some are not. It also depends on how you provision the mobile database. The different sync properties for provisioning do very different things to the local database.

  1. Peer to Peer never calls FillSchema and does not know the indexes.
  2. Server to Client does call FillSchema (and GetSchema()) so it knows the indexes.

So if you are doing peer to peer sync the locally provisioned databases by default do not include all indexes.

Jason Short
we are doing server to client and we seem to have indexes. i ll give you +1 but i need some bettter proof for the peer to peer claim.Thanks for answering!
Konstantinos
We just finished implementing our VistaDB sync providers and reflected the SQLCE providers for sync to see what they were doing. We ran into the exact issue. Peer to Peer does not build all the indexes on the table because it fails to call FillSchema. I will be doing blog posts about it when we get ready to ship our sync provider (4.1 version should include it)
Jason Short