Categories
Azure DevOps Microsoft PowerShell

DevOps Deployment Group script stuck on “Connecting to the server.”

Scenario:
I’m adding a machine to a Deployment Group in DevOps, I copied the script from DevOps page and pasted in Windows PowerShell ISE that I’m running as Administrator in the target machine.

Run the script, it starts showing the steps until it stops (no errors shown) at the step

Connecting to the server.

Solution:
Run the script using Windows PowerShell (Run as Administrator) rather than using Windows PowerShell ISE

Did my solution solve your problem? Leave a reply.

Categories
Microsoft SQL Server

Script to rebuild or reorganize indexes in SQL databases

This link contains useful information and scripts to be used to rebuild or reorganize indexes in SQL databases.

Personally I found really useful the script at point D

https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-db-index-physical-stats-transact-sql?view=sql-server-2017

You can eventually comment adjust the following lines to prepare the scripts without run them

        --EXEC (@command);  
        --PRINT N'Executed: ' + @command;
        PRINT @command; 
        PRINT N'GO';

Did my post help you? Leave a reply.