SQL Server Blogs

AlwaysON

-> Disaster Recovery Using AlwaysON Availability Group – Scenario 1
-> Disaster Recovery Using AlwaysON Availability Group – Scenario 2
-> Configuring Read Only Routing List for AlwaysON Availability Group
-> Reporting Services using AlwaysON Availability Group
-> Difference between Readable Secondary setting Yes and Read Intent only
-> Moving all Availability Groups in the Event of a Single Availability Group Failover
-> AlwaysON – Login Synchronization across Replicas
-> AlwaysON – Working through Crashed Synchronous Secondary Replica
-> Creating Linked Server to a Multi-Subnet Availability Group Listener with ReadOnly routing
-> AlwaysON – How to disable Read-Only routing for an Availability Group
-> AlwaysON – Unable to access the ‘JB1’ database because no online secondary replicas are enabled for read-only access. (Microsoft SQL Server, Error: 982)
-> None of the IP addresses configured for the availability group listener can be hosted by the server ””
-> Always ON Availability group automatic failover to a particular node
-> Listener entry in sys.availability_group_listeners exists even after related Availability group is deleted
-> Finding Transaction latency in an Always on Synchronous replica
-> Application Timeout with Multi-subnet Always On Availability Group
-> Adding Transparent Data Encryption (TDE) Enabled User Database to Always On Availability Group
-> Database Backup and Maintenance job to use secondary replica on a SQL Instance with Always On Availability group
-> Availability Group – SQL Server Agent Job to run only on Always On Primary Replica
-> Script to get Always On Availability group failover time from SQL Server Error log
-> Generating Cluster.log for troubleshooting Always On Availability group failover
-> Always On – Event ID: 1135 – Cluster node ‘Node’ was removed from the active failover cluster membership
-> Designing High Availability and Disaster Recovery using SQL Server Standard Edition
-> Always On – Availability group not failing over automatically
-> Database Mirroring login attempt failed with error: ‘Connection handshake failed. An OS call failed: (8009030c) 0x8009030c.
-> Always ON – Availability group database is “Not Synchronizing”
-> Always ON – Failed to join database to Availability group
> A connection timeout has occurred while attempting to establish a connection to availability replica ‘Node3’ with id [322C3054-0352-4F45-A2C2-9328C354051F]. Either a networking or firewall issue exists, or the endpoint address provided for the replica is not the database mirroring endpoint of the host server instance.
-> Always ON Availability group in RESOLVING state
-> Always ON – The connection to the primary replica is not active. The command cannot be processed. (Microsoft SQL Server, Error: 35250)
-> Always ON – Growing LOG SEND QUEUE on Asynchronous replica
-> Please create a master key in the database or open the master key in the session before performing this operation.
-> Cannot open database ‘JBDB’ version 869. Upgrade the database to the latest version. (Microsoft SQL Server, Error: 946)
-> Replicated transactions are waiting for next Log backup or for mirroring partner to catch up
-> Always ON – Restoring Transaction Log backups to a lagging Always ON Secondary Replica
-> Always On Latency Report
-> Always On – SQL Server hosting availability group ‘JBAG’ did not receive a process event signal from the Windows Server Failover Cluster within the lease timeout period
-> Always On Availability Groups connection with secondary database terminated for primary database ‘JBREPL_SUB’ on the availability replica ‘JBSUB-DR’ with Replica ID: {6a9d0674-6dec-4810-b731-c9cde79cc62d}. This is an informational message only. No user action is required.
-> Always On – Modify Availability group Endpoint URL
-> This secondary replica is not connected to the primary replica. The connected state is DISCONNECTED
-> CREATE FILE encountered operating system error 3(The system cannot find the path specified.) while attempting to open or create the physical file ‘C:\SQL\JBDB1.ndf’
> DNS lookup failed with error: ‘11001(No such host is known.)’.
-> Always On Secondary Database in “Reverting \ In Recovery” state
-> Always On – One or more databases are not synchronized or have not joined the availability group. If the availability replica uses the asynchronous-commit mode, consider performing a forced manual failover (with possible data loss).
-> Always On: WSFC AG integrity check failed for AG ‘JBAG’ with error 41044, severity 16, state 1
-> The connection to the primary replica is not active. The command cannot be processed. (Microsoft SQL Server, Error: 35250)
-> The local availability replica of availability group ‘JBAG’ cannot accept signal ‘UNJOIN_DB’ in its current replica role
-> Zero RPO with Microsoft SQL Server
-> The target database (‘JBDB’) is in an availability group and is currently accessible for connections when the application intent is set to read only
-> Read-Only Select Queries Getting Blocked on Always On Secondary Database by REDO thread
-> Troubleshooting REDO queue or Recovery queue build-up on Always On Readable Secondary Replica due to Blocked REDO thread
-> Select Query on Secondary Replica getting blocked with wait type HADR_DATABASE_WAIT_FOR_TRANSITION_TO_VERSIONING
-> Failed to create availability group ‘JBSAG’. The operation encountered SQL Server error 41131 and has been rolled back. Check the SQL Server error log for more details. When the cause of the error has been resolved, retry CREATE AVAILABILITY GROUP command. (Microsoft SQL Server, Error: 41131)
-> Joining ‘DB’ to Availability Group Step Runs Indefinitely
-> Always On Availability Group Configuration on Azure IaaS Virtual Machine utilizing same subnet
-> Always On Availability Group Environment on Azure IaaS Virtual Machine Introduction – Part1
-> Configure appropriate Virtual Network and Subnet for Azure IaaS Virtual Machine – Part2
-> Deploy required Azure IaaS Virtual Machine – Part3
-> Configure Domain Controller and Windows Cluster on appropriate Azure IaaS Virtual Machine – Part4
-> Configure Azure Load Balancer – Part5
-> Configure Always On Availability Group with Listener – Part6
-> Joining ‘DB’ to Availability Group Step Runs Indefinitely
-> Failed to bring availability group ‘AG’ online. The operation timed out. If this is a Windows Server Failover Clustering (WSFC) availability group, verify that the local WSFC node is online. Then verify that the availability group resource exists in the WSFC cluster. If the problem persists, you might need to drop the availability group and create it again. (Microsoft SQL Server, Error: 41131)
-> Always On Availability Group Configuration on Azure IaaS Virtual Machine utilizing Multi Subnet
-> Always On Availability Group Environment on Azure IaaS Virtual Machine Introduction – Part1
-> Configure appropriate Virtual Network and Subnet for Azure IaaS Virtual Machine – Part2
-> Deploy required Azure IaaS Virtual Machine – Part3
-> Configure Domain Controller and Windows Cluster on appropriate Azure IaaS Virtual Machine – Part4
-> Configure Azure Load Balancer – Part5
-> Configure Always On Availability Group with Listener – Part6
-> Always ON – Max DOP for Secondary
-> Create failed for Availability Group Listener ‘JBApplication’. The Windows Server Failover Clustering (WSFC) resource control API returned error code 5057.
-> Auto close is enabled. Only databases with auto close disabled can be added to an availability group. To turn off auto close, set the Auto Close database property to False.
-> Unable to access availability database ‘JBSAG12’ because the database replica is not in the PRIMARY or SECONDARY role. Connections to an availability database is permitted only when the database replica is in the PRIMARY or SECONDARY role. Try the operation again later. (Microsoft SQL Server, Error: 983)
-> This secondary replica is not connected to the primary replica. The connected state is DISCONNECTED.
-> Always ON – Growing LOG SEND QUEUE on Synchronous replica
-> ALWAYS ON – Troubleshooting Availability Group Database Stuck in Initializing / In Recovery Mode
-> Always ON Availability group in RESOLVING state
-> SQL SERVER ALWAYS ON SERIES: AVAILABILITY GROUP DDL OPERATIONS ARE PERMITTED ONLY WHEN YOU ARE USING THE MASTER DATABASE

