How to Generate Script of Database in SQL Server05.25.2011right click database >task> Generate scripts> Wizard> Choose what you want to script