开发者

Convert dependencies to point to View instead of Table

开发者 https://www.devze.com 2022-12-31 10:48 出处:网络
I currently have a SQL Server 2008 database in which I am planning to separate out some tables to other databases.I want to be able开发者_StackOverflow社区 to replace all references to the separated t

I currently have a SQL Server 2008 database in which I am planning to separate out some tables to other databases. I want to be able开发者_StackOverflow社区 to replace all references to the separated tables from the original database using views. Is there a better way (other than manually changing all FK and SProc references) to switch all the dependencies to reference the view instead of the table?


Usually the best course is to rename the tables and then name the view what the table used to be named.


You can try using sp_rename to change the name of the tables. I don't know if this will change your references also.

0

精彩评论

暂无评论...
验证码 换一张
取 消