Posts

Getting Analysis Serivce Deployment Wizard running in TeamCity

Image
This process is tested with a tabular model on ssas 2014 and that you have the appropriate licences to use the software. First, ensure SSAS Deployment Wizard works on your local machine by installing appropriate prerequisits ssms and stuff (not listed here). Add deployment wizard to repo Microsoft.AnalysisServices.Deployment.exe Microsoft.AnalysisServices.Deployment.exe.config Microsoft.AnalysisServices.DeploymentEngine.dll  (exists in GAC only) Microsoft.AnalysisServices.DLL Microsoft.DataWarehouse.DLL Microsoft.DataWarehouse.Interfaces.DLL Microsoft.SqlServer.ConnectionInfo.dll Microsoft.SqlServer.Dmf.dll Microsoft.SqlServer.Management.Sdk.Sfc.dll Microsoft.SqlServer.Smo.dll Microsoft.SqlServer.SmoExtended.dll Microsoft.SqlServer.SqlEnum.dll Microsoft.SqlServer.SqlWmiManagement.dll Microsoft.SqlServer.WizardFramework.dll   (exists in GAC only) Possible locations for these are C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies C:\Program Files...

Solution: Display rotation stuck in windows and ctrl+alt+up key does not work (windows 10)

Problem : I accidentially pressed ctrl+alt+right key and my display rotation shifted 90 degrees. When I open Intel HD Graphics Control Panel (that caused this mess) to clear it, it says that it's in 0 degrees rotation mode, so I cannot change back. Pressing ctrl+alt+up key does not work either. Solution : Press start button or windows key, type display and enter windows own display settings. From here you can set your display back to landscape mode. Don't forget to disable hotkeys in Intel HD Graphics Control Panel.

Set gmail as default e-mail handler for mailto-links (Short answer)

Open Chrome Open Gmail in a tab Paste the following in the address bar of that tab javascript:navigator.registerProtocolHandler("mailto","https://mail.google.com/mail/?extsrc=mailto&url=%s","Gmail"); Click Allow

How capture screen on Samsung Galaxy S5 (short answer)

Press home button and power button at the same time and keep them pressed until you get sound/visual feedback.

How to benchmark my t-sql directly using dmv dm_exec_sessions

Tested on Sql Azure 11.0.9206.32 /* Get actual reads, writes and other nice to know stuff for benchmarking. Notice go statements which are crucial since stats seem to update by batch. */   go if   object_id ( 'tempdb..#stats' )   is   not   null   drop   table   #stats  select   getdate ( )   as   startTime , cpu_time , memory_usage , reads , writes , logical_reads , session_id   into   #stats   from   sys . dm_exec_sessions   a   where   session_id = @@spid go --do your magic stuff that need tuning go select      datediff ( ms , s2 . startTime , getdate ( ) )   as   ElapsedMs ,      s1 . cpu_time - s2 . cpu_time   as   cpu_time ,      s1 . memory_usage - s2 . memory_usage  ...

HierarchyId quick fun

--drop table dbo.Earth create   table   dbo . Earth    (      Id   hierarchyid   not   null ,      Path   as   Id . ToString ( ) ,      Data   varchar ( 500 ) ,      primary   key   clustered   ( id ) ) insert   dbo . Earth   ( id , data ) values    ( '/1/1/1/1/' , 'Monkey' ) ,    ( '/1/1/1/2/' , 'Horsey' ) ,    ( '/1/1/1/3/' , 'Piglet' ) ,    ( '/1/1/1/' , 'Mammal' ) ,    ( '/1/1/' , 'Animal' ) ,    ( '/1/1/2/' , 'Insect' ) ,    ( '/1/1/2/14/' , 'Ant' ) ,    ( '/1/2/' , 'Plant' ) ,    ( '/1/2/1/' , 'Tree' ) ,    ( '/1/2/1/1/' , 'Birch' ) ,    ( '/1/2/1/2/' , 'Oak' ) ,    ( '/1/' , 'Living stuff' ) ,    ( '/2/' , 'Moving stuff' ) ,    ( '/2/1/' , 'Cars' ) ,    ( ...

Zip all files in folder individually

This script will remove items after being zipped. Filename is appended .zip Create two files from code templates below then edit and execute zipfiles.cmd zipfiles.ps1 [CmdletBinding()] Param( [Parameter(Mandatory=$True,Position=1)] [string]$sourceFolderPath, [Parameter(Mandatory=$True,Position=2)] [string]$filePattern, [Parameter(Mandatory=$True,Position=3)] [string]$7zipExe ) $sourceFilePattern= $sourceFolderPath +"\" + $filepattern $files=get-childItem $sourceFilePattern $ErrorActionPreference = "Stop" if ($files) { foreach ($file in $files) { $zipFileName=$file.fullname+".zip" $programArgs = "a", "-tzip", $zipFileName , $file.fullname write-host $programArgs Invoke-Command -ScriptBlock { & $7zipExe $programArgs } remove-item $file } } zipfiles.cmd powershell -file .\zipfiles.ps1 "c:\FolderWithFiles\ManyTextFiles" "*.txt" "c:\progr...