.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

The question of Merge Publication

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :Sql Server

We are attempting to setup a master republisher model for horizontal
scaling of our mobile devices. We currently have what will be the
republisher with CE's connected to it. The goal being I do not want
to cause re-inits and data loss from the CE's to the republisher when
I add the master.

What I have done is take a backup of our republished data and put it
on the master. So I have the exact same schema/data in both my
republisher and my master. Life is good, I setup the Master
publication with @pre_creation_cmd = 'none' (If the table already
exists at the Subscriber, no action is taken) this is so it will NOT
drop the tables and recreate them. I already have the data in place
and I just want to replicate the changes. The problem I am having is
once the master to republisher script is in place and I try to sync a
CE, the changes are NOT replicated to the master. It is like since I
said pre_creation_cmd = none, it does not care what changes anymore
for the data that already existed.

Any one can fix this problem?

View Complete Post

More Related Resource Links

merge repligation general question?

Hello friends Please tell me that what is .sdf file in merge replicaton?

SQL Server 2005 Merge Publication Filters

Is it possible to have Merge Subscriptions of a Publication (or publications) storing a different range of data.E.g. Sub1 contains the clients of one Sales Person only.Sub2 sontains the Clients of Many Sales Persons in one Division.Can you do this with one Publication?  How would you setup the filters for this then?Or do you have to have two separate publications of the same database.Pub1 filtering based on the SalesStaff ID = SUSER_NAME()Pub2 filtering based on the DivisionID=SUSER_NAME()Can someone describe how best to setup this scenario?

Re-Publication of Tx Repl Question


Replication Topology: Server A(pub)---->Server B(distributor)-----> Server C(subscriber)(Re-publisher)------->Server B(distributor)-------> Server D(subscriber)

1. Need to re-initialize Subscription once every weekend. This subscription is being re-Published. 

I need to Uncheck all articles from republished database(subscription db before applying snapshot). I plan on running this as a Script under the Before Applying Snapshot. Please advise how this can be achieved.


Earlier Test:

1.Tried reinitialising the pub(server A) , replication had errors, could not delete table on subscriber as it was being used in replication

2.Tried setting table properties and setting action if name is in use : to keep existing object unchanged..still received repl errors.

3.Finally, the removing the tables from Republication seemed to solve the problem. Please advise. thanks.

I have a newbe question about sql standard 2008, How do I merge 1 row of data from another DB to the


Hi everyone,

 I am new to data base type work. I have very little exsperience in database code. I set up an application that retrieves data from the UI that has four forms. The application calculates and modifies this data for storage in different fields in a database. The application itself is not very simple as to the operation of the print and rs232 operations. But I have all of that code written and have written code for updateing the local db with this information. I was able thru searches to find enough information to update the local db.

 I have not been able to find any code example for merging 1 row of data from one DB to another DB. That has the same data table and fields in both data bases.  Now these DB's are set up exactly same except for DB name and Table name. They have exactly the same field and column names. The only difference is the data in the primary key field, the database that is local builds two rows that the key field has the same data except for one letter and is build at different times. The remote data base has the same data in the key field except it does not have the letter at the end of the data.

 Local data base    Key                     Re

merge replication and a locking question


We had a user yesterday that ran a report and their system froze.

i connected and looked and the replication processes is what was blocking. i stopped the synchrnozing, everyone could continue working, then i started the synch and everything was fine.

This is SQL 2005, merge replication.

The report is driven by a SELECT that has a user defined function that also only does SELECTs, and the report query takes about 30 minutes to run.

Does a SELECT lock a record in a table while it is reading it? If so, i don't want a SELECT to lock anything, but i also don't want the SELECT to read dirty records (NOLOCK/REUNCOMMITED).

This might not be enough information to start with, but i am trying to figure out if the report query is what caused the replication to cause blocking - somehow - and if so what can i do to stop a SELECT statement from locking records.



Want to set replicate schema changes on a merge publication to false - any problems


Is it safe to change the replicate schema property of a publication mid-stream? We have a server that rarely gets schema changes to the published table, but once a year or so the vendor might change the underlying table(s) in the publication. This is usually a field size change and/or adding a new field.

I don't want to take any chances on disrupting the current merge publication since hundreds of users are already syncing their subscriptions daily. And the sqlce database file is very large (1gb) so it's not practical to have them all reinitialize their subscriptions.

The application using the replica databases will not need the majority of these changes, but at least one of the fields that is being altered in size is already part of the publication. Am I right in assuming that this will 'break' the subscriptions anyway?

Merge Replication - Add table to existing publication


