I have created a new application in my dev environment, and now need to upload to put it on my web server. I use SQL Server 2008 in my dev environment, but have SQL Server 2005 on my web server.
Is it possible to extract a full script for recreating the database from my SQL Server 2008 to run on my SQL Server 2005? Before I have backed up the database, uploaded the .bak file, and then restored that. This won’t work for me here because it is not possible to restore a database to a previous version of SQL Server.
I don’t need to transfer the contents of the tables to the server, just the table definitions, stored procedures, and so on. Is this possible?
In Sql Server Management Studio: Right click your database and go to
Tasks -> Generate Scripts. There’s a wizard there that will get you trough.You can choose specific tables or choose them all. You can also choose the location of the generated script etc.