Database – the best way to backup the schema of a sql server 2005 express database

backupdatabasesql-server-2005

I want to backup the schema of a sql server 2005 database from the command line. Whats the best way to do this?

Update

I ended up buying SQL Compare 8.1 from Red Gate Software.

It works just as well as Change Director and is 1500 dollars cheaper.

Best Answer

The other responses about not having a command line tool are true, but there are third party applications to do this.

Disclaimer: I work for Quest Software, who sells Change Director for SQL Server. It does schema-only snapshots, plus notifies you if the schema changes. It can monitor tons of servers, and you can use it to sync schemas between multiple servers, like development and production.