Managing SQL Server Integration Services (SSIS) in complex, multi-server environments can present challenges, especially when it comes to credential delegation across multiple servers—a situation often referred to as the “double-hop” problem. In this post, we’ll explore how the SSISDB catalog handles delegation, the default behavior, and how to configure delegation to ensure your SSIS packages run smoothly across different servers.
Category: Automation
Archiving Old Transactions in SQL Server Using PowerShell
Archiving old or obsolete data is an effective strategy to maintain optimal performance. In this post, we’ll explore how to archive old transactions from a SQL Server database using PowerShell. We’ll walk through creating the necessary database and tables, populating them with sample data, executing a PowerShell script to automate the archiving process, and verifying the results.
Automating Database Restoration Between SQL Server Availability Groups Using PowerShell
In this post, I’ll walk you through a PowerShell script that automates the restoration of a database from one AG to another. The script handles everything—from performing a COPY-ONLY backup on the source AG to restoring the database on the target AG’s primary and secondary replicas, applying transaction logs, and rejoining the database to the new AG seamlessly.
Efficient Batch Insertion in SQL Server Using ADO.NET and C#
When dealing with large datasets, the efficiency of database operations becomes crucial. Inserting records one by one into a SQL Server database can be time-consuming and resource-intensive. Fortunately, ADO.NET provides a solution in the form of the SqlBulkCopy class. This tool allows for batch insertion of records, significantly improving performance and reducing overhead. In this post, we’ll explore how to use SqlBulkCopy in C# to efficiently insert large volumes of data into SQL Server.
Configuring Your SQL Server Instance via PowerShell
Managing a SQL Server instance can involve various tasks, including setting configuration options to optimize performance and resource usage. Using PowerShell to configure SQL Server instances can provide significant advantages, such as automation, consistency, and the ability to easily script and repeat tasks across multiple servers. This guide will walk you through a PowerShell script that connects to a local SQL Server instance, retrieves current configuration settings, updates these settings, and applies the changes.
Deploying SSIS Projects Using PowerShell: A Step-by-Step Tutorial
Deploying SQL Server Integration Services (SSIS) projects manually can be tedious and error-prone. Automating this process using PowerShell not only saves time but also ensures consistency across deployments. In this blog post, we will explore how to write a PowerShell script that automates the deployment of an SSIS project to the SSISDB catalog on a SQL Server. We will walk through the script step by step, explaining each part to help you understand how it works and why it’s done that way.
Using SQL Server .NET CLR Integration for Advanced Database Programming
Explore how to use SQL Server CLR Integration to enhance database functionality with .NET languages. This detailed guide covers enabling CLR, creating and deploying .NET assemblies, and executing CLR functions in SQL Server. Learn the benefits of using managed code for complex operations and accessing extensive .NET libraries, with a step-by-step example for practical implementation.
Taking Action with SQL Server Triggers: Automating Tasks for Efficiency
This post explores SQL Server triggers, a tool for automating database tasks. Learn how triggers can enforce data integrity, maintain referential integrity, and automate routine operations to enhance efficiency. The post includes practical examples and explains how to implement triggers to improve operational efficiency and compliance in database management. No previous experience with triggers is required to understand their benefits and applications.
Automated Database Health Checks: Leveraging SMO in PowerShell
Safeguard your databases with automated PowerShell scripts! This guide walks you through creating scripts to check critical database health metrics like size and free space. Learn how to connect to SQL Server and format results for clarity. The post also explores optional features for enhanced functionality.
Capturing SQL Server Inventory with PowerShell
Maintaining an accurate and comprehensive inventory of your SQL Server environment is crucial for effective database management, ensuring security, and meeting compliance requirements. With PowerShell, database administrators can automate the collection of detailed information about SQL Server instances and databases, streamlining the inventory process. This blog post introduces a PowerShell script designed to efficiently gather SQL Server inventory data, separating instance-level information from database-specific details into two distinct reports.