Archive

Posts Tagged ‘datastore’

App-V: Recommended Upgrade Preparations and Rollback procedures when upgrading from App-V Management Server 4.5 RTM or SP1 to SP2.


Before Upgrading to App-V 4.5 SP2 on the management server, it is recommended to first review the release notes for added features such as SQL mirroring support.

App-V 4.5 SP2 Release Notes

http://technet.microsoft.com/en-us/library/ff699130.aspx

Also, you can download the installation for SP2 here:

http://www.microsoft.com/download/en/details.aspx?id=25291

Pre-Upgrade Recommendations

The following are recommendations for preserving information and critical data to ensure a proper rollback is available in the event of an upgrade failure or a desired rollback to a previous version of the App-V server.

1.)    Backup a copy of the App-V management SQL datastore. In SQL this is the APPVIRT database by default.

2.)    If .NET 4.0 is installed and you are using Windows Server 2003, The current work around is to:

a. Remove the .NET 4.0 (temporarily as it will be re-added later.)
b. Restart the server.
c. Perform the Upgrade. Restart the server.
d. Reinstall the .NET 4.0 Framework.

Potential Upgrade Failures

The following are recommended options for rollback should an error occur during upgrade.

In the event of a 25109 error, please use Rollback Option #1 for rolling back the server to its previous state.

In the event of a 25119 error (or any error not otherwise mentioned), please use Rollback Option #2 for rolling back the server and data store to its previous state.

In the event of a 2512* error, please use rollback option #3 for rolling back the AppVirt management Service (ASP.NET Web Management Service) to its previous state.

In the event that the installation completes successfully and you decide for reasons otherwise not mentioned here to roll back the server to its previous state, please refer to Rollback Option #2 for rolling back the server to its previous state.

Rollback Option #1

A 25109 error indicates failure to connect to the database. In the event of this error, all that needs to be rolled back are the binaries on the App-V Management Server.

1.)    After the installation rolls back, very connectivity to the App-V Management server.

2.)    If the binaries list version numbers at SP2 (4.5.3.XXX) uninstall the App-V Management server and reinstall your previous version.

Rollback Option #2

A 25119 error or a successful completion of the upgrade means that both the App-V Management server binaries and the SQL data store have been upgraded. The rollback procedure requires both the server binaries and the data store to be reverted back to its previous version.

1.)    Restore the previously backed up version of the App-V data store on the SQL server back to its previous version.

2.)    The App-V Management Server will likely be rolled back to its previous version during the installation. If this as a rollback following a successful installation then the existing version will need to be uninstalled and the previous version will need to be reinstalled.

Rollback Option #3

1. Manually uninstall ONLY the AppVirt Management Service (Service – not server.)

2. Restart the server.

3. Reinstall AppVirt Management Service component from SP2 media.

– Steve Thomas

Advertisements

App-V The solution in Knowledge Base article 959459 did not work. What did I do wrong?


Do you have the App-V 4.5 management server installed on the same server as your SQL server? Are you getting the following error every time you try to start the App-V Management Server service?

System error 1075 has occurred.

The dependency service does not exist or has been marked for deletion.

This may also occur frequently after implementing changes outlined in KB 959459.

In KB959459, there are instructions to configure a service dependency for the AppVirtServer service registry key.

When you add a REG_MULTI_SZ value named DependOnService to the key and put in MSSQLSERVER as the default, it is assuming that you are working with a default instance of SQL Server instead of a named instance.

However, if you are using a named instance, the SQL Server service entry will not be named MSSQLSERVER, therefore this dependency will be invalidated upon startup and this message will display.

To fix this, instead of placing the value MSSQLSERVER in the DependOnService key, place the name of the instance registered (i.e. MSSQL$VIRT or MSSQL$APPV, etc.)

This will require a full reboot of the server to take effect.

Steve Thomas

App-V: Certain Database tables not updating or empty post upgrade from 4.1

May 31, 2011 2 comments

You may notice certain tables like ACTIVE_APPLICATIONS, APPLICATION_CAPABILITIES, or DISCONNECTED_EXPIRIES either not updating with information, empty, or missing when looking at an App-V datastore directly in SQL Management Studio or querying through T-SQL. 

The likely scenario is that the database was updated from Softgrid 4.1. During the upgrade process for whatever reason, the tables, views, and/or stored procedures that were deprectaed for App-V Server 4.5 were left in the database.

The following tables are deprecated as of 4.5. They may still appear in a database that has been upgrade from a pre-4.5 release, but they are no longer actively updated or accessed.

ACTIVE_APPLICATIONS
APPLICATION_CAPABILITIES
APPLICATION_EXTENSIONS
DISCONNECTED_EXPIRIES
MANAGEMENT_SERVERS
SOFTGRID_USERS

Deprecated Views

The following views are deprecated as of 4.5. They may still appear in a database that has been upgrade from a pre-4.5 release, but they are no longer actively updated or accessed.

VW_MANAGEMENT_SERVERS

Deprecated Procedures

The following procedures are deprecated as of 4.5. They may still appear in a database that has been upgrade from a pre-4.5 release, but they are no longer actively updated or accessed.

sp_SFTrpt_systemusagebyuser
sp_SFTrpt_usergroupusage
sp_SFTsetdbaccess

No action is needed. Manual deletion of these tables, views, and stored procedures can be done for the purpose of clarity although the fact they remain should have no bearing on the operation of the server or data store.
Categories: App-V Tags: , , , ,

App-V 4.5: Failed to Start App-V Management Server: Error 268480357

May 17, 2011 4 comments

Here is the scene. An attempt to start App-V Management Server 4.5 fails with the following error:

“Windows could not start the Application Virtualization Management Server on “servername.” For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 268480357.”

You also then see the following in the SFT-SERVER.LOG file when it is set to VERBOSE:

[2010-07-10 15:23:21.909] - 4020 4080 SW_MessageHandler::Open - - - - 5 65535 "Initialization complete."
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SQLDataConnection::MapError - - - - 5 65535 "Got unknown error code: 5701."
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SQLDataConnection::HandleError - - - - 5 65535 "Error 0x1645, State: 01000, Text: [Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to APPVIRT."
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SQLDataConnection::MapError - - - - 5 65535 "Got unknown error code: 5703."
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SQLDataConnection::HandleError - - - - 5 65535 "Error 0x1647, State: 01000, Text: [Microsoft][ODBC SQL Server Driver][SQL Server]Changed language setting to us_english."
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SQLDataConnection::HandleError - - - - 5 65535 "Error 0x0, State: 01004, Text: [Microsoft][ODBC SQL Server Driver]String data, right truncation"
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SQLDataConnection::MapError - - - - 5 65535 "Got unknown error code: 229."
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SQLDataConnection::HandleError - - - - 5 65535 "Error 0xe5, State: 42000, Text: [Microsoft][ODBC SQL Server Driver][SQL Server]The SELECT permission was denied on the object 'SYSTEM_OPTIONS', database APPVIRT, schema 'dbo'."
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SQLDataConnection::MapError - - - - 5 65535 "Got unknown error code: 16945."
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SQLDataConnection::HandleError - - - - 5 65535 "Error 0x4231, State: 42000, Text: [Microsoft][ODBC SQL Server Driver][SQL Server]The cursor was not declared."
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SQLDataConnection::SearchInternal - - - - 5 65535 "Failed to execute statement. [SELECT * FROM SYSTEM_OPTIONS]"
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SQLDataConnection::GetRecord - - - - 5 65535 "No records found."
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_DataAccess::Initialize - - - - 5 65535 "Unable to retrieve value for system options record"
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SystemDispatcher::init - - - - 1 44901 "System dispatcher initialization error [-1]. System dispatcher startup will stop.
"
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SystemDispatcher::fini - - - - 5 65535 "Shutting down System Dispatcher version 4.5.1.15580 (4020)"
[2010-07-10 15:23:22.018] APPV01 4020 4080 SW_SystemDispatcher::fini - - - - 0 44952 "Successfully shut down Microsoft System Center Application Virtualization Management Server Version 4.5.1.15580 (4020)
"
[2010-07-10 15:23:22.018] APPV01 4020 1860 SW_MessageHandler::Close - - - - 5 65535 "Shutdown complete."
You will see this occur often when you try to point the 4.5 server (Application Virtualization Management Server) to a database created by a lower version. In this particular case, the 4.5 server was trying to connect to a database previously used by a 4.1.3.16 server.
This often happens in scenarios where a 4.5 server cannot connect for some reason to a 4.5 datastore and an older copy of a previous version of the database maybe restored in error or out of desperation.
 
Regardless, this error will happen immediately upon startup. If you point to a pre-4.5 database during installation, however, the installation program will try to update it.

The best solution is to either stand up a new installation that creates a new installation or uninstall the App-V 4.5 server and install a 4.1 version of the Softgrid Virtual Application server and point to this database. Then proceed to attempt to upgrade the 4.1 server to 4.5 which in turn should upgrade the database from 4.1 to 4.5.

PLEASE NOTE: This is predicated on the fact the database is in a usable state.

Categories: App-V Tags: , , , ,

App-V: 4.5 SP2 Server Fails to Connect to Failover Database Instance

May 13, 2011 3 comments

Beginning with 4.5 Service Pack 2, the Microsoft App-V server now provides support for SQL Server mirroring. This allows for datastore redundancy via mirror failover in an enterprise environment. It also allows you to switch from native OS ADO over the SQL native client 10.0.

Information on how to configure this can be found here:

http://technet.microsoft.com/en-us/library/ff660790(printer).aspx

However, many have noticed that in spite of following these instructions, they were still having issues with the App-V server connecting to the failover instance.

When this failure occurs, you will see this in the server’s SFT-SERVER.LOG file:

[2011-4-07 16:33:29.212] APPVSERVER 2600 4100 SW_SQLDataConnection::PopulateConnectionString – – – – 5 65535 “Constructed ODBC connection string: DRIVER={SQL Server};DATABASE={APPVIRT};Network={DBMSSOCN};Server={APPVSQLM2,1433};”
[2011-4-07 16:33:29.259] APPVSERVER 2600 4100 SW_SQLDataConnection::MapError – – – – 5 65535 “Got unknown error code: 4060.”
[2011-4-07 16:33:29.259] APPVSERVER 2600 4100 SW_SQLDataConnection::HandleError – – – – 5 65535 “Error 0xfdc, State: 42000, Text: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database “APPVIRT” requested by the login. The login failed.”
[2011-4-07 16:33:29.259] APPVSERVER 2600 4100 SW_SQLDataConnection::Open – – – – 5 65535 “Failed to load requested driver.”
[2011-4-07 16:33:29.259] APPVSERVER 2600 4100 SW_SQLDataConnection::Open – – – – 5 65535 “Unable to open ODBC data source.”
[2011-4-07 16:33:29.259] APPVSERVER 2600 4100 SW_DataConnectionPool::Open – – – – 5 65535 “Failed to open connection.”
[2011-4-07 16:33:29.259] APPVSERVER 2600 4100 SW_DataConnectionPool::Close – – – – 5 65535 “Close () called on closed object.”
[2011-4-07 16:33:29.259] APPVSERVER 2600 4100 SW_DataAccess::Initialize – – – – 5 65535 “Failed to open configuration pool.”
[2011-4-07 16:33:29.259] APPVSERVER 2600 4100 SW_SystemDispatcher::init – – – – 1 44901 “System dispatcher initialization error [-1].

You will also see the following in the SQL ERRLOG file:

2010-12-29 13:55:27.18 Logon       Error: 18456, Severity: 14, State: 38.
2010-12-29 13:55:27.18 Logon       Login failed for user ‘domain\machineaccount$’. Reason: Failed to open the explicitly specified database. [CLIENT: x.x.x.x]

Cause

Microsoft had a small but serious DOC bug that took me doing an iDNA trace to find. Truth be told, I over-troubleshot it as a simple Process Monitor would have revealed it.  The SQL Failover registry keys defined here:http://technet.microsoft.com/en-us/library/ff660790.aspxwere previously listed as:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Softgrid\4.5\Server\SQLFailOverServerName
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Softgrid\4.5\Server\SQLFailOverServerPort

and we are told to create them in Steps 7 and 8.

Problem is the value SQLFailOverServerName should be SQLFailoverServerName.  That one lower case letter was preventing auto failover from occurring.

Change the registry value to SQLFailoverServerName. Since this happened, the document has been modified. The alternate languages versions of the document are also in the process of being corrected.
Steve Thomas
Categories: App-V Tags: , , , , , ,

App-V: Upgrade from Softgrid Server 4.1 to App-V Server 4.5 Fails with Error 25119


You may know the issue: You are trying to upgrade from the Softgrid VAS 4.1 to Microsoft Application Virtualization (App-V) 4.5 Management Server and it fails with the following error:

Error 25119:

“The installation program could not upgrade the configuration data store. Please see the installation log file for more information”

This is a generic database upgrade issue. there have been many causes of this as the error just means the database upgrade failed.

NOTE: There are several potential causes of this. Please take note that you will need to confirm this issue by examining specifically the softgrid-server-setup.log file. Please also refer to the Microsoft Knowledge base as many other possible causes have been documented.

In this particular instance, the database used split schemas where half of the stored procedures ran under a different schema than dbo.

The Softgrid-Server-setup.txt log reveals failure and further SQl Profiler Traces confirmed that it all went south as soon as it hits the stored procedures with user-defined schemas.

[2010-09-13 15:03:28] (11796:12004) SQL state: ``01000'', Native: 0, Text: ``[Microsoft][ODBC SQL Server Driver][SQL Server]<<<     sp_SFTrepldel_... >>>''.
[2010-09-13 15:03:28] (11796:12004) SQL state: ``42S02'', Native: 3701, Text: ``[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot drop the procedure 'sp_SFTreplins_ACCOUNT_AUTHORITIES', because it does not exist or you do not have permission.''.
[2010-09-13 15:03:28] (11796:12004) ::SQLExecDirectW error 0xffffffff.
[2010-09-13 15:04:32] (11796:12004) Failed to execute SQL statement ``
if exists (select * from sysobjects where type = 'P' and name = 'sp_SFTreplins_ACCOUNT_AUTHORITIES')  drop proc [sp_SFTreplins_ACCOUNT_AUTHORITIES]
[2010-09-13 15:04:32] (11796:12004) Directory ``C:\Program Files\Softricity\SoftGrid Server\schema\upgrade\4.1\'' failed!

————-

In this case, the non dbo schemas were owned by “Softricity_User.” What you do is use the following script to create a stored procedure called spMigrateStoredProcedures.sql.

NOTE: If you use this script just make sure to replace “Softricity_User” with the account specific to your customer’s database. After you use this script to create the stored procedure, execute it prior to upgrade. PLEASE BACK UP YOUR DATABASE BEFORE DOING SO.

—————————–

CREATE PROCEDURE [dbo].[spMigrateStoredProcedures] AS
DECLARE @FromSchema varchar(100)
DECLARE @ToSchema varchar(100)
SET @FromSchema = N'Softricity_User'
SET @ToSchema = N'dbo'
DECLARE @Done bit
DECLARE @LASTNAME varchar(1000)
SET @Done=0 -- insert top of tree
SET @LASTNAME = 'ZZZZZZ' 
WHILE @Done=0  
BEGIN           
    select top 1 @LASTNAME=[name] from sys.sql_modules sm
    inner join sys.objects so on sm.object_id = so.object_id
    where so.schema_id = schema_id(@FromSchema) and so.name like N'sp%'
    and [name] < @LASTNAME
    order by [name] desc

    IF @@rowcount=0 
        begin  
            SET @Done=1 
        end
    else
        begin
            exec ( 'print ''moving '+@LASTNAME+'''')
            exec ('ALTER SCHEMA '+@ToSchema+' TRANSFER '+@FromSchema+'.' + @LASTNAME  )
        end
END

App-V 4.5: The App-V Management Server Service fails to start with Service-Specific Error 268480320

March 8, 2011 4 comments

You may get the following error message when you try to start the App-V Management Server service:

“Windows could not start the Application Virtualization Management Server on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 268480320

System Event Log will show the same error under Event ID 7024.

You will also see the following error in the SFT-SERVER.LOG file on the App-V Management server:

SW_ProtocolServer::ConfigureLogPipeline – – – – 1 44864 “Unexpected Error creating Log Pipeline.

This relates to the Provider Pipeline Logging Configuration which is configured at the Server Group Level.

You may also see a false positive log message stating that the server was unable to connect to the data source. The server is able to connect, but the database records it is reading in for the pipeline (to the MESSAGE_LOG table) is incorrect.

To resolve and prevent this issue, it will require correct log pipeline configuration. This is done as follows:

1.) Launch the Application Virtualization Management Console.

2.) From the Server Groups node, right-click the Server Group your App-V Server belongs to and select “Properties.”

3.) Click on the “Logging” tab.

4.) Select “SQL Database” and select “Edit.”

5.) Make necessary modifications under these considerations:

– If the SQL Server you are connecting to contains multiple instances, you will need to select “Dynamically Determine Port.”

– If the SQL Server you are connecting to resides on the default instance, select port 1433 and disable “Dynamically Determine Port.”

– If the SQL Server you are connecting to is using a non-standard port, specify the port and disable “Dynamically Determine Port.”

Categories: App-V Tags: , , , , , , ,