This post describes steps to migrate vCloud Director MSSQL database to another server
Migrate DB to new SQL server
As part of repointing vCD database it must
be detached from old SQL server, attached to new SQL server and provide permission
for vCD login user as a prerequisite
USE master;
GO
ALTER DATABASE vCD_DB_Name
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE vCD_DB_Name
SET READ_ONLY;
GO
ALTER DATABASE vCD_DB_Name
SET MULTI_USER;
GO
2. Copy the backup files to these locations:
c:\Program
Files\Microsoft SQL Server\MSSQL\DATA\vCD_DB_Name.mdf
c:\Program Files\Microsoft SQL Server\MSSQL\DATA\vCD_DB_Name.ldf
Note: There must be two files with the extensions .mdf and .ldf.
3. Log in to the new vCD database and
attach the backup using these commands:
USE master;
GO
EXEC sp_attach_db @dbname = N’vCD_DB_Name‘,
c:\Program Files\Microsoft SQL Server\MSSQL\DATA\vCD_DB_Name.mdf
c:\Program Files\Microsoft SQL Server\MSSQL\DATA\vCD_DB_Name.ldf
GO
USE master
GO
exec sp_addlogin ‘UserName‘, ‘PassWord’, ‘vCD_DB_Name‘
5. Provide access to the database for the new user by running these commands:
USE [vCD_DB_Name];
GO
- exec sp_change_users_login ‘Report’
EXEC sp_change_users_login ‘Update_One’, 'UserName', 'vCD_DB_Name'
GO
1. Shutdown the vCD service
Service vmware-vcd stop
· 2. Open the /opt/vmware/vcloud-director/etc/global.properties file using a text editor.
· Comment out or remove these lines:
database.jbdcUrl=
database.username=
database.password=
· 3. Log in to the vCD server and configure vCD to
use the new database by running this command:
/opt/vmware/vcloud-director/bin/configure
4. Start the vCD service
5. Open the global.properties file and it should point now to new SQL DB server
Log into the cloud portal and navigate under Manage & Monitor click on Cloud Cells and you would notice other cells in the server group status is Disconnected
Repeat the same
above steps(1-5) on remaining cells in the server group. Eventually you will see other cells in the server group status as connected.
Comments
Post a Comment