Connect to SQL Server error fix

NavyaSri Vattikuti 0 Reputation points
2023-09-11T23:11:06.21+00:00

I am unable to connect to SQL Server via Microsoft SQL Server Management Studio. It shows the following error:

TITLE: Connect to Server

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-2-database-engine-error


ERROR LOG:

2023-09-10 20:48:53.32 Server      Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) 
	Sep 24 2019 13:48:23 
	Copyright (C) 2019 Microsoft Corporation
	Developer Edition (64-bit) on Windows 10 Home 10.0 <X64> (Build 22621: ) (Hypervisor)

2023-09-10 20:48:53.32 Server      UTC adjustment: -4:00
2023-09-10 20:48:53.32 Server      (c) Microsoft Corporation.
2023-09-10 20:48:53.32 Server      All rights reserved.
2023-09-10 20:48:53.32 Server      Server process ID is 5456.
2023-09-10 20:48:53.32 Server      System Manufacturer: 'HP', System Model: 'HP Laptop 17t-cn200'.
2023-09-10 20:48:53.32 Server      Authentication mode is WINDOWS-ONLY.
2023-09-10 20:48:53.32 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
2023-09-10 20:48:53.32 Server      The service account is 'NT Service\MSSQLSERVER'. This is an informational message; no user action is required.
2023-09-10 20:48:53.32 Server      Registry startup parameters: 
	 -d C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\master.mdf
	 -e C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG
	 -l C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
2023-09-10 20:48:53.32 Server      Command Line Startup Parameters:
	 -s "MSSQLSERVER"
	 -m "SqlSetup"
	 -Q
	 -q "SQL_Latin1_General_CP1_CI_AS"
	 -T 4022
	 -T 4010
	 -T 3659
	 -T 3610
	 -T 8015
2023-09-10 20:48:53.32 Server      SQL Server detected 1 sockets with 6 cores per socket and 12 logical processors per socket, 12 total logical processors; using 12 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2023-09-10 20:48:53.32 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2023-09-10 20:48:53.32 Server      Detected 16057 MB of RAM. This is an informational message; no user action is required.
2023-09-10 20:48:53.32 Server      Using conventional memory in the memory manager.
2023-09-10 20:48:53.32 Server      Page exclusion bitmap is enabled.
2023-09-10 20:48:53.46 Server      Buffer Pool: Allocating 2097152 bytes for 1378992 hashPages.
2023-09-10 20:48:53.47 Server      Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2023-09-10 20:48:53.49 Server      Buffer pool extension is already disabled. No action is necessary.
2023-09-10 20:48:53.50 Server      Perfmon counters for resource governor pools and groups failed to initialize and are disabled.
2023-09-10 20:48:53.51 Server      Query Store settings initialized with enabled = 1, 
2023-09-10 20:48:53.52 Server      The maximum number of dedicated administrator connections for this instance is '1'
2023-09-10 20:48:53.52 Server      This instance of SQL Server last reported using a process ID of 12416 at 9/10/2023 8:48:48 PM (local) 9/11/2023 12:48:48 AM (UTC). This is an informational message only; no user action is required.
2023-09-10 20:48:53.52 Server      Node configuration: node 0: CPU mask: 0x0000000000000fff:0 Active CPU mask: 0x0000000000000fff:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2023-09-10 20:48:53.52 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2023-09-10 20:48:53.53 Server      In-Memory OLTP initialized on standard machine.
2023-09-10 20:48:53.55 Server      [INFO] Created Extended Events session 'hkenginexesession'

2023-09-10 20:48:53.55 Server      Database Instant File Initialization: disabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
2023-09-10 20:48:53.55 Server      Total Log Writer threads: 2. This is an informational message; no user action is required.
2023-09-10 20:48:53.56 Server      Database Mirroring Transport is disabled in the endpoint configuration.
2023-09-10 20:48:53.56 Server      clwb is selected for pmem flush operation.
2023-09-10 20:48:53.56 spid9s      Warning ******************
2023-09-10 20:48:53.56 Server      Software Usage Metrics is disabled.
2023-09-10 20:48:53.56 spid9s      SQL Server started in single-user mode. This an informational message only. No user action is required.
2023-09-10 20:48:53.57 spid9s      Starting up database 'master'.
2023-09-10 20:48:53.58 spid9s      There have been 256 misaligned log IOs which required falling back to synchronous IO.  The current IO is on file C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\master.mdf.
2023-09-10 20:48:53.64 Server      CLR version v4.0.30319 loaded.
2023-09-10 20:48:53.72 Server      Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.

SQL Server Other
{count} votes

3 answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2023-09-12T04:53:29.4133333+00:00

    There have been 256 misaligned log IOs which required falling back to synchronous IO.

    A known issue with some SSD with don't work well together with some Windows versions, see

    https://techcommunity.microsoft.com/t5/running-sap-applications-on-the/message-misaligned-log-ios-which-required-falling-back-to/ba-p/367796


  2. yunus emre ISIK 181 Reputation points
    2023-09-12T05:16:17.56+00:00

    Please check these:

    1- Is your service is running? (configuration manager)

    2- Is TCP/IP enabled? (configuration manager, protocols). Enable it and restart the service

    3- Is your server's firewall active? if so shutdown the firewall or allow sql server port (1433)

    4- check your connection string


  3. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2023-09-12T21:32:40.2933333+00:00

    As Olaf says, the message about 256 misaligned reads is an issue with the combination of SQL Server and Windows 11. Microsoft has published an article with workarounds for the problem.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.