locked
App-V 5.0 SP 1 Management Server: Invalid object name "dbo.RoleAssignments" RRS feed

  • Question

  • Dear Technet Members,

    i have the following problem when i try to access our productive App-V Management Server (The Management Server was working for more than 4-5 months now)!

    There were problems interacting with the database on the server. The error was: Invalid object name "dbo.RoleAssignments"

    App-V Version: App-V 5.0 SP1 on Windows Server 2012

    SQL Server: SQL Server 2012 Standard SP1

    I already taked a look at the permissions with SQL Management Studio. I have a App-V Admin Group which contains the App-V Management Server and the User which i use to administrate the App-V Management Server. This group has db.owner principals for the App-V Management database. 

    Do you have any idea?

    Attached i post any Logs that i have found:

    On the management Server:

    SQL exception encountered while checking if there are any infrastructure admins in the database.
    Message An error occurred while executing the command definition. See the inner exception for details.
    Stack Trace: 
       at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
       at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
       at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at Microsoft.AppV.Server.ManagementService.UserRoles.GetUserRoleMembers(String roleName)
       at Microsoft.AppV.Server.ManagementService.UserRoleManager.WasAnyInfrastructureAdministratorFoundInDatabase().

    Exception encountered while adding sid from path 'C:\Program Files\Microsoft Application Virtualization Server\ManagementService\AdminGroup.xml' to the database. Message An error occurred while updating the entries. See the inner exception for details.
    Stack Trace: 
       at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)
       at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)
       at Microsoft.AppV.Server.DataModel.AppVManagementEntities.Microsoft.AppV.Server.DataModel.IDataContext.SaveChanges()
       at Microsoft.AppV.Server.ManagementService.Global.AddRoleAssignmentToDataBase(RoleAssignment roleAssignment)
       at Microsoft.AppV.Server.ManagementService.Global.DoAddSidToAdminRole(String filename)

    Exception encountered while retrieving publishing metadata for publishing server '221'.
    Message: An error occurred while executing the command definition. See the inner exception for details.
    Stack Trace: 
       at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
       at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
       at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
       at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
       at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
       at Microsoft.AppV.Server.ManagementService.PublishingMetadata.VerifyAuthorizedPublishingServer(String serverSid, Boolean isLocalServer)
       at Microsoft.AppV.Server.ManagementService.PublishingMetadata.Get(String sequenceNumber).

    SQL exception encountered while checking if 'S-1-5-21-1669538509-1693540215-1234779376-26752' belongs to infrastructure administrators group.
    Message An error occurred while executing the command definition. See the inner exception for details.
    Stack Trace: 
       at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
       at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
       at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
       at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at Microsoft.AppV.Server.ManagementService.UserRoles.GetUserRoleMembers(String roleName)
       at Microsoft.AppV.Server.ManagementService.UserRoles.MemberOf(WindowsIdentity callerIdentity, String role)
       at Microsoft.AppV.Server.ManagementService.UserRoleManager.VerifyInfrastructureAdministrator().

    Tuesday, October 15, 2013 8:34 AM

Answers

  • Hi Eric,

    yes, i have the solution!

    In my case, there were just registry files missing on the App-V Management Server. I dont know how this could be happened, because no one made any changes on the Management Server.

    HKLM\Software\Microsoft\AppV\Server\ManagementService

    HKLM\Software\Microsoft\AppV\Server\PublishingService

    HKLM\Software\Microsoft\AppV\Server\ReportingService

    Check if in the REG_SZ Keys "Management_DB_Name" the Name of your SQL Database is available. In my case, the Keys were empty.



    Thursday, October 31, 2013 10:08 AM

All replies

  • So, it appears that the App-V Management Server tries to read the dbo.RoleAssignment table (that stores the names and SIDs of the user/group that should be allowed to manage App-V servers.

    It can't find appropriate information and thus tries to add the entry from 'C:\Program Files\Microsoft Application Virtualization Server\ManagementService\AdminGroup.xml' into that table. However, also this seems to fail.

    Can you verify that your Management Database still has that RoleAssignemtn table?

    - if the table isn't there, there is an issue with your App-V Management database

    - if the table is there but empty, verify that the SID from the AdminGroup.xml still is a valid account. If the SID's account doesn't exist any longer, enter a different SID into that XML, then restart the App-V Management Server (I'd restart the entire machine). As a result, the SID from the XML should be added to the table

    - if there is 'something' in the table, make a copy of that (notepad is sufficient), then clear the table.

    Obvious questions are: did you change anything (database connection string on the App-V Management Server's registry, Firewall, Database Restore activities, VM Snapshot reverting...)


    Falko

    Twitter @kirk_tn   |   Blog kirxblog   |   Web kirx.org   |   Fireside appvbook.com

    Tuesday, October 15, 2013 12:27 PM
    Moderator
  • Hi Falko,

    thanks for your reply.

    I looked in the XML and you´re right, there was a wrong SID of a different Group typed in. I changed the SID in the XML and restarted the Management Server & SQL Server. Same issue existing.

    I´m not so similar with SQL Management. Can you tell me where i have to look for the table?

    Regarding your last question: We didn´t changed anything. At the moment i dont know why there was a wrong Group in the XML.

    Best regards

    Tuesday, October 15, 2013 12:42 PM
  • Was there a solution for this problem.  I am getting the same error message when I try to use App-V except I am using Windows 2008 r2 and SQL 2008 R2 SP2.


    Eric

    Wednesday, October 30, 2013 2:10 PM
  • Hi Eric,

    yes, i have the solution!

    In my case, there were just registry files missing on the App-V Management Server. I dont know how this could be happened, because no one made any changes on the Management Server.

    HKLM\Software\Microsoft\AppV\Server\ManagementService

    HKLM\Software\Microsoft\AppV\Server\PublishingService

    HKLM\Software\Microsoft\AppV\Server\ReportingService

    Check if in the REG_SZ Keys "Management_DB_Name" the Name of your SQL Database is available. In my case, the Keys were empty.



    Thursday, October 31, 2013 10:08 AM
  • Thanks for getting back to me.  I talked with our guy who uses the server to publish applications and he told me that there were none ever published, he never used it.  As annoying as I found this I was fortunate enough to be able to delete the DBs and recreate them from scratch.  I will keep what mentioned above as a note if this were to ever happen to us again and he was actually using the server to publish applications.


    Eric

    Thursday, October 31, 2013 2:01 PM