BMI calculator in Azure notebook

Link to Jupyter notebook : https://notebooks.azure.com/library/bmicalculator  Link to BMI Calculator: https://notebooks.azure.com/library/bmicalculator/view/BMI%20Calculator.ipynb

0

Workaround: ‘sqlps’ and "Test-Path" PowerShell cmdlet on a UNC path

Related Forum thread: http://social.msdn.microsoft.com/Forums/en-US/sqlsmoanddmo/thread/719ede23-9f1a-43f5-8c4e-8188fea0b19f/ Related Connect feedback: https://connect.microsoft.com/SQLServer/feedback/details/768743/sql-server-2012-import-module-sqlps-breaks-the-test-path-powershell-cmdlet Issue:When Test-Path cmdlet is run in SQL Powershell from the context of SQL Powershell provider path, Test-Path returns False. We see the same behavior with Registry Window Powershell provider as well Workaround:Specify literal path while using Test-Path cmdletExample:test-path -literalpath “FileSystem::\\machine\uncpath” References:http://mcpmag.com/articles/2011/05/16/handling-errors-scripts-test-path.aspxhttp://msdn.microsoft.com/en-us/library/windows/desktop/ee126188(v=vs.85).aspx

1

Powershell script to run query against many servers and send combined output as email

Sample code to run query against multiple SQL Servers and export the combined output to Excel. This generated excel file is later sent as email attachment using hotmail. Related email thread: http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/987d48c0-a82d-4424-8699-cdd0b2bc9c51   http://sethusrinivasan.wordpress.com/2012/01/11/powershell-script-to-run-query-against-many-servers-and-send-combined-output-as-email/   This posting is provided “AS IS” with no warranties, and confers no rights. Use of included script samples are subject…

1

Gathering list of databases names from multiple SQL Servers

# serverList.txt has name of fully qualified sql instance ( one per line) # Example entries: # server1 # server1\instance1   $instanceNameList = Get-Content C:\ServerList.txt   foreach($instanceName in $instanceNameList) { $results += Invoke-Sqlcmd -Query “select SERVERPROPERTY(‘ServerName’) As ServerName, Name, crdate from sysdatabases” -ServerInstance $instanceName.Name }   # print results $results   # This posting is…

0

Auditing SQL Agent job creation and deletion

SQL Agent jobs are added / removed using stored procedure interface sp_add_job and sp_delete_job. Customers have asked us how we could track user who has created a job / deleted a specific job. You could accomplish this using SQL Server Auditing feature. You can turn on Auditing to track and log stored procedure execution requests…

0

Starting Jobs in Powershell using Job Name

http://blogs.msdn.com/b/sqlagent/archive/2010/12/29/starting-jobs-in-powershell-using-job-name.aspx  This posting is provided “AS IS” with no warranties, and confers no rights. Use of included script samples are subject to the terms specified athttp://www.microsoft.com/info/cpyright.htm

0

Scheduled Policy Evaluation on multiple servers using MSX/ TSX in SQL Agent

One of our customer was looking for ways to schedule a policy evaluation on multiple servers using their existing MSX/TSX infrastructure.  I thought it would be better to blog an article that could help others looking for similar information http://blogs.msdn.com/b/sqlagent/archive/2010/11/19/scheduled-policy-evaluation-on-multiple-servers-using-msx-tsx-in-sql-agent.aspx  This posting is provided “AS IS” with no warranties, and confers no rights. Use of included…

0