AlwaysON + Log Shipping

-> Configuring Log Shipping with AlwaysOn
->Error: The specified agent_id 1D58DD23-142C-498F-83AB-5077791B5781 or agent_type 1 do not form a valid pair for log shipping monitoring processing
-> Removing Log shipping on a database with AlwaysOn configured

Always Encrypted

Always Encrypted: Securing Your SQL Server Data for the Future

Azure

-> Creating a SQL database in Microsoft Azure portal
-> Restore on-Premise SQL server database to Azure SQL Database
-> Backup On-Premise SQL Server Database to Microsoft Azure
-> Why 4 Core is better than 1 Core IaaS Virtual machine with SQL Server in Azure
-> You must change your password before logging on the first time. Please update your password or contact your system administrator or technical support.
-> There is an active shared access signature outstanding for disk
-> Azure SQL database – Reset administrator password
-> Azure SQL Managed Instance, Azure database Health Check using Azure SQL Analytics
-> SQL Server IaaS Agent extension
-> Integrate Azure Active Directory with Active Directory in Azure Virtual Machine
-> Create a login in Azure Virtual Machine Active Directory and Sync it to Azure Active Directory
-> Connecting Azure SQL Database using Azure Active Directory – Password / Azure Active Directory – Universal with MFA
-> Login to Azure Virtual machine using Azure Active Directory credentials
-> SQL SERVER IAAS AGENT EXTENSION – “Security” tab not populated correctly
-> Connect to SQL Server with PowerShell and Azure key Vault
-> Start and Stop Azure Virtual Machine

