Monday, January 08, 2018

Remove SQL 2012 performance dashboard

Microsoft in a recent update to SSMS put the Performance Dashboard directly into SSMS so you no longer need to manually install it on remote servers. Microsoft hasn't included a script to remove it, the easiest way to remove it is to manually edit the original script and rerun it

 Lucky for you I can save you 5 minutes of editing


USE [MSDB]
if OBJECTPROPERTY(object_id('MS_PerfDashboard.tblConfigValues'), 'IsUserTable') = 1drop table MS_PerfDashboard.tblConfigValuesgo
if object_id('MS_PerfDashboard.usp_CheckDependencies', 'P') is not null drop procedure MS_PerfDashboard.usp_CheckDependenciesgo
if not exists (select * from sys.schemas where name = 'MS_PerfDashboard') exec('create schema MS_PerfDashboard')go
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_WaitTypeCategory'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_WaitTypeCategorygo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_QueryTextFromHandle'), 'IsTableFunction') = 1 drop function MS_PerfDashboard.fn_QueryTextFromHandlego
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_hexstrtovarbin'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_hexstrtovarbingo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_DatediffMilliseconds'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_DatediffMillisecondsgo

if object_id('MS_PerfDashboard.usp_Main_GetCPUHistory', 'P') is not null drop procedure MS_PerfDashboard.usp_Main_GetCPUHistorygo

if object_id('MS_PerfDashboard.usp_Main_GetMiscInfo', 'P') is not null drop procedure MS_PerfDashboard.usp_Main_GetMiscInfogo
if object_id('MS_PerfDashboard.usp_Main_GetSessionInfo', 'P') is not null drop procedure MS_PerfDashboard.usp_Main_GetSessionInfogo
if object_id('MS_PerfDashboard.usp_Main_GetRequestInfo', 'P') is not null drop procedure MS_PerfDashboard.usp_Main_GetRequestInfogo
if object_id('MS_PerfDashboard.usp_Main_GetRequestWaits', 'P') is not null drop procedure MS_PerfDashboard.usp_Main_GetRequestWaitsgo
if object_id('MS_PerfDashboard.usp_GetPageDetails', 'P') is not null drop procedure MS_PerfDashboard.usp_GetPageDetailsgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.usp_GetPlanGuideDetails'), 'IsProcedure') = 1 drop procedure MS_PerfDashboard.usp_GetPlanGuideDetailsgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.usp_TransformShowplanXMLToTable'), 'IsProcedure') = 1 drop procedure MS_PerfDashboard.usp_TransformShowplanXMLToTablego
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildColumnReference'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildColumnReferencego
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildColumnReferenceList'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildColumnReferenceListgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildDefinedValuesList'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildDefinedValuesListgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildOrderBy'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildOrderBygo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildRowset'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildRowsetgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildScalarExpression'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildScalarExpressiongo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildScalarExpressionList'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildScalarExpressionListgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildScanRange'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildScanRangego
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildSeekPredicates'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildSeekPredicatesgo

if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildSeekPredicatesNew'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildSeekPredicatesNewgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildSeekPredicate'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildSeekPredicatego
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildObject'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildObjectgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanBuildWarnings'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanBuildWarningsgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatAssert'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatAssertgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatBitmap'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatBitmapgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatComputeScalar'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatComputeScalargo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatConcat'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatConcatgo

if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatCollapse'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatCollapsego
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatConstantScan'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatConstantScango
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatDeletedInsertedScan'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatDeletedInsertedScango
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatFilter'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatFiltergo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatHashMatch'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatHashMatchgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatMerge'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatMergego

if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatNestedLoops'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatNestedLoopsgo

if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatParallelism'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatParallelismgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatSimpleUpdate'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatSimpleUpdatego
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatRemoteQuery'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatRemoteQuerygo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatRemoteScan'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatRemoteScango
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatRemoteModify'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatRemoteModifygo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatSort'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatSortgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatSplit'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatSplitgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatStreamAggregate'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatStreamAggregatego
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatSegment'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatSegmentgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatSpool'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatSpoolgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatTableScan'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatTableScango
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatTop'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatTopgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatTVF'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatTVFgo

if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatUDX'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatUDXgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatUpdate'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatUpdatego
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatRIDLookup'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatRIDLookupgo
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanFormatGenericUpdate'), 'IsScalarFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanFormatGenericUpdatego
if OBJECTPROPERTY(object_id('MS_PerfDashboard.fn_ShowplanRowDetails'), 'IsTableFunction') = 1 drop function MS_PerfDashboard.fn_ShowplanRowDetailsgo
if object_id('MS_PerfDashboard.usp_DatabaseOverview', 'P') is not null drop procedure MS_PerfDashboard.usp_DatabaseOverviewgo

