Sunday, March 8, 2015

Practical Usage



DBCC
FREEPROCCACHE --procedure cache

dbcc
DROPCLEANBUFFERS

dbcc
freesessioncache --session login's

dbcc
freesystemcache('all') --system related

--The above statement remove execution plans,so now execute sp's first time and analysis from sql profiler duration(column) and reads(column),write(column)


with
(nolock)--common usage it's apply at row level

--with(readpast),if any one is lock some row for update and u want to see before updating which data is then use this statement in select stat


with
(readpast)--it's apply at memory level /pages level of db

--ex:


exec
test 1 --with(nolock) or --with(readpast)