Azure Managed Instance

-> My first Azure Managed instance
-> Connecting to Azure Managed instance from a virtual machine
-> Checking SQL Server errorlog in Azure Managed Instance
-> Trace Flags enabled in Azure Managed Instance
-> Is Trace Flag 1117 enabled in Azure Managed Instance?
-> Restore a database backup to an Azure Managed Instance
-> Physical_database_name column in sys.databases
-> Sp_configure on Managed instance
-> GETDATE() on Managed Instance
> Configure Transactional replication between two Azure SQL Managed Instances
-> Transactional Replication – Failed to connect to Azure Storage ” with OS error: 55
-> The process could not connect to Subscriber
-> Database backup on an Azure SQL Managed Instance
-> Restore a Copy_Only backup taken in an Azure SQL Managed Instance onto another Azure SQL Managed Instance
-> Enabling Transparent data encryption using Customer-managed key on Azure SQL Managed Instances that are part of failover group
-> Creating a Linked Server in Azure SQL Managed Instance to Azure SQL Database
-> Cannot connect to Azure SQL Managed Instance
-> MODIFY FILE failed for database ‘tempdb’, file id 1. Size of file (41435136 KB) is greater than MAXSIZE (26214400 KB). (Microsoft SQL Server, Error: 5040)

Azure SQL Database

-> The database ‘jbswiki’ has reached its size quota. Partition or delete data, drop indexes, or consult the documentation for possible resolutions.
-> The operation cannot be performed since the database ‘JBDB’ is in a replication relationship. (Microsoft SQL Server, Error: 40680)
-> The database ‘jbswiki’ has reached its size quota. Partition or delete data, drop indexes, or consult the documentation for possible resolutions

Azure Synapse Analytics

-> Restore dedicated SQL pools in Azure Synapse Analytics
-> Drop dedicated SQL pools in Azure Synapse Analytics

CORE