if object_id('MS_PerfDashboard.usp_LargeIOObjects', 'P') is not null drop procedure MS_PerfDashboard.usp_LargeIOObjectsgo
if object_id('MS_PerfDashboard.usp_DBFileIO', 'P') is not null drop procedure MS_PerfDashboard.usp_DBFileIOgo
if object_id('MS_PerfDashboard.usp_DmOsWaitStats', 'P') is not null drop procedure MS_PerfDashboard.usp_DmOsWaitStatsgo
if object_id('MS_PerfDashboard.usp_MissingIndexes', 'P') is not null drop procedure MS_PerfDashboard.usp_MissingIndexesgo

if object_id('MS_PerfDashboard.usp_QueryText', 'P') is not null drop procedure MS_PerfDashboard.usp_QueryTextgo
if object_id('MS_PerfDashboard.usp_MissingIndexStats', 'P') is not null drop procedure MS_PerfDashboard.usp_MissingIndexStatsgo
if object_id('MS_PerfDashboard.usp_QueryAttributes', 'P') is not null drop procedure MS_PerfDashboard.usp_QueryAttributesgo
if object_id('MS_PerfDashboard.usp_ShowplanAttributes', 'P') is not null drop procedure MS_PerfDashboard.usp_ShowplanAttributesgo
if object_id('MS_PerfDashboard.usp_PlanParameters', 'P') is not null drop procedure MS_PerfDashboard.usp_PlanParametersgo
if object_id('MS_PerfDashboard.usp_QueryStatsTopN', 'P') is not null drop procedure MS_PerfDashboard.usp_QueryStatsTopNgo
if object_id('MS_PerfDashboard.usp_QueryStatsTopN1', 'P') is not null drop procedure MS_PerfDashboard.usp_QueryStatsTopN1go
if object_id('MS_PerfDashboard.usp_QueryStatsRecentActivity', 'P') is not null drop procedure MS_PerfDashboard.usp_QueryStatsRecentActivitygo
if object_id('MS_PerfDashboard.usp_SessionRequestActivity', 'P') is not null drop procedure MS_PerfDashboard.usp_SessionRequestActivitygo
if object_id('MS_PerfDashboard.usp_RequestDetails', 'P') is not null drop procedure MS_PerfDashboard.usp_RequestDetailsgo
if object_id('MS_PerfDashboard.usp_SessionData', 'P') is not null drop procedure MS_PerfDashboard.usp_SessionDatago
if object_id('MS_PerfDashboard.usp_SessionRequests', 'P') is not null drop procedure MS_PerfDashboard.usp_SessionRequestsgo
if object_id('MS_PerfDashboard.usp_LastBatchForIdleSession', 'P') is not null drop procedure MS_PerfDashboard.usp_LastBatchForIdleSessiongo
if object_id('MS_PerfDashboard.usp_SessionDetails', 'P') is not null drop procedure MS_PerfDashboard.usp_SessionDetailsgo
if object_id('MS_PerfDashboard.usp_TraceEventColumns', 'P') is not null drop procedure MS_PerfDashboard.usp_TraceEventColumnsgo
if object_id('MS_PerfDashboard.usp_Blocking', 'P') is not null drop procedure MS_PerfDashboard.usp_Blockinggo
if object_id('MS_PerfDashboard.usp_RequestIoWaits', 'P') is not null drop procedure MS_PerfDashboard.usp_RequestIoWaitsgo
if object_id('MS_PerfDashboard.usp_LargestIoRequests', 'P') is not null drop procedure MS_PerfDashboard.usp_LargestIoRequestsgo
if object_id('MS_PerfDashboard.usp_RequestWaits', 'P') is not null drop procedure MS_PerfDashboard.usp_RequestWaitsgo
if object_id('MS_PerfDashboard.usp_LatchStats', 'P') is not null drop procedure MS_PerfDashboard.usp_LatchStatsgo
if object_id('MS_PerfDashboard.usp_RequestsWithLatchWaits', 'P') is not null drop procedure MS_PerfDashboard.usp_RequestsWithLatchWaitsgo
if object_id('MS_PerfDashboard.usp_XEventSessions', 'P') is not null drop procedure MS_PerfDashboard.usp_XEventSessionsgo
if object_id('MS_PerfDashboard.usp_QueryStatsDetails ', 'P') is not null drop procedure MS_PerfDashboard.usp_QueryStatsDetails go





If you find this article useful please leave me a comment.

Tuesday, January 02, 2018

Sky Viper v2450GPS quadcopter

PROs:

  • Small and light 
  • Works
  • Responsive 
  • Come home feature(untested at this time) 

Con's:
  • Inflight Video and pictures are blurry (camera has no gimble). 
  • In random situations, the flight throttle has locked on to 100% (lucky I was indoors and there was a roof). This has happened twice now. 
  • Android app crashes all the time
  • Video feed from drone to the phone is next to useless as it's choppy and lags behind quite a lot. (Pixel 2 XL


