Posts

Showing posts from February, 2018

Redirecting all old url to home page or any other page in blogger using script

Image
Adding a 301 redirect for every url which has year older then the value we are setting in our script: So why this was needed ? Recently I found in google search console that lot of Page not found errors are triggering for my site and when I looked at the links it was clear that the errors are because the domain was owned by someone else before I got it and google crawlers were still trying to find posts and pages which were published by previous owner. Although there is a option to create a redirect for links in blogger dashboard but doing that for every single url each and every time was too much of work and also this was a blind game as we don't know for which url the error will trigger next until it was being logged in google search console: So here is quick summary for what I did followed by script and the Long explanations. Quick Summary: Get current Url user is visiting on my site>Extract Year part from it>If YearFromUrl(is less then)<YearIStartedWritingP

SQL Server SSMS Bug: Scripting Delete action to new query window for Maintenance plans is deleting the maintenance plans without even executing the script leaving jobs behind which throws errors during manual delete

Image
SQL Server version: Microsoft SQL Server 2014 (SP2) (KB3171021) - 12.0.5000.0 (X64) Tested using SSMS 17 and SSMS 12 Scripting Delete action to new query window for Maintenance plans is deleting the maintenance plans without actually executing the script: Steps to reproduce: Create a maintenance plan using maintenance plan wizard This creates maintenance plan under path : Server or Instance Name>Management>Maintenance Plans along with a corresponding job under Sql server agent when viewed from SSMS Now right click on the Maintenance plan that gets created from step 1 in location specified in step 2 above and click delete But instead of clicking OK use the script button on top of window and select "script action to new query window" and then click CANCEL in the same window from where we just selected script action. So we just scripted the action and haven't actually deleted the plan nor by clicking OK nor by executing the script that gets created in new w