Thursday, 2 May 2013

RESTORE DATABASE BACKUP OF SQL SERVER 2008 TO SQL SERVER 2005

Step by Step Guide

1) Start convert wizard

Open SQL Server Management Studio2008. in 'Object Explorer', right click the database that you want to convert. Select 'Tasks' > 'Generate Scripts...'.

2) Next

Click 'Next'.

3) Select database and objects

Select the database that you want to convert, and check on 'Scripts all objects in the selected databases'

4) Convert Options

Set options:
'Script for Server Version' = 'SQL Server 2005'
'Script Data' = 'True'
'Scirpt Database Create' = 'True'
    

5) Output Option

Select option 'Script to file', 'Single file' and 'Unicode text'.

6) 'Finish'

View summary and click 'Finish'.

7) Result

Now you got a complete database creation script with data. It can be executed on target database server.
 

8) Amend Script

Open the generated script in SQL Server Management Studio 2005. Find the following section and amend the path to proper data folder
CREATE 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 Script

When finished, You should get converted database of SQL Server 2005

Courtesy : http://potools.blogspot.in/

0 comments:

Post a Comment

This information provided by NFPE karimnagar. Powered by Blogger.

About Me

KARIMNAGAR, TELANGANA, India
Working as a Postal Assistant from March 28, 2011 Karimnagar Head Post Office and worked as Divisional treasurer for NFPE Union from February 03, 2013 to April 19, 2015.