Convert Database of SQL Server 2008 to SQL Server 2005 |
![]() |
Written by Zack MIlls |
Friday, 12 March 2010 13:39 |
http://www.hyper-v-mart.com/HowTo/Convert_SQL_Server_2008_to_SQL_Server_2005.aspx How To Convert Database of SQL Server 2008 to SQL Server 2005?RequirementsIf you are trying to restore database backup of SQL Server 2008 to SQL Server 2005, you are bound to fail. Database backup of SQL Server 2008 is not compatible backward, you cannot restore it to SQL Server 2005. The following is a solution to convert databases of SQL Server 2008 to 2005 Step by Step Guide1) Start convert wizardOpen SQL Server Management Studio2008. in 'Object Explorer', right click the database that you want to convert. Select 'Tasks' > 'Generate Scripts...'. ![]() 2) NextClick 'Next'. ![]() 3) Select database and objectsSelect the database that you want to convert, and check on 'Scripts all objects in the selected databases' ![]() 4) Convert OptionsSet options: 'Script for Server Version' = 'SQL Server 2005' 'Script Data' = 'True' 'Scirpt Database Create' = 'True'
![]() 5) Output OptionSelect option 'Script to file', 'Single file' and 'Unicode text'. ![]() 6) 'Finish'View summary and click 'Finish'. ![]() 7) ResultNow you got a complete database creation script with data. It can be executed on target database server.
![]() 8) Amend ScriptOpen the generated script in SQL Server Management Studio 2005. Find the following section and amend the path to proper data folderCREATE DATABASE [StockTraderDB] ON PRIMARY ( NAME = N'StockTraderDB', FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\StockTraderDB.mdf , SIZE = 4352KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LOG ON ( NAME = N'StockTraderDB_log', FILENAME = N'c:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\StockTraderDB_log.LDF', SIZE = 6272KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) 9) Execute the ScriptWhen finished, You should get converted database of SQL Server 2005 |