How to convert Hyper-V dynamic disk to fixed disk

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…’.

Change Hyper-V Default Folders Step 1

2) Next

Click ‘Next’.

Change Hyper-V Default Folders Step 1

3) Select database and objects

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

Change Hyper-V Default Folders Step 2

4) Convert Options

Set options:

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

Change Hyper-V Default Folders Step 2

5) Output Option

Select option ‘Script to file’, ‘Single file’ and ‘Unicode text’.

Change Hyper-V Default Folders Step 1

6) ‘Finish’

View summary and click ‘Finish’.

Change Hyper-V Default Folders Step 1

7) Result

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

Change Hyper-V Default Folders Step 1

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

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

Related Articles

Random Articles

  1. No Responses to “Configuring ISA Server For Inbound VPN”

  2. By Saad on Jul 28, 2010 | Reply

    Someone sitting in America, Canada or United Kingdon can not realize what it mean to use internet without all the blessings like facebook, twitter, flicker, and youtube e.t.c. But it was mty fate, till I discovered this amazing VPN service called Astrill. Now I can Bypass all international IP restrictions and finaly I feels like a frree man.
    I advise all my chinse friends to use Astrill, the best use of your 19$, for 90 days of clearity.
    http://www.topfreevpn.com/hidemyass-vpn-provider-review-vpns/

Post a Comment