powershell
15 TopicsInvoke-Sqlcmd with Azure Automation for Azure SQL database
In this blog article, we will be illustrating the required steps to use Invoke-Sqlcmd against an Azure SQL database from Azure Automation. We have received a few cases where customers would like to automate a specific script to be executed on their Azure SQL database like select, update, insert or delete.21KViews3likes2CommentsAzure SQL Database Token-based authentication with PowerShell
First published on MSDN on Oct 26, 2018 How to connect to Azure SQL Database using token-based authentication in PowerShell native appsThis guide assumes you already have a deployment of an Azure SQL Database, your PowerShell environment configured and you have an app registration for a native app in Azure Active Directory.16KViews0likes1CommentRestore database across servers(Azure SQL Database and Azure SQL managed instance)- Azure Automation
In this article, we consider the scenario where customers would like to restore their Azure SQL database and managed database from one Azure SQL server to another Azure SQL server, for example for development reasons. The article will provide you with the steps to achieve this by automating the job using Azure Automation13KViews5likes5CommentsHow to create a native PowerShell app registration to connect to Azure SQL DB
First published on MSDN on Oct 30, 2018 How to create a native app registrationThis guide assumes that you already own an Azure Subscription, an Azure Active Directory properly setup and your PowerShell environment properly set for running scripts.6.6KViews0likes0CommentsExport Azure SQL Database to local path
First published on MSDN on Mar 25, 2018 We noticed a few requests come to our support queue asking for a feasibility to export Azure SQL Database to local path directly, so following steps below to build PowerShell script that can do that job to copy Azure SQL Database to another db for consistency, then export Azure SQL Database to blob storage, later connect to a single or all storage container and download blob files locally:First you need to save your Azure login credential to be able to use saved profile credential later to automate login to Azure subscription, to do so, please follow below steps: Open Windows PowerShell ISE Copy/past below command # Setup – First login manually per previous section Add-AzureRmAccount# Now save your context locally (Force will overwrite if there)$path = "C:\Azure\PS\ProfileContext1.3.5KViews0likes0CommentsLesson Learned #402:Automated Monitoring of Table Growth in SQL Databases Using PowerShell
Uncontrolled table growth in a SQL database can have a significant impact on system performance and efficiency. It is crucial for database administrators to monitor and detect significant changes in table size and row count to take timely corrective actions. In this article, we will introduce a PowerShell script that automates the process of monitoring table growth and provides alert notifications when predefined thresholds are exceeded.2.9KViews0likes0Comments