Citrix Deployment of Access - Boost Priority (1 Viewer)

Rx_

Nothing In Moderation
Local time
Yesterday, 17:09
Joined
Oct 22, 2009
Messages
2,803
Can anyone suggest any down side to using this?
It has seemed to be good for 50 concurrent users. Would like to avoid any unexpected problems as the user base grows.

On a Citrix deployment of Access, Access will run on an Aplication Server. In my case, the Application Server only runs Access and Excel. Excel is used for reporting. Each user has a folder created and runs their own private front-end of Access linked to SQL Server.

Access is a split database with the Access front-end on the Applicaiton Server and Linked Tables to a SQL Server hosted on a dedicated server.

At this point, each Access during run-time didn't take up that much resources. Even dozens of them running currentlly didn't take up much resource.
I added this code to boost the Priority of Access as it starts up.
This would run on a users desktop too.
Code:
Public Sub BoostPriority()
        ' in Main (switchboard) Form_Load call BoostPriority
        ' Verified this worked on Windows 7 and 64 bit Win Server (for Citrix distribution)
        ' Rx_  example: substitute msaccess.exe with notpad.exe
        ' Start application, use Windows Task Manager to check before/after
          Dim strComputer As String
          Dim objWMIService As Object
          Dim colProcesses As Object
          Dim objProcess As Object
          Const ABOVE_NORMAL = 32768
          Const HIGH = 128
            On Error Resume Next
10        strComputer = "."
20        Set objWMIService = GetObject("winmgmts:" _
              & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
30        Set colProcesses = objWMIService.ExecQuery _
              ("Select * from Win32_Process Where Name = 'msaccess.exe'")
40        For Each objProcess In colProcesses
50            objProcess.SetPriority (HIGH)
60        Next
            'MsgBox "Testing Please hit OK to continue", vbOKOnly, "Run Level " & Err.Number
            Err.Clear
70          Set objWMIService = Nothing
80          Set colProcesses = Nothing
90          Set objProcess = Nothing
End Sub
 

Lightwave

Ad astra
Local time
Today, 00:09
Joined
Sep 27, 2004
Messages
1,521
Just playing devils advocat.

Could there be conflicts on the excell side of things? I have seen multiple people on remote desktops with different profiles conflicting when both individuals are in different spreadsheets which are both quite complicated.

But this is remote desktop client observation so maybe not relevant but something to keep an eye on.
 

Rx_

Nothing In Moderation
Local time
Yesterday, 17:09
Joined
Oct 22, 2009
Messages
2,803
That is a very good point.
My Citrix Application Server is dedicated to a single set of DB. All of the DB use Excel Object Model code to create reports with code run from Access.

As luck would have it, my rich resourced server only hits about 30% usage with a full load. If a server was under resourced... that might be a problem.
 

Rx_

Nothing In Moderation
Local time
Yesterday, 17:09
Joined
Oct 22, 2009
Messages
2,803
Just a followup about Access using Excel Automation
Had a new report were SQL Server uses Remote Servers to read-only several Oracle views.
So, we have an Oracle application and a SQL Server application.
Users up to now must open both to enter the same data so they match.

A view was built in SQL Server that puts around 100 columns side-by-side. Every odd column is SQL Server, every even column is Oracle.
There are about 30,000 rows.
With Access Automation, this view is dumped into Excel.
Then with Access vba Automation on the Excel Object Model the data is evaluated. Each paired column per row is evaluated. If the data is not the same, the paired column x row (2 cells) background color is turned red to indicate they don't match. Filters on the Excel allow the QA staff to filter to what doesn't match.

Running on my desktop, the automation takes SQL Server about 15 seconds to complete and 10 seconds to copy the data into Excel.
The time to run the recursive loops for 50 paired columns x 30,000 rows takes just over 400 seconds.

Running from citrix server, it took 2,400 seconds.
By boosting the Excel priority on the server, this came down to 1,900 seconds.

The real problem is that my citrix administrator only gave MS Office about 6G of RAM for many users. My desktop has 16G of RAM. So, we will get that issue addressed.
However, for this unique Excel vba intensive situation, I will plan to boost the priority until the very specific resource intensive process is completed.


One more thing, the Oracle data is all text. This means all numbers must be converted from text to numeric to compare them with the numeric data in SQL Server. Not all columns are numeric. There are two recursive types to address the numeric vs text.
Someone asked why not change the text to numeric in the SQL view with a CAST? (or was that just the voice in my head?).
Oracle doesn't force a number in the text field. So, there can be typos.
The idea in a QA report is to show exactly what is in Oracle. For example: a field in Oracle might have 02 instead of 2. Converting it would be misleading.
The leagle staff has to pull documents to determine which DB is correct in many cases. It is a very tedious process. The Excel automation report allows for filtered list specific to different forms. On average, it not only saved thousand of person hours of navigation to various forms, it graphically shows what is or isn't missing.
That is the power of Access using Excel automation.
 

Users who are viewing this thread

Top Bottom