• Right-click the database in SQL 2012...Tasks..."Generate Scripts". Choose the "Advanced" button under "Set scripting options" and set the "script for server version" to the required database format. For "Types of data to script" choose "Schema and data".