-> Hide Instance set to YES in SQL server Network Configuration
-> Server TCP provider failed to listen on [1519]. Tcp port is already in use.
-> Using certificates with SQL server
-> Logshipping metadata table log_shipping_monitor_secondary is not getting updated
-> Restore Database – Property BackupDirectory is not available for Settings ‘Microsoft.SqlServer.Management.Smo.Settings’
-> RESTORE detected an error on page (0:0) in database “Database” as read from the backup set.
-> Error: 18456, Severity: 14, State: 5. Login failed for user ‘NT AUTHORITY\ANONYMOUS LOGON’. Reason: Could not find a login matching the name provided.
-> MYSQL Linked server in SQL Server
-> Removing IAM page %S_PGID failed because someone else is using the object that this IAM page belongs to
-> A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)
-> Resizing SQL Server Database from single data file to multiple Data file
-> Rule “Valid DSN” and Rule “Valid Database compatibility level and successful connection” failed.
-> A transport-level error has occurred when receiving results from the server
-> Log Shipping – Copy and Restore job failing with no error message
-> Restore database backup that contains column encrypted objects
-> Reason: Server is in single user mode. Only one administrator can connect at this time.
-> SQL Server Configuration Manager missing
-> Error: 17204, Severity: 16, State: 1 – FCB::Open failed: Could not open file for file number 2. OS error: 3(The system cannot find the path specified.)
-> Dedicated Admin Connection (DAC) – The Good Samaritan
-> Disabling Deprecated feature sp_configure Remote access
-> Maximizing Efficiency: How SQL Server’s Accelerated Database Recovery Can Improve Your Workflow
-> Introduction to SQL Server 2022: What’s New and Exciting
-> FILESTREAM FEATURE IS DISABLED
->MODIFY FILE FAILED FOR DATABASE ‘TEMPDB’, FILE ID 1. SIZE OF FILE (41435136 KB) IS GREATER THAN MAXSIZE (26214400 KB). (MICROSOFT SQL SERVER, ERROR: 5040)
-> UNDERSTANDING QUERY STORE DATA RETENTION IN SQL SERVER

DATABASE CORRUPTION

-> SQL Server Database Corruption – File Header Page Corruption
-> Database Corruption – Repairing a SQL Server database without LDF or Log file

ENCRYPTION

-> Restoring a Transparent Data Encryption (TDE) Enabled User Database on a SQL Server Instance with a different master key
-> Remove Transparent Data Encryption (TDE)

LINUX

-> SQL Server 2019 on Ubuntu Linux
-> SQL Server 2019 on Redhat Linux
-> SQL Server 2019 on Linux Containers

PERFORMANCE

-> SQL Server Query Optimization – Introduction
-> SQL Server Parameter Sniffing
-> @@FETCH_STATUS -9
-> What DBCC SHOW_STATISTICS tells me
-> Install and Configure PSSDIAG
-> Install and Configure SQLNexus
-> Trace Flag 7471
-> Tempdb contention
-> Optimize for ad hoc workloads
-> Column data may be deleted when you update another variable-length column in a table of a database upgraded from SQL Server 2005
-> Why Bookmark Lookup is BAD?

-> Optimizing Queries using XML in SQL Server
-> Slow query performance with Table Spool operator
-> Forcing a query to perform Table Scan on a heap table
-> SQL SERVER – Index Hints – Force Index – Query Hints
-> Elevating SQL Server performance with In-Memory OLTP table variables

POWER BI

-> Power BI – Could not find file ‘C:\temp\AdventureWorks_Territories.csv’.
-> Power BI – Change data source dynamically when opening Power BI report
-> Power BI – Value should be a Currency
-> Power BI – The key didn’t match any rows in the table

REPLICATION
-> Cannot insert an explicit value into a timestamp column. Use INSERT with a column list to exclude the timestamp column, or insert a DEFAULT into the timestamp column.
-> Finding Undistributed commands in Transactional replication
-> Exception Message: The snapshot could not be generated because the publisher is inactive
-> Agent message code 21021. The subscription does not exist.
-> Configuring Transactional replication using Initialize from LSN
-> Cannot execute as the database principal because the principal “dbo” does not exist, this type of principal cannot be impersonated, or you do not have permission
-> The subscription does not exist
-> Transactional replication – Administering distribution database size
-> Cannot execute as the database principal because the principal “dbo” does not exist, this type of principal cannot be impersonated, or you do not have permission. (Source: MSSQLServer, Error number: 15517)
-> PROACTIVELY MANAGING TRANSACTIONAL REPLICATION LATENCY WITH SQL SERVER
-> Understanding and Resolving Replication Error 20598 in SQL Server

