|
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
Navigation:
[Reply to this message]
|