If you find this article useful please leave me a comment.

Friday, December 15, 2017

Pixel 2 XL - Screen goes black when making calls

Issue: 
Screen goes black once you press the dial button to make a call. You then have to lock and unlock the phone to be able to hang up.

Fix: 
Open Settings > Apps & Notifications > All Apps > Phone > Storage

Clear Cache
Clear Data

This fixed the issue for me (also big thanks to google support [shoutout to Paul.A])


If you find this article useful please leave me a comment.

Thursday, December 14, 2017

Pixel 2 XL screen flashing bright white on lock AKA the 'Pixel Flashbang'

After updating to OREO 8.1 my screen started flashing when I lock the phone (one really bright white flash) and then the ambient display kicks in. in a dark room, this is very noticeable.

Suspected issue:
I'd say it's almost a race condition when the screensaver is turned on. Kind of like the screen is being told to turn on and then the instructions on what to show are just slightly slower and therefore the screen assumes you want all pixels full brightness until the instructions for the ambient screen are sent through. BUT I'm not a Google engineer so don't take my word for it.

Workaround:
Turn off ambient display

Fix:
Wait for Google to patch this (send them lots of bug reports)

Notes: After disabling the ambient screen and rebooting, I then turned ambient display back on and now the issue isn't occurring anymore (more testing required)

If you find this article useful please leave me a comment.

Update:
It's now 24 hours later and the phone has started to flash white again on locking and sometimes when waking up It's now slightly random it will flash when the screen has to wake up. I am now even more sure that this is probably a software bug in the ambient display software.

Update2: 15/12/2017
I found that there is a software called 'Pixel Ambient Services' in the apps. I cleared the 'cache' and the 'data' from this app/service. Currently, my screen isn't flashing on lock or wake now. I will continue to monitor and report on the issue here.




Update 3: 18/12/2017

The issue is back again. I'm going to call this a 'Pixel Flashbang' from now on as that's what it's like at 6 AM in the morning when I wake up and look at my phone. Clearing the above app cache stops it for awhile but it comes back and the issue is now intermittent. 

Update 4: 20/12/2017

I chatted with Google support and they said that there is no known fix yet but engineers are looking into it.

Update 5: 03/01/2018

Still the same issue no matter which workaround is applied.

Rebooted in safe mode and still the same issue flashbangs on wake up of the screen.


Update 6: 05/01/2018 No update from Google about this. 

More info 
http://www.redmondpie.com/is-your-pixel-2-xl-screen-flashing-while-locking-unlocking-youre-not-alone/
http://www.androidpolice.com/2017/11/08/pixel-2-xl-screens-flashing-locking-unlocking/
https://9to5google.com/2017/11/08/google-pixel-2-xl-screen-flashing/





Friday, November 24, 2017

Amaysim Energy

I thought this might be a good deal until I saw the price fact sheet.

https://www.amaysim.com.au/energy/energy-price-fact-sheets/ausgrid/solar-2/2

My bills would go up around 30% if I took this offer. What a rip off.  TOU Peak, Shoulder, Off Peak, CL1, supply charges are all higher than what Red energy currently offer (best offer so far for me has been Energy Australia)

This is a great example of you don't do the sums you'll be worse off.


If you find this article useful please leave me a comment.

Tuesday, November 21, 2017

Pixel 2 XL - Boot loop issue

My wife's brand new Pixel 2 XL (2 weeks old) decided it would be really fun to get itself stuck in a boot loop. Wife looked down at phone to see it rebooting and thought that was odd. left it alone for an hour while stayed stuck on the 'G' boot screen with a scrolling progress bar.

About an hour later I got to look at it and talk to google support. they just advised to get into the recovery screen and try a 'shutdown'. This didn't fix the issue. Google then offered to replace the device saying there was a hardware issue.

I ended up resolving the issue before having to replace the phone. I had to wipe all the user data and do a factory reset from the recovery bootloader and this allowed the phone to boot correctly.

Total damage:
- Lost some photos and videos from that day
- Had to reload EVERYTHING again.
- Major pain in the ass.
- Confidence has been lost in this google product. Will this issue happen again?

If you find this article useful please leave me a comment.

Thursday, November 02, 2017

SQL Reporting Services (SSRS) prompting for credentials when using a service account

I found what might be a bug in SSRS when using a service account and a custom installation folder. I found that when loading report builder is would prompt for credentials trying to connect to the web service URL. doesn't matter what you put in, it wouldn't let me through.

Looking at the security logs would show that the authentication was successful but then looking at the application logs I could see an issue with  ASP.NET 4.0.30319.0 when trying to read the 'ReportService2010.asmx' file in the SSRS installation folder.

Turns out the service account was missing rights to 'read' files in the SSRS install directory. It couldn't read the folder or the files within the folder. 

If you find this article useful please leave me a comment.