Showing posts with label replication. Show all posts
Showing posts with label replication. Show all posts

Thursday, March 22, 2012

(2005 express) database replication? how to?!

I want to make a replicationfor my sql server 2005 express database? how can I do that automatically? and documentation?

Replication is not included with SQL Server Express Edition.

If you need replication, you will have to have at least the Workgroup Edition.

"Wrap" replication files

Is there a way to distribute merge and transactional replication commands/files such that a slight hiccup in the connection does not cause replication to fail? Maybe like wrapping them in a zip or other type of file?No, nothing built in, but even if that were the case that won't prevent problems, what if the connection failed during the transfer of the zip file? There's built-in retry logic in the agents for network failures, is this not working correctly for you?|||What do you mean by built-in? Is this supposed to be automatic? Are there settings or distributor properties/parameters I have to set for this? I am not talking about a total loss of connection - just a slight hiccup in communications. Maybe the files could be buffered somehow during the transfer. Is there a way for a custom application to interact with this process?|||distribution agent should retry 10 times before completely stopping, you can increase this interval. For merge agent, since it's scheduled it should just pick up again where it left off on the next sync, or if you're using rmo, you can always check for a disconnect and resubmit a sync.

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

Tuesday, March 6, 2012

"Do not replicate DELETE statement" feature problem

I am testing SQL Server 2005.
I need a replication where "DELETE delivery format" field in Table Articles Properties is set to "Do not replicate DELETE statement". Unfortunately nothing I set in this dialog is saved and used. Doesn matter what I change the replication behaves the same and the next time I open "Table Articles Properties", every value is still default.

Am I doing something wrong or is it an issue (bug) in 2005 replication?


I googled about the issue and also searched in the SQL Server Replication threads on this site, both with no success. The thread named "Selective replication of DELETE transactions" doesn't provide enough information about SWL Server 2005 replication configuration.

Use Case:
I have a small "operational" database with live data. I need to keep a complete history for all records that ever appeared within the "operational" DB. It came to my mind that I can "easily" achieve this if I set up a replication that does not replicate a delete statement ever. I strongly prefer not to mess with the subscription stored procedures but to configer my publication properly instead.

Hi there,

When you open the "Article properties" under "Publication Properties" page, make sure you select the table that you disabled the "delete" and choose "Set Properties of Highlighted Table Article" instead of "Set Properties of All Table Articles". The properties should show up properly for the selected table article. You can also use

sp_helparticle @.publication='publication name'

to query the article setting, under the "delete_command", it should be 'NONE'. I quickly tested on a sample table, delete statements were indeed ignored. But you should do your own testing for that to make sure the behavior suits your need :-)

Regards,
Gary

Thursday, February 9, 2012

# of subscribers

Is there a limit on the number of subscribers in any of the replication models?
AFAIK there isn't an upper limit. The technet merge replication guide uses
2000 subscribers to illustrate scalability.
HTH,
Paul Ibison