Yesterday I received following questions on blog. Ashish Agarwal asked following question.
Hi Pinal,
Can we refresh a database (like we do by right clicking database node in object explorer and clicking on refresh) thru SQL Query?
If yes, can you please tell me the query?
Thanks,
Ashish Agarwal
Answer to above question is NO. It is not possible to do the same task using SQL Query.
However, if you have changed some SP or any other object and if they are cached in the database, database can be refreshed using DBCC commands.
Read my previous article about SQL SERVER – Clear SQL Server Memory Caches.
Reference: Pinal Dave (http://www.SQLAuthority.com)