Reply to Re: Using updatable views when moving tables from one DB to another?

Your name:

Reply:


Posted by Erland Sommarskog on 12/03/07 22:52

JoshG (jsgough@gmail.com) writes:
> To ensure compatibility with the existing code-base, we'd like to
> determine whether we can use updatable views to allow the current code
> to continue to run against the existing DB.

Since you apparently are on SQL 2005, I have a better idea: synonyms.

CREATE SYNONYM LogTable FOR databaseB.dbo.LogTable

and you are done.

> In database A, we'd rename LogTable to LogTable-Old, and create a view
> called LogTable which points to DatabaseB.dbo.LogTable.

Using the transaction log would require that you have a log reader
like Lumigent's Log Explorer to read the log. But since would be a one-
off, it seems to me that you could use a trigger to pick up the changes
while the copy is running.




--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация