Unless noted otherwise, the download links are for the latest release of the project see the individual project sites (on the Releases tab) for prior version releases.
SQL Server 2008 code samples are available here. SQL Azure AdventureWorks community sample databases can be downloaded from here. Note: When you click the big Download button on the SQL Server R2 sample code project page (this one), you will get the 圆4 installer and download the SQL Server 2008R2 samples. Download the AdventureWorks 2008R2 family of sample databases and AdventureWorks 2008R2 sample databases
SQL Server 2008R2 product code samples are available here. The SQL Server 2012 RTM versions of the Adventure Works OLTP sample database and Adventure Works data warehouse sample database are available on AdventureWorks for SQL Server 2012.