Posts

Managing Version Store Space in SQL Server

  Managing Version Store Space in SQL Server   Introduction: SQL Server's version store is an important component of its concurrency control mechanism, used to store row versions generated by transactions that use the READ COMMITTED SNAPSHOT or SNAPSHOT isolation levels. However, if the version store runs out of space, it can lead to transaction failures and other issues that can affect the stability and performance of your SQL Server database. In this blog post, we will discuss how to manage version store space in SQL Server and ensure that your database remains stable and performing optimally.   Identifying Version Store Space Issues: The first step in managing version store space is to identify if there are any issues. You can use the sys.dm_tran_version_store_space_usage Dynamic Management View (DMV) to monitor the space usage of the version store and identify if it is running low on space. This DMV returns information about the amount of space reserved an...

Isolation level in SQL SERVER

  Ø   Isolation levels determine how a transaction interacts with other concurrent transactions accessing the same data. Ø   SQL Server has four isolation levels: Read Uncommitted, Read Committed, Repeatable Read, and Serializable. Ø   Each isolation level provides a different balance between data accuracy, consistency, concurrency, and performance. Ø   It's important to choose the right isolation level for your transactions based on your specific requirements and potential concurrency issues. Ø   You should carefully consider the trade-offs between data accuracy, consistency, concurrency, and performance when choosing an isolation level. Ø   SQL Server allows you to change the isolation level at any time during a transaction using the SET TRANSACTION ISOLATION LEVEL statement. Isolation Level Description Example Read Uncommitted Allows transactions to read data that has been modified by other...

WAIT_AT_LOW_PRIORITY Feature for DBCC SHRINKFILE in SQL Server 2022

DBCC SHRINKFILE and DBCC SHRINKDATABASE are two SQL Server commands that allow you to shrink the size of a database or data file. This can be helpful if you have large amounts of unused space in your database that you want to reclaim. However, shrinking a database or data file can also lead to concurrency issues, especially if there are long-running transactions in progress. In the past, when encountering blockings while shrinking a database or data file, the only solution was to stop the shrinking process manually and allow the transaction to continue. This was not ideal, as it could lead to extended downtime and user frustration. With the release of SQL Server 2022, Microsoft has introduced a new feature called WAIT_AT_LOW_PRIORITY, which addresses this issue. This feature is an additional option for DBCC SHRINKDATABASE and DBCC SHRINKFILE. When you use the WAIT_AT_LOW_PRIORITY option, if a new shrink operation cannot obtain the necessary locks due to a long-running query already in ...

Interview questions for Junior SQL server DBA.

  1.        What is SQL Server build? 2.        What are the system DBs available in SQL Server, and what is the significance of each DB? 3.        How will you troubleshoot a log file growth issue that is causing disk space issues? 4.        What are startup parameters? 5.        What are the DBCC commands you use regularly? 6.        What are the DMVs you know, and what is the purpose? 7.        How will you troubleshoot blocking? 8.        What is the difference between locking and blocking and deadlock? 9.        What is the tail log backup, and when will it be useful? 10.    How does SQL Server identify differential backups? 11.    How will you verify logins and users usin...

Microsoft documentation for SQL Server and its features

Image
  To view Microsoft documentation for SQL Server and its features, you can visit the following website: https://docs.microsoft.com/en-us/sql/sql-server/?view=sql-server-ver15 This website contains a wealth of information on SQL Server, including documentation on installation, configuration, administration, and development. It also provides information on the latest features and enhancements in each version of SQL Server. To find specific information on a particular feature or topic, you can use the search bar on the website or navigate through the different categories and sections. You can also find tutorials, videos, and other resources to help you learn more about SQL Server and its features. Overall, the Microsoft documentation website is a valuable resource for anyone working with SQL Server, whether you are a database administrator, developer, or data analyst.

Kerberos and NTLM authentication methods in SQL Server.

  Kerberos and NTLM authentication methods in SQL Server.   Kerberos Authentication: Kerberos is a network authentication protocol that is used to provide secure authentication between clients and servers in a Windows environment. In SQL Server, Kerberos authentication can be used to authenticate users without the need to provide a username and password each time they connect to the server. Kerberos authentication works by using a ticket-based authentication system . When a user logs into a Windows machine, their credentials are verified by the Domain Controller (DC) and a Kerberos ticket is issued. This ticket is then used to authenticate the user to other network resources, including SQL Server.   To use Kerberos authentication with SQL Server, the following requirements must be met:   Ø   The SQL Server instance must be running on a Windows Server operating system. Ø   The SQL Server service account must be a domain account. Ø   ...

Tech links

 https://www.sqlskills.com/blogs/paul/bug-log-file-growth-broken-for-multiples-of-4gb/ https://learn.microsoft.com/en-us/sql/connect/jdbc/troubleshooting-connectivity?view=sql-server-ver16 https://sqlbits.com/Sessions/Event14/Think_Inside_the_Box_Understanding_the_Query_Life_Cycle