Jaa


How to install the App-V 5.0 Database and Management Server using SQL scripts on the DB

Ryan Cobb | Senior Premier Field Engineer

GearsHi everyone, my name is Ryan Cobb and here are the steps required to install the App-V 5 Database and Management Server using the SQL scripts on the DB instead of the installation routine.

=====

Background

Environment: Windows Server 2008 R2 domain

Computers:

  • AppVDC : Our Windows Server 2008R2 Domain Controller.
  • AppvServer : A Windows Server 2008R2 computer running SQL Server 2008 R2.
  • AppvServer2 : A Windows Server 2012 computer that is a member server in the domain. All App-V server pre-reqs are met.

Users and groups : AppVAdmin, member of AppV5Admins, Domain Users, Domain Admins.

Tasks:

  • Install App-V 5 Management and Reporting databases on AppVServer using the scripts provided by Microsoft.
  • Install App-V Management and Reporting services on AppVServer2 using the pre-installed databases.

 

Installation

First, the installation files need to be extracted from appv_server_setup.exe. This is done by executing the following command in an elevated CMD prompt:

appv_server_setup.exe /layout /layoutdir=c:\extractedinstallationfiles

We will work with the ManagementDatabase first. Inside your c:\extractedinstallationfiles directory is the DatabaseScripts folder, and in here you will find two folders; one for ManagementDatabase and one for ReportingDatabase.

Inside the ManagementDatabase folder there are a couple .sql files that will need to be modified as needed for your environment. The first file is the Database.sql file. The image below is the file as it was extracted.

clip_image002

The next image will show the differences after modification. Because my SQL Server already has both AppVManagement and AppVReporting databases for a different test environment, I need to change the names in the script to something else. For my example here, I will append a 5 to the database names (e.g. AppVManagement5 and AppVReporting5) as show below:

clip_image004

Next up we need to modify the permissions.sql file. It needs to be modified to ensure that the correct permissions are setup for the database. Mainly it adds the name of the App-V admins group, of which a member of that group is used to install the App-V server components on the AppVServer2 computer. In my example, my App-V admins group is named AppV5Admins and the name of the account being used is ManagementDbPublicAccessAccount. The other account that is needed is the ManagementDbWriteAccessAccount account and it is the account of the server used to install the App-V Management components and would be the machine account for AppVServer2.

But only if it was so simple. You see, SQL doesn't particularly like friendly names for user groups or computers so we will need to provide the SIDs for each entity instead.

Using PowerShell and the friendly names of both the group and machine we can retrieve the SIDs. The image below shows the retrieval of the SID for the AppV5Admins group and the AppVServer2 machine account:

clip_image006

The syntax for the above image is:

$Account=”domain\account”
(New-Object system.security.principal.NtAccount($Account)).translate([system.security.principal.securityidentifier]).value

Now that we have the SIDs we can plug those into our permissions.sql file as needed.

Before:

clip_image008

After. Notice how the [ ] brackets were removed. The SIDs as pasted also had the ‘S’s and ‘-‘s (dashes) removed.

clip_image010

I then copied the ManagementDatabase folder to my SQL Server computer which is named AppVServer.

Next, I opened SQL Management Studio, and per the directions from the readme I executed each of the .SQL files in their proper order.

I verified through SQL Management Studio that the commands completed as the DB was added, tables created, etc.

The final test is to install the App-V Management Server service on AppVServer2, which, when given the correct information as far as DB Servername, Instance name and DB Name, all was well in the world!

For the reporting database install, simply repeat the procedure above.

Ryan Cobb | Senior Premier Field Engineer | Microsoft

Get the latest System Center news on Facebook and Twitter :

clip_image001 clip_image002

System Center All Up: https://blogs.technet.com/b/systemcenter/
System Center – Configuration Manager Support Team blog: https://blogs.technet.com/configurationmgr/
System Center – Data Protection Manager Team blog: https://blogs.technet.com/dpm/
System Center – Orchestrator Support Team blog: https://blogs.technet.com/b/orchestrator/
System Center – Operations Manager Team blog: https://blogs.technet.com/momteam/
System Center – Service Manager Team blog: https://blogs.technet.com/b/servicemanager
System Center – Virtual Machine Manager Team blog: https://blogs.technet.com/scvmm

Windows Intune: https://blogs.technet.com/b/windowsintune/
WSUS Support Team blog: https://blogs.technet.com/sus/
The AD RMS blog: https://blogs.technet.com/b/rmssupp/

App-V Team blog: https://blogs.technet.com/appv/
MED-V Team blog: https://blogs.technet.com/medv/
Server App-V Team blog: https://blogs.technet.com/b/serverappv

The Forefront Endpoint Protection blog : https://blogs.technet.com/b/clientsecurity/
The Forefront Identity Manager blog : https://blogs.msdn.com/b/ms-identity-support/
The Forefront TMG blog: https://blogs.technet.com/b/isablog/
The Forefront UAG blog: https://blogs.technet.com/b/edgeaccessblog/