Skip to content

SQLAdmin Anchor

Niels Grove-Rasmussen edited this page Apr 2, 2017 · 2 revisions

(SQLAnchor)

The User Interface implemented in the client “SQLAnchor” is meant to run not only in normal circumstances but also in an emergency situation. Actually SQLAnchor should be useful to the stressed Database Administrator (DBA) in the near-ultimate emergency.

This gives that SQLAnchor should be able to run on a bare Windows installation – in a supported version – without further installations of other applications or frameworks. Think of the situation where the DBA office is gone with all notes and workstations and the Problem Manager has bought some home computers at the local Radio Shack.

To be able to handle the situation where the central data is unavailable, SQLAnchor should have a persistent local data cache. These data must be maintained automated under normal circumstances.

Also SQLAnchor should be able to be executed in another security context than the local user, e.g. by runas.exe.

Data to and from SQLAnchor are handled by stored procedures in the schema “sqlanchor”. See also the description of SQLAdmin Inventory.

Functions

  • Ping Computer
  • Start PowerShell
  • Start SQL Server PowerShell (SQLPS)
  • Start the Management Console "Computer Management"
  • Start Remote Desktop

Technology Discussion

For now SQLAnchor is implemented by HTA (see below). The next major rewrite will most likely be Winforms in PowerShell. But I am also considering a gamification of SQLAnchor, redesign it and rewrite it using DirectX with C++.

HTML Application (HTA)

Pro Contra
Is part of a default Windows installation for several versions of Microsoft Windows. Can not be executed from a remote file share. A workaround is to copy the hta-file to the temp-folder, and execute is from here.
- Looks like to be discontinued with WSH.

A quick and simple solution, that works fine.

MSDN Library: HTML Applications

Windows Forms using PowerShell

Pro Contra
Single file application. Windows Forms is being replaced by WPF.
Recommended by Don Jones in compare to WPF using PowerShell. -

Office

Pro Contra
Excel has a nice analysis and a well-documented API (vba). Requires additional local installation with license.
Access has a nice and well documented GUI and data functionality. -
PowerPoint has a wide variety of graphical elements and functionality. -

This solution is ruled out due to the required additional installation at the client.

Might be a useful alternative due to the given functionality.

Web Application

Pro Contra
Central application ensures that every user runs on the same version. Requires an application server.
Requires a running network. -

This solution is ruled out as it requires more than a basic Windows workstation.

Single Page Application (SPA)

This solution has been tried with ADODB connection to SQLAdmin Inventory, but the security settings on the computer prevents access to data. The error message is

SCRIPT3716: Safety settings on this computer prohibit accessing a data source on another domain.

With domain is meant physical resource domain - not Active Directory domain. If a SPA is to be created it requires web data sources like JSON. This again requires a web server and rules out the SPA solution as it requires more that a Windows client.

The patterns and practices from SPA are used as inspiration to HTA (see above).

Windows Forms using C++

Pro Contra
Very fast. Harder to maintain.

This solution is ruled out as it requires more than a basic Windows workstation.

DirectX using C++

Pro Contra
Very fast. Hard to maintain.
Gamification of user interface. Requires more than a basic Windows client.

This is a very interesting solution. But it requires a completely different set of skills to develop and maintain.

I consider this as the Platinum (Rolls-Royce) solution...

Windows Presentation Foundation (WPF) using PowerShell

Pro Contra
Forms can be crafted in Visual Studio GUI In general hard to maintain in PowerShell compared to WinForms.

I got some nice forms in Sandbox, but it took a lot of code. This is then ruled out on maintainability.

Windows Presentation Foundation (WPF) using C#

Pro Contra
Single file application. -
Visual Studio all over. -

I do not have a lot of experience with Visual Studio, so this will be stalled by my lack of skills.

Windows Scripting Host (WSH)

Pro Contra
Known platform Obsolete platform.

SQL Server Reporting Services (SSRS)

Pro Contra
Central application ensures that every user runs on the same version. Requires an application server.
- Slow

This solution is ruled out as it is slow - and requires more than a Windows client.

SharePoint

Pro Contra
Central application ensures that every user runs on the same version. Requires an application server.
- Slow

This solution is ruled out as it is slow - and requires more than a Windows client.