Posts

Showing posts from March 26, 2023

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. Ø   The client machine and SQL Server

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

Telnet and Test-NetConnection (TNC) commands

  Telnet and Test-NetConnection (TNC) commands are used for network connectivity testing, but they have some key differences in how they work and what they can be used for:   Telnet Command: The Telnet command is an older, text-based protocol that allows you to establish a connection to a remote host or server over the network. It is often used to test the connectivity of a specific port on a remote server or device. Telnet can be used to check whether a specific port is open, to test network connectivity, or to establish a remote session on a server that supports Telnet. However, Telnet is not a secure protocol and should not be used for sensitive data transmission.   Test-NetConnection (TNC) Command: The Test-NetConnection command is a modern command-line tool that is included in Windows operating systems starting from Windows 8. It allows you to test network connectivity to a remote server or device and provides more detailed output than Telnet. It can be used to test th

Database is not synchronizing between the primary and secondary replicas in an Always On Availability Group

      If your database is not synchronizing between the primary and secondary replicas in an Always On Availability Group, there may be several reasons why this is happening. Here are some possible causes and solutions:   Check the replica synchronization state: First, check the status of the primary and secondary replicas to see if they are both online and healthy. You can do this by checking the replica state using the "sys.dm_hadr_database_replica_states" dynamic management view or by checking the Always On Dashboard in SQL Server Management Studio. If the replica synchronization state is not healthy or if there are synchronization issues, you can try to troubleshoot the issue by looking at the error messages or event logs.   Check the network connectivity: Always On Availability Groups require a reliable and fast network connection between the primary and secondary replicas. Make sure that there are no network connectivity issues or that there is no fire

GRACEFUL WAY OF USING INDEXES

Indexes are a special kind of lookup table that is used by the database search engine to speed up data retrieval from tables. Basically, an index is a pointer that points to the tuples of a table. Why are indexes used? Indexes help in faster data retrieval from databases. Basically, they speed up select queries and the WHERE clause. But at the same time, they degrade the performance of INSERT and UPDATE queries. Hence, we should be very careful while using indexes. Although indexes are intended to enhance a database's performance, there are times when they should be avoided. The following guidelines indicate when the use of an index should be reconsidered: Indexes should not be used on small tables. For example, if you have a small reference table with only a few rows, it's not necessary to add an index. In fact, adding an index may even slow down the queries since the database engine may spend more time searching through the index than scanning the table itself. Indexes should

DBCC OPTIMIZER_WHATIF

Image
  As a DBA, one of the common issues you may face is slow running queries or stored procedures. Sometimes, you may find that a query runs fine in production but is slow in development, even though production has more hardware resources compared to the Dev/QA servers. So how can you mimic the production environment in development without enhancing the hardware?   This is where the undocumented DBCC OPTIMIZER_WHATIF command comes in. Using this command, you can force your development SQL Server to think it has the same core-count and memory as production, for the purposes of plan-creation. It is important to note that, like all undocumented features, you should not try this in production.   Memory and core count affect plan choice, and it may be that lower memory or lower core-count can make a query run much quicker if the query optimizer happens to choose a “better” plan when resources are low. You can specify properties like Status, CPUs, and MemoryMBs using the following synta