gljakal's Sql Exporter is the program that allows you to export table definitions, stored procedures, views and triggers present in your Sql Server database to text files, so they can easily be backed up or archived in a version control software, such as the excellent Subversion. You can also automate it, thanks to its command line version.
Important: Like many other great programs, Sql Exporter relies on the Microsoft .net Framework, version 2.0 to operate its magic!
You can download it for free from Microsoft.
Connection options: here you can choose your server name, database name, username and password, just like you would do in Sql Server Management Studio Express ™.
Export options: here you can choose the destination directory among with other options, such as wether to export stored procedures, views, tables and triggers. You can also choose to create a directory structure so that views are exported in a folder named "Views" and so on.