Monthly Archives: April 2015

Custom Database Role for Horizon View Events Log

This post is based on something I am working on and since I found no other information on it, I had to figure it out. Now that I think I’ve got all the pieces in place, I’d like to share it too.

The request is simple, to avoid granting dbo rights to the database account. The task is to figure out the exact MS SQL database permissions required for View to operate the View Events database.

For View Composer, it’s simple as the Horizon View documentation already has a section on custom role for View Composer database access. If that is what you are looking for, it’s available here for Horizon 6.1.

For View Events, I believe the database operations are much simpler (compared to View Composer), and so it seems that a subset of the permissions (compared to View Composer) is required. True enough, I was right about this. Once I had the permissions in place, I was able to complete configuring the View Events database from the Horizon View admin portal. Otherwise, the operation will fail with an error.

The key permissions needed by the database account are the following

  • ALTER
  • CONNECT (typically already granted by default)
  • CREATE TABLE
  • CREATE VIEW
  • DELETE
  • EXECUTE
  • INSERT
  • SELECT
  • UPDATE

Below is an example, do make the necessary changes to suit your implementation.

Item Specification Remarks
Horizon View 6.1 this is what I tested with
MS SQL Server 2008 R2 this is what I tested with
SQL Database ViewEventsDB change as needed
SQL User Account viewuser change as needed
SQL Role role_ViewUser change as needed

Below is the SQL script that I used, do customise it with to suit your needs. Prior to running the script, you will need to first create the database. With the database created, you can then run the script to create the account, role and grant the rights.

USE [master]
GO
CREATE LOGIN [viewuser] WITH PASSWORD=N'YourPasswordHere',DEFAULT_DATABASE=ViewEventsDB, DEFAULT_LANGUAGE=us_english, CHECK_POLICY=OFF
GO

USE [ViewEventsDB]
CREATE USER [viewuser] for LOGIN [viewuser];
CREATE ROLE [role_ViewUser] AUTHORIZATION [dbo];
EXEC sp_addrolemember [role_ViewUser], [viewuser];
GO

use [ViewEventsDB]
GRANT CREATE TABLE TO [role_ViewUser]
GRANT CREATE VIEW TO [role_ViewUser]
GRANT DELETE TO [role_ViewUser]
GRANT EXECUTE TO [role_ViewUser]
GRANT INSERT TO [role_ViewUser]
GRANT SELECT TO [role_ViewUser]
GRANT UPDATE TO [role_ViewUser]
GRANT ALTER TO [role_ViewUser]
GO

Optimising Windows 8.1 Visual Effects

Optimisation Type [explain] : user experience (↓↑) / resource optimisation (↑) / functionality (-) / administration (-)

I have just been involved with a View deployment where the customer wants to use the latest and greatest Windows 8.1. It gave me a good opportunity to figure out the registry settings to optimise the Visual Effects for Windows 8.1.

Windows 8.1 Visual EffectsThe method to apply this is identical to how we would do it for Windows 7, and I have written about it here. So this post will just focus on what you need for Windows 8.1.

Comparing with Windows 7, there are a few more options in Windows 8.1, and one setting gone. If haven’t noticed, the task bar is different in Windows 8.1. The setting to “use visual styles on windows and buttons” is no longer available, as such we can turn everything off.

Initially, I tried to just “Adjust for best performance”, the settings would not take effect. I can see that the settings dialog box was reflecting the two registry changes, but the actual behavior did not change. Instead, I just went straight to set it as “Custom” and un-check all the boxes via the registry. Below is the full list of settings that I applied via GPO.

I’ve also noted this time that the DWORD values have to be set as Hexadecimal, and some of the values are of different type.


[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects]
(REG_DWORD;Hexadecimal) VisualFXSetting = 0x00000003

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
(REG_DWORD;Hexadecimal) IconsOnly = 0x00000001
(REG_DWORD;Hexadecimal) TaskbarAnimations = 0x00000000
(REG_DWORD;Hexadecimal) ListviewAlphaSelect = 0x00000000
(REG_DWORD;Hexadecimal) ListviewShadow = 0x00000000

[HKEY_CURRENT_USER\Control Panel\Desktop]
(REG_BINARY) UserPreferencesMask = 9012038010000000
(REG_SZ) DragFullWindows = 0
(REG_SZ) FontSmoothing = 0

[HKEY_CURRENT_USER\Control Panel\Desktop\WindowsMetrics]
(REG_String) MinAnimate = 0

[HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM]
(REG_DWORD;Hexadecimal) EnableAeroPeek = 0x0000000
(REG_DWORD;Hexadecimal) AlwaysHibernateThumbnails = 0x0000000