|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Recompiling dependent views in SQL Server 2000
I wonder if anyone can help me -
I am trying to write a little application which recompiles any views dependent on a given view. I have a script which will identify any views containing a given text string, but I now need a way to force SQL Server to refresh its cache info (or recompile) the views. I have to admit that I am unclear on exactly how the caching works; i have tried using sp_recompile, but this does not seem to do the job. Does anyone have any ideas? |
|
#2
|
|||
|
|||
|
Views get recompiled every time they are called, so instead of sp_recompile just do
Code:
select * from yourview where 0=1 and you should be fine. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Recompiling dependent views in SQL Server 2000 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|