10

I know a view is composed of tables. Can I replicate a view anyway?

developer.cyrus
  • 903
  • 2
  • 7
  • 18

3 Answers3

6

For SQL SERVER 2008
Have a look at the link http://msdn.microsoft.com/en-us/library/ms152559.aspx. This explains all the objects that can be replicated.

For SQL Server 2005
http://msdn.microsoft.com/en-us/library/ms152559(SQL.90).aspx

M.Babcock
  • 18,753
  • 6
  • 54
  • 84
Atul
  • 162
  • 3
  • 10
2

Yes.

You would need to add the view to the Publication (along with the underlying tables)

Mitch Wheat
  • 295,962
  • 43
  • 465
  • 541
-1

What you want to do is replicate the table and create a view of the replicated table.

MyItchyChin
  • 13,733
  • 1
  • 24
  • 44
  • 4
    While that is an option, you can also replicate just the view. See replicating "Indexed Views as Tables" in http://msdn.microsoft.com/en-us/library/ms152559.aspx – Jonathan Allen Feb 09 '12 at 22:16