Transactional Replication - Cannot Replicate Views

  • I am trying to do Transactional Replication. I can replicate all my tables. I am not sure if it is because I have a primary key on all of them or because I have the timestamp column defined on all of them. However, it appears that I cannot replicate all my views. Do I need to have the timestamp column defined in my view in order to replicate it? Also, I cannot replicate any of my functions. What do I need in order to replicate my functions? What am I missing? Is there an option or a system procedure that I need to change or run? I am so confused at this point and I cannot find anything on the web. Or I am looking in all the wrong places.

  • I too cannot find "the answer" proving this but transactional replication only replicates data. This is the closest thing I could find that I believe is a copy from a Technet blog. It does not replicate anything other than that. So your stored procedures, functions, views, anything else will not be replicated. You will have to recreate those on the second database.

    Which your primary keys are required on the tables to even set them up to be replicated. If the table does not have a primary key it will not allow you to set it up. This again is with transactional replication.

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton

  • I did find this blog post[/url] from Simple-Talk.com.

    Look for the comment/reply @ Wednesday, May 16, 2007 at 4:20 PM

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton

  • SQL 2005 will replicate stored procedures, view and user defined functions. You may get some problems if they reference objects that are not on the subscriber (e.g. a view that selects from a table that isn't replicated)

    What errors are you getting ?

  • I have successfully replicated my tables, views, and functions. I am currently working on my procedures. Since I knew that I could replicate all of my tables I then added my views to the list. Learned that the views for our mobile devices were causing an issue because they referenced another database. Thus I eliminated those views and then I was able to get my snapshot to work. Now I am working on the procedures and eliminating those procedures that are giving me an issue. For example, some of them reference a linked server. Thank you very much for responding to my questions and helping me out.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply