Deploying new version of vRanger and want to move SQL database and configurations over to new SQL instance
Scenario:
We need to backup the vRangerPro SQL database, move to a new server, re-install vRanger Pro, restore the DB, and restore the SQL permissions. How can we do this?
This document will provide a step by step pictorial “How-To” on accomplishing this task. Please have your sa password used for install available during restore steps.
1. First we need to download and install the SQL Server Management Studio Express 2008
Accept all of the default options for install.
2. Stop the vRanger Pro Service by Clicking on Start, then Run. In the “Run” box, type:
net stop “vRanger Pro Service”
3. Next we need to create a backup of our current vRangerPro database. Start the Management Studio application and use the sa login or Windows credentials with Sysadmin permissions.
4. Now that we are in the Management Studio, we can start the backup process
5. Right Click the vRangerPro Database, and select Tasks, then Backup…
6. This now presents us with the Back Up Database Wizard
7. The options we want for the database backup are displayed in the above screenshot
8. The only thing on this page that needs to be changed is the Destination. To add a new destination, follow the below steps:
a. Click “Add”
b. Next Click the “…” radio button to set where you want the Database backup to be stored.
c. Here I am using a folder called “SQLBackups” on a local drive attached to my system. Here is where I also set the name for the DB archive to be created “vRangerPro.bak”:
d. Click “OK” to complete the destination setup.
e. Click “OK” again on the “Select Backup Destination” wizard
f. Now that our destination is set, we can run our DB backup. Click “OK” to execute the Database backup.
g. Now we have an archive of the vRangerPro DB stored in F:\SQLbackups
9. Now, complete a default install of vRanger Pro on the new server, utilizing the same sa password from the previous install. Then copy your database backup to a folder available to the new vRanger Pro install. Here it is in F:\SQLbackups, the same as the source I created.
10. Install the SQL Server Management Studio Express downloaded earlier in this process. Use all defaults for provided options during install.
11. Stop the vRanger Pro Service. Click on Start, then Run, in the Run box type: net stop “vRanger Pro Service”
12. Next, Start the Microsoft SQL Management Studio Express, and login using the Domain Credentials used during the vRanger Pro install (Or a user with sysasmin permission on the SQL instance).
13. Expand the Databases Folder view, and Right Click the “VrangerPro” database object. Select “Tasks”, “Restore”, and “Database”
14. Select “From device” in the “Source for restore” section of the screen, and click the “…” radio button to browse for the device backup.
15. Click “Add” in the “Specify Backup” dialogue window
16. Next, browse to the database backup file we copied to the vRanger install, in this example the file was F:\SQLbackup\vRangerPro.bak and click “Ok”.
17. Click “Ok” on the “Specify Backup” dialogue window
18. Now we are back in the “Restore Database – vRangerPro” task window, Click the check box next “vRangerPro-Full Database Backup” in the “Select the backup sets to restore” section of this window.
19. Click the “Options” page selection and select the option to “Overwrite the existing database” and click “OK”
20. The database should restore successfully and display a message such as this one:
21. Click “OK”
22. Now we need to make sure the vRangerProUser has the proper permissions for the following databases:
a. master
b. model
c. msdb
23. In the Management Studio, Click the + next to Security, then Logins. Locate the user vRangerProUser, the right click the user and select “Properties”
24. Once in the “Login Properties” windows, select “User Mapping”
25. Select Each of the system Databases (master, model, and msdb) and ensure that the user has a check box next to “public” for each of these databases. Then Click “OK”
26. Next, click the + next to the vRangerPro database, then click the + next to Security, then click the + next to Users. Right click the vRangerProUser and select Properties.
27. Change the Default schedma option from vRangerProUser to dbo, then click "OK"
28. Now start and stop the vRanger Pro Service in the services MMC.
29. Now, go back into the SQL Management Studio and click the + next to the vRangerPro database, then click the + next to Security, then click the + next to Users. Right click the vRangerProUser and select Properties.
a. Where the option “Default schema” is designated, change from dbo back to vRangerProUser, and click “OK”.
b. Start the vRanger Pro Service, the vRanger DB should now be successfully restored, and the vRanger GUi should now be ready to use. The service can be started by typing the following command in the “Run” box: net start “vRanger Pro Service”