I added a table to an existing publication and then generated a new shapshot.  The merge agents then sent the new table and data down to the sunscribers as planned.  The issue is that at the next cycle the merge agent re-initilizes the table again.  This happens over and over again.  If I stop and restart the agent I can watch it send the schema back down to the subscriber.  Any thoughts are appreciated.



Some basic MVC question

  1. In regular asp net I can run (debug) the application but I can either "view in browser" that gives me the option to view the application and write code on same time.

In MVC I can't find this option.

  1. What is the basic DATA MODEL for working with SQL DB.

I mean with no any framework (entity framework, Sub sonic, Link to SQL etc')

I look for basic application that works with data but with no fw.

  1. What is the popular DB framework that working with data.
  2.  I am looking on  mvc series


C# Soup To Nuts  (the best series ever)


I watch some of the MVC video, seems that the music store is good but I have to wait to the other part.

Does any one know and recommend   a Microsoft MVC tutorial?





Web Site to Web Application Question


I've been building web sites and for my next project I will be creating a web application.  I use a 'BasePage' class in all my projects but, since web applications do not contain the 'App_Code' folder, what is the best place/practice for the 'BasePage' class?



connection string question from a newbie


when publishing  in the webmatrix dialogue it asks for "destination connection string" for my "database.mdf"

I was not sure what it was so I pasted this from my web.config file :

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\database.mdf;Integrated Security=True;User Instance=True

it all published ok, but wont run, so I guess it has somthing to do with this connection string or some kind of configuration issue.

My question is this, What should go in the field for "Destination connection string"

Security Question Answer Retrieval


I know there is a method built in for retrieving the encrypted password, but how do I retrieve the encrypted security answer?

What I want to do is have a member profile update screen that the end user can update their password and security question and answer. However, when they get to this page, I want to already be showing the security question (the easy part) and its answer (the not so easy part).

I have updated web.config with passwordFormat=Encrypted and have added a machineKey with the generator (forgot the link, but located on eggheadcafe somewhere).

I haven't done ANYTHING yet, since I already have a user store with hashed information. I wanted to get some functionality done before publishing, wiping the store and recreating users (only a couple developers).


Very Basic Question - Error message running first page


Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!


I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).


Appreciate any help I can get!




C#, LINQ: (List<>) Question???


Hi Everyone,

I have a strange problem:


There is an entity (Table) called "Filters" in my .edmx which has all my tables and stuff in it (to use it for LINQ queries)

I have created a class called "CustomFilters" which inherits "Filters". So now my cutom class has all the properties of the original "Filters" class (table) and 1 more additional property that i wanted which is a List of "CustomFilters":

List<CustomFilters> children = new List<CustomFilters>();

Now i get all my records into:

List<CustomFilters> theOriginalList = new List<CustomFilters>();

NOTE: first all records are tken into a List<Filters> and then these are added into List<CustomFilters> where List<CustomFilters> for children of that record is added, and then children of the child records, and so on......

so now, every record is an instance of CustomFilters which has a property named "children" which is a list again; and each child again has instanaces of "CustomFilters", and each instance again has children...and on and on and on.....

(basiacally its a data source for a treeview in my silverlight control)

every thing is good and working as expected.


linqdatasource parameters question



I'm currently getting to know the linqdatasource control. What would happen if several WHERE parameters are added to the linqdatasource control declaritively in the aspx page but no WHERE clause is defined? 

1. is there any issue with setting up multiple WHERE parameters in the aspx markup for linqdatasource but then deciding which ones actually get used at runtime by setting the actual WHERE clause at run time? Would the unused parameters simply be ignored and cause no issues?

2. when you need to modify WHERE clause or WHERE parameters at runtime do you need to do so in an event handler? such as linqdatasource.selecting?
I see from the above link it is possible, but is that the standard way to handle controlling filtering in code behind for linqdatasource?

2b. if you use an event such as linqdatasource.selecting to add where parameters and/or modify the where clause in code will that also break the builtin sorting and paging support of the linqdatasource with a gridview? 

database interface design question


For handy database interface, is it good to use SqldataSources exclusively intead of EntLib functions?

Thanks for any feedback.

Mail Merge




I am after creating a mail merge documents from datasource and .dot template file on server side. Can you give me an idea how i will achive this?


Thanks in advance.



Syed Hussain



Merge SQL to Excel--Need .Net button to open on fly and have current SQL data!


           Hello all,
I do not know if this is the proper place to ask this, but my question is...
I have a SQL DB and I want to convert it to Excel Sheet (I did this using the wizard)!
In my aspx page I have a button.  So when I press this button I want the Excel sheet to open!  But I need the Excel sheet to show me the up to date information that is in the SQL DB.  
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend