How to export SQL Server database structure to text format

Possible duplicate:
How can I automate "generate scripts"? tasks in SQL Server Management Studio 2008?

I need to export the structure of my SQL Server database to a .sql script without a management studio.

UPDATED

+4
source share
2 answers

In SQL Management Studio :

  • Right Click on Database Entries
  • From the menu, select Task -> Generate Scripts
  • Indicate what exactly you want to generate (only the scheme, + functions, + stored procedures, ..)
+14
source

Try the Tasks -> Generate scripts menu in SQL Management Studio

+3
source

All Articles