Using SQLScriptGenerator you can connect to your local or remote SQL Server and generate T-SQL script of the whole database or just database structure or just data or specific database objects. In the result it generates one or several *.sql files with CREATE, INSERT T-SQL statements that recreate database objects you've selected.
This will support
SQL Server 2008 Express
SQL Server 2005 Express
SQL Server 2008 Workgroup
SQL Server 2008 Standard
SQL Server 2008 Web
SQL Server 2005 Workgroup
SQL Server 2005 Standard
read more about Features
Read more and download SqlScriptGenerator free from here