VMware Cloud Community
yeuemai78
Contributor
Contributor

How to replace MSDE server with SQL 2005 server in Virtual Center 2.0?

Anyone has any good information how to start convert the MSDE database to newly installed SQL 2005 server? Any documentation or feedback should be appreciated.

Regards,

Yeuemai78

Reply
0 Kudos
11 Replies
esiebert7625
Immortal
Immortal

Here's some steps I documented...

How can I migrate my VirtualCenter database from MSDE to SQL server?

• This has only been tested on SQL 2000 but should work OK on SQL 2005.

• Shutdown the VirtualCenter Server so it disconnects from the SQL database.

• At a CMD prompt type “osql –E –D prompt type the following, “use master” closes the connection to the vcdb so it can be detached, go executes the previous SQL statements.

o Use master

o Exec sp_detach_db ‘vcdb’

o Go

• Copy the two database files (vcdb.mdf and vcdb.ldf) to the destination SQL server data directory.

• Load SQL Enterprise Manager on the destination database server.

• Select Security and then right click on Logins and select “New Login”. In this example we are using vpxadmin as the SQL user account.

• On the General tab specify the username, if using SQL authentication make sure the password also matches and click OK.

• Right click on “Databases” and select “All Tasks” and then “Attach Database”

• Browse to the directory that you copied the database and log files to and select the MDF file for VC, select vpxadmin as the owner and click OK.

• Select Security and Logins, right-click on the vpxadmin user and select “Properties”.

• Change the Default Database from “Master” to “VCDB”

• On the VC Server, edit the existing ODBC connection for VC under the System DSN tab. Change the Server from MSDE to the appropriate SQL Server and click Next.

• Select the appropriate authentication method, if using SQL authentication enter the username/password that you created in the Security step above and click Next.

• Click Next again, the default database should already be VCDB, click Finish and that’s it.

• Click the “Test Datasource” button to verify that it works and then OK.

• On the VC server, run the VC installation program, click Next at the Welcome screen and then select Repair and click Next.

• Select “Use an existing database server” and click Next, enter the SQL db username and password and click Next

• At the Overwrite Data message select NO

• At the License Server screen select the appropriate option (usually use an existing license server) and click Next

• Enter the appropriate license server address (usually 27000@localhost) and click Next

• Enter the appropriate port information (usually the default is fine) and click Next

• Enter the appropriate Apache web server port (usually 8086) and click Next then click the Install button

• Start the VC server and that should be it. If the VC Server fails to start check the log files localed in C:\Windows\Temp\VPX for the reason why.

Also read...

SQL 2005 support - http://kb.vmware.com/kb/6565318

SQL 2005 support - http://www.vmware.com/community/thread.jspa?threadID=75222

Fyi…if you find this post helpful, please award points using the Helpful/Correct buttons.

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Thanks, Eric

Visit my website: http://vmware-land.com

-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-

Reply
0 Kudos
yeuemai78
Contributor
Contributor

Is is a complete migration steps or just some steps you remember of your head. Will my hosts and VMs still running if I disconnect my virtual center database server?

Is there a guide to this migration procedure anywhere? Thank you for very helpful information.

Reply
0 Kudos
esiebert7625
Immortal
Immortal

I documented each step as I completed it. This will not effect your VM's or ESX hosts. The only features that will not work without VirtualCenter are Vmotion and DRS.

I also used this KB article to help me...

http://support.microsoft.com/?id=314546

Reply
0 Kudos
yeuemai78
Contributor
Contributor

Thank you for your replied, I'll try this tomorrow and hopefully it works out well for me. Thanks to you and best wish. I'm kinda new to VMware!

Reply
0 Kudos
esiebert7625
Immortal
Immortal

No problem, good luck with it.

fyi...don't forget to award points for helpful answers using the Helpful/Correct buttons...thanks

Martin1916
Contributor
Contributor

esiebert,

This worked great for me. Thanks for the detailed info.

Martin

Reply
0 Kudos
David_hagan
Contributor
Contributor

Steps worked great, thanks.

If you move from MSDE to a SQL server because of the transaction logs filling up, be sure to bump up the space allotted to them or you will continue to have the same problem.

Goes without saying probably, but there it is anyway.

Reply
0 Kudos
azn2kew
Champion
Champion

Shutdown the VirtualCenter Server so it disconnects from the SQL database. (is this shutdown the VC server or services)?

At a CMD prompt type -osql -E -D <ODBC datasource name>ie. -osql -E -D VMware VirtualCenter. This will load the osql command line SQL client for MSDE, login using the local trusted connection and connect using the VC ODBC data source. (is this perform on MSDE server or new SQL 2005 server)?

(is this perform on MSDE server or new SQL 2005 server)?

At the 1> prompt type the following, use master closes the connection to the vcdb so it can be detached, go executes the previous SQL statements.

Use master

Exec sp_detach_db vcdb

Go

Didn't seems to make it work because the command -osql I've entered didn't do anything.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
Reply
0 Kudos
esiebert7625
Immortal
Immortal

Look at your ODBC Data Sources, is yours named "VMware VirtualCenter"

Reply
0 Kudos
azn2kew
Champion
Champion

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
Reply
0 Kudos
barron
Contributor
Contributor

You are doing a migration of an MSDE database on a remote SQL Database Server. If the MSDE is on the Virtual Center Server then you cannot shutdown the VC. Make sense?

Cheers,

Barron

Reply
0 Kudos