I like to learn from samples. Not only are they great tools for learning, they're also beneficial for the lazy (like me) who'd rather cut-n-paste wherever possible rather than think up their own new code.
You can download well over 100 samples for SQL Server 2005 that demonstrate all sorts of aspects of
Database Engine including SMO, Service Broker, XML, CLR, Full-text Search, and Replication as well as good ol' administration and data access Analysis Services
Stuff in italics has new content since the last time it was uploaded. The are sample databases for AdventureWorks (an online transaction processing (OLTP) database), the AdventureWorksDW data warehouse, and the AdventureWorksAS Analysis Services database. These databases are the same samples used in the code examples in the SQL Server 2005 Books Online.