Does Sql Server caches parameterized anonymous blocks?
From my brief reading on Anonymous Blocks in Oracle, this is essentially just an ad-hoc query in SQL Server. Yes, ad-hoc queries are cached in the query plan cache of SQL Server, and therefore on subsequent runs won't be recompiled, for as long as they stay in the cache. (The query plan cache has mechanisms to remove old and/or rarely used plans from the cache based on the busyness of the server.)