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 |
|
vgr.raju
Yak Posting Veteran
95 Posts |
Posted - 2006-09-01 : 20:12:32
|
| Hello all, we have about 100 + views in our database.The views references are having the Hardcoded DatabaseName.I have to reference those views to reference the Different DatabaseName.Is there any best practice to modify the view references?Currently I am manually modifying the database name and recreating the views.Thanks!Raju |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2006-09-01 : 20:44:15
|
| I'd probably script out all the view definitions to a file then do a global search and replace on the database name and apply the script to the new database.Be One with the OptimizerTG |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-09-02 : 04:00:33
|
"The views references are having the Hardcoded DatabaseName."Is the hardcoded databasename same as the database where the view is residing ? If so, just remove the database name reference from the view and you will not have this problem in the future. If not, you have no choice but do as what TG suggested. KH |
 |
|
|
|
|
|