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.
Author |
Topic |
Lupison
Starting Member
5 Posts |
Posted - 2010-08-25 : 12:20:05
|
Here's the basic problem.I have 2 DBs. One contains a table. "DB1" & "DB2" DB2 can either reference D1.Table1 in it's stored procs etc, or it can choose to "override" that table and create that table inside itself (DB2.Table1) and use that in it's stored procs etc.Other than a view, which would be horrendous in this case since the data is not going to be even close to being static, I was wondering if anyone knew of anything else I could use. Or are views against a single table an "ok" thing now to do for a table with constantly changing data?Basically I just need some sort of "pointer" object that when a stored proc calls it it points to the right table without the programmer having to change 100 store procs when it's decided the DB2 will override the table in DB1. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Lupison
Starting Member
5 Posts |
Posted - 2010-08-25 : 12:49:39
|
quote: Originally posted by tkizer Maybe what you want is a synonym.quote: Or are views against a single table an "ok" thing now to do for a table with constantly changing data?
Views can reference multiple tables via joins, etc... and have constantly changing data and still be fine.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
I was always told that Views "recompile" thier data everytime a row changes in a table they reference. So that you only want Views against tables with very static data. |
|
|
Lupison
Starting Member
5 Posts |
Posted - 2010-08-25 : 12:52:43
|
quote: Originally posted by tkizer Maybe what you want is a synonym.quote: Or are views against a single table an "ok" thing now to do for a table with constantly changing data?
Views can reference multiple tables via joins, etc... and have constantly changing data and still be fine.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
synonym appear to be perfect. Never heard of these before, they look very awesome even if I don't use them here.thank you. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
niechen861102
Starting Member
9 Posts |
Posted - 2010-09-06 : 23:05:18
|
spam removed |
|
|
|
|
|