SQL SERVER – Refresh Database Using T-SQL

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)

SQL Scripts, SQL Server DBCC, SQL Stored Procedure
Previous Post
SQLAuthority News – 5 Millions Visitors – 2 Anniversary – Authors Note on Economy Slow Down and Job Opportunity – SQL Server
Next Post
SQLAuthority News – SQL Server 2008 Book Online Updated in October 2008

Related Posts

Leave a Reply