SERVICE BROKER

-> DBCC Shrinkfile executes forever
-> Conversations with State Disconnected_inbound piling up in Sys.Conversation_Endpoint

SETUP

-> Database ‘model’ cannot be opened. It is in the middle of a restore.
-> SQL resources not coming online after patching
-> The database owner SID recorded in the master database differs from the database owner SID recorded in database ‘msdb’. You should correct this situation by resetting the owner of database ‘msdb’ using the ALTER AUTHORIZATION statement.

-> SQL services fails after applying service pack
-> Error 1311.Source file not found: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Update Cache\KB4018073\ServicePack\redist\VisualStudioShell\VC10SP1\vc_red.msi. Verify that the file exists and that you can access it.
-> VS Shell installation has failed with exit code 1638
-> SQL Server Setup – Could not allocate space for object ‘dbo.Large Object Storage System object: 422212467425280’ in database ‘tempdb’ because the ‘PRIMARY’ filegroup is full
-> The User Data directory in the registry is not valid. Verify DefaultData key under the instance hive points to a valid directory.
-> The Instance ID ‘MSSQLSERVER’ is already in use by SQL Server instance ‘MSSQLSERVER.INACTIVE’
-> Common language runtime (CLR) execution is not supported under lightweight pooling
-> The query has been canceled because the estimated cost of this query (37) exceeds the configured threshold of 30. Contact the system administrator.
-> Replication components are not installed on this server. Run SQL Server Setup again and select the option to install replication. (Microsoft SQL Server, Error: 21028)
-> syntax error ( *EngineEdition != 11) (Microsoft.SqlServer.Management.Sdk.Sfc)
-> SQL Server 2022 In-Place Upgrade fails with message install the .NET Framework 2.0 or 4.0

SQL Server 2022

-> Introduction to SQL Server 2022: What’s New and Exciting
-> Elevate Your Database Performance: Introducing SQL Server 2022 Enhancements
-> SQL Server 2022: Boosting Performance, Security, and Analytics to the Next Level

SSIS

-> Creating DTSX files from existing SQL Services Integration packages

SSRS

-> SQL Server Reporting Services Encryption Key Backup
-> SQL Server Reporting Services – The value for UrlRoot in RSReportServer.config is not valid. The default value will be used instead.

STRETCH DATABASE

-> Stretch Database in SQL Server 2016
-> Adding a table to the stretch database
-> Disabling Stretch Database
-> Stretch database – Modifying the filter function

TSQL & Powershell

-> Query To get Table Statistics Details
-> TSQL to query commandlog table to check Alter Index duration
-> Script to list size of all tables in a SQL Server database
-> TSQL Queries related to Database Backup and Restore
-> TSQL query to find Enterprise features availability in a SQL Server Instance
-> Identifying databases that are no longer used
-> Archival Report – Getting before and after row count post data archival
-> Execute job step if a job is not running
-> Restore PRIMARY Filegroup only on a database using full backup
-> Viewing Allocation Unit Size of a NTFS Disk
-> Create HTML from TSQL / SQL Server Queries
-> Finding a table name from a page ID
-> Ensuring Always On: A Guide to Verifying Availability Replica Connections with T-SQL 🚀
-> Nurturing the Heartbeat: A Comprehensive Guide to Always On Availability Group Health Checks with T-SQL
-> Performing Always On Availability Group Health Check for a Single Database
-> Exploring Always On Availability Replica Details and Database Health
-> Identifying Login Permissions on Always On Endpoint with T-SQL
-> UNVEILING QUERY PERFORMANCE INSIGHTS: LEVERAGING T-SQL WITH SQL SERVER QUERY STORE
-> QUERYING CONNECT PERMISSIONS ON ENDPOINTS IN SQL SERVER