Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Replicating Views

Author  Topic 

Jeepaholic
Starting Member

36 Posts

Posted - 2002-12-12 : 17:52:47
Hi there... I have a view I need to replicate, and I'm having some issues. Replication of a view was my first attempt, but I'm open to other solutions that might be better suited. The scenario follows:

1) Database A includes Tables 1, 2, 3, 4, 5. These five tables are used to create View AV.
2) Database B contains various irrelevant tables. This database has a View called BV that needs to be identical to View AV.

I was curious how replication of a view would work if the original Tables 1 through 5 didn't exist in Database B...and got the answer to my question with this error message:

==========
SQL Server requires that all tables referenced by published views and indexed views be available at the Subscriber. If the referenced tables are not published as articles in this publication, they must be created at the Subscriber manually.
==========

So... I'm curious what my options are. Obviously, I could replicate each and every table required for this view (there are, in reality, about 15). As well, none of them have primary keys - so I would have to generate them. Yes, I know. This is the 2nd very popular appliation I've been dealing with that has NO primary keys in ANY of their tables. <rolling eyes> Anyway, it's just a nuisance and a maintenance issue to generate them...but I realize it can be done.

However, I'm wondering if there's a better way to handle all this...

1) I was hoping that there was a way to convert a view to a table via replication, but I don't think this really makes much sense in the scheme of replication. Correct?

2) I suppose a DTS package being run on a regular interval would be a solution...but it's not the slickest or most scalable. I guess I'm making the assumption that I can do a DTS copy from a View to a Table? Correct?

Are there any other solutions aside from replicating everything? I'm open to all kinds of ideas...even though I think I know the answer. <grin>

Thanks for any help...

Jeepaholic
Starting Member

36 Posts

Posted - 2002-12-17 : 15:06:14
Nobody has any thoughts on this?

Go to Top of Page

Jim77
Constraint Violating Yak Guru

440 Posts

Posted - 2006-08-10 : 18:02:00
I am going through a similar thing ,cr@p I must get with the times!
Go to Top of Page
   

- Advertisement -