I have a newly installed Sql Server 2012 set up for testing a Self Service BI concept. This means that the server is running a SQL relational instance and an Analysis Server Tabular instance. Today I added a new Analysis Server instance for running our old OLAP cube for good measure (literally) as well.
To my surprise trying to process the OLAP cube resulted in the above error. Apparently OLAP-mode is still based on the old native ADO provider from 2008R2 – but this doesn’t seem to get installed automatically…
The article here by André Van de Graaf has some information on handling this error in Excel/PowerPivot 2010, and on the Microsoft Office Project Support Weblog a guy named Martin Smith had an article – the link is now dead, so I used Google cache – the title of which was “New SQL Server–and some different cube building errors”, that also discusses the problem.
The solution, as far as I could work out, was to download and install the 2008R2 provider – the link to the the x64 version is here courtesy of the above mentioned posts.
It’s hard to tell if this is a general problem with SQL Server Analysis Services 2012 or just my particular configuration. It seemed odd that so little information was google’able, but in any case installing the old provider is a way to circumvent the issue that works for me so it might be for you too.
At work we use Trend Antivirus, but unfortunately it is set up by the company default installation process to run automatically Wednesday morning at “normal” processing priority. This has a very adverse effect on the performance of my computer…
I have hitherto changed the processing priority of this task manually, but decided to look into whether it could be changed by means of a PowerShell script that could be run automatically at boot time. To my aid came this article by The Scripting Guy, and here is my adapted code:
# 2013-07-25/PEH Change processing priority of a program/service
# Priority values:
# 64 (0×40) Idle
# 16384 (0×4000) Below Normal
# 32 (0×20) Normal
# 32768 (0×8000) Above Normal
# 128 (0×80) High Priority
# 256 (0×100) Real Time
$processname = “NTRTscan.exe”
$process_old = Get-WmiObject win32_process -f “name=’$processname’“
$process_old.SetPriority(64) | out-null
$process_new = Get-WmiObject win32_process -f “name=’$processname‘”
Write-Host Changed processing priority for $processname from $process_old.Priority to $process_new.Priority
Ps. If anyone has an easy-to-use solution to pasting syntax-colored Powershell from (preferably) ISE into Live Writer please let me know!
Transformations of XML-configuration files in the same way as Visual Studio might be helpful in Powershell, for instance as part of a Continuous Deployment scenario – Octopus Deploy is our weapon of choice for that. There are various solutions around, but I wanted to make mine simple, so I basically refactored a very lightweight C# solution by Eric Hexter based off the Microsoft.Web.XmlTransform.dll. That solution lives here at Github.
My essential Powershell XDT transformer looks like this:
# Transform with XDT
$scriptPath = (Split-Path -Parent $MyInvocation.MyCommand.Definition) + "\" # Script Directory
$src = $scriptPath + "input.config"
$xdt = $scriptPath + "transform.config"
$dst = $scriptPath + "output.config"
Add-Type -Path "c:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.XmlTransform.dll"
$doc = New-Object Microsoft.Web.XmlTransform.XmlTransformableDocument
$doc.PreserveWhiteSpace = $true
$trn = New-Object Microsoft.Web.XmlTransform.XmlTransformation($xdt)
Write-Output "Output file: $dst"
throw "Transformation terminated with status False"
I am still asking myself whether this kind of code ought to be in a custom C# based CmdLet module, callable by Powershell, at least as long as Powershell lives such a strange life outside Visual Studio – but the jury is still out on that…
It is quite amazing to see how much power is hidden inside the Windows RT operating system if you just go looking for it. Where the iPad iOS is basically a phone with a large screen, the Windows Surface and its brethren have so more to offer as a scaled down PC. You may never want this or need it, but if you do, it’s there.
More useful is the fact that Powershell is supported. But when you try to run a script file, the classic Powershell message that comes up:
File C:\users\peh\documents\test.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details.
On an ordinary PC you would then usually use the command Set-ExecutionPolicy RemoteSigned
If you do this on Windows RT, however, it will throw this message at you:
Set-ExecutionPolicy : Access to the registry key 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied.
It took me a while to google an answer to this, but what helped me was this great post by Jeroen W. Pluimers.
The answer from Jeroen is to use a variation of the Set-ExecutionPolicy that only covers the current user – remember that, as opposed to iOS, the WinRT OS has the concept of user-based security:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
After hearing a great talk by Mads Kristensen yesterday at DDC13 – the Danish Developers Conference – I wanted to play around with some optimization and turn on HTTP compression in order to se the results of my pages in Yahoo Yslow or Google Pagespeed.
Using the <urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" /> web.config parameters I got no results, so I went to the IIS Manager to find this message on the compression settings page:
This is a well hidden feature, but I finally found it via the Control Panel, Turn Windows features on or off:
I have just spent a quite some time trying to figure out why a .Net program I wrote to e-mail users some batch-generated reports would work on my box and not on the users’ machines. Lots of googling turned up exactly nothing, although others must have experienced the same thing.
The basic program has worked fine for a long time mailing a single PDF report, but now I wanted to add some additional HTML files as attachments. This resulted in the following message on the user PC’s:
Mailbox unavailable. The server response was: 5.6.0 Invalid header found (see RFC2822 section 3.6)
What I discovered is that the System.Net.Mail.MailMessage component happily submits .pdf files, .zip files, .txt files and probably a host of others – it’s apparently just .htm and .html files it that makes it (or the mail server?) unhappy!
So what was different? Well, it was the framework. As soon as a user PC hitherto running .Net 4.0 got the latest and greatest .Net Framework 4.5 installed everything was honky-dory and mails flew out over the wire.
Was this a feature or a flaw? Or was it the combination with a fairly restrictive mail-server? Hard to say – but at least my code is now working and I can get on with my life…
“Denmark is to small a language area to have a national ballet” a danish right wing politician once said.
Unfortunately it is also too small a language area for Microsoft to sell and support the Surface here yet, so I’ve had to import one from Germany. However this means that there is no Danish touch cover keyboard, and working with a German or English keyboard is not really worth the price.
Fortunately one of my bright colleagues had the brilliant idea to just plug in a USB keyboard (remember that the Surface has USB as opposed to the iPad), and lo and behold – tiles lit up with the arrow keys… It seems to run perfectly and a mousepointer even comes up when attaching a keyboard with a built-in trackpad! Touch is also active at the same time. So as an interim measure I’ll just get a small wireless keyboard/mouse combo and I can use my Surface as a perfect writing tool whenever I need to. The built-in Surface stand also shows its worth here…
That is sooo nice!