//
you're reading...
SQLServer, Vmware

How To move your SQLServer2005 Express DB

Days ago i tried to update my VCenter (virtual) and UpdateManager on the same guest (i know it’s bad),using vsphere u2 iso.
I came across a little problem: “c:\ not enough free space”.
Another bad thing i’ve made is my SQLServer DB shares the same partition with my XP System,Vcenter Server …..

That’s when i found a useful tool: Microsoft SQL Server Management Studio Express.
My problem is solved, the only thing i need to do is migrate my DB to another partition, here is how to do this:

right after a successful installation, launch the SQL Server Management Studio Express.
wpid-mssmse-1-2010-07-15-14-232.png

As you can see, i have both SQL DB in the same instance: SQLEXP_VIM

Now i want to move the 2 of them in another local partition, wich is in my case E:\

First:
I had to stop all running vmware services:
wpid-vmware-services-2010-07-15-14-231.png

Second:
right click on VIM_UMDB and choose “Task” and then “detach” (read detacher in french )

wpid-mssmse-2-2010-07-15-14-231.png
Third:
Check if in the message box there is no other connexion to the DB, if not then click “OK” at the bottom left and the screen:
wpid-mssmse-3-2010-07-15-14-231.png

Do exactly the same with VIM_VCDB

Once all DB are detached, move them to another partition.
In my case E:\, i’ve created mssql-vmware-DB folder and put both of them there.

wpid-screenshot2010-07-15at3-19-10pm-2010-07-15-14-231.png

To reattach your DB, it’s easy!

Fifth:
Right click on Database and choose “attach” (read joindre in french)
wpid-mssmse-6-2010-07-15-14-231.png

You’ll have a screen like this one:
wpid-mssmse-4-2010-07-15-14-231.png

Click on the “Add” button, and browse to the folder you’ve moved your mdf files to, choose one of them and click “OK”
wpid-mssmse-5-2010-07-15-14-231.png

Do the same with the other mdf file, restart all vmware services you’ve stopped before, and it’s done !

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Calendar

July 2010
M T W T F S S
    Sep »
 1234
567891011
12131415161718
19202122232425
262728293031  
%d bloggers like this: