locked
SQL express 2017 : provider: Shared Memory Provider, error: 40 - Impossibile aprire una connessione a SQL Server) (Microsoft SQL Server, errore: 2 RRS feed

  • Question

  • Good morning
    I racked up a database based on SQL Express 2014 on SQL Express 2017.
    The first 2/3 days all OK, after a temporary disconnection of the disk where the MDF file is saved, the following message appears at the connection:
    A network or instance-specific error occurred while trying to establish a connection with SQL Server. The server was not found or is not accessible. Verify that the instance name is correct and that SQL Server is configured to allow dial-up connections. (provider: Shared Memory provider, Error: 40-Unable to open a connection to SQL Server) (Microsoft SQL Server, error: 2)
    I managed to display the data of the file MBF, and these are still intact (files from 100MB)
    Unfortunately are not very practical SQL services, there is the ability to restart the service, or recover by transferring them to another service (at this time operating)
    Thanks for the collaboration Fulvio

    Monday, June 11, 2018 9:01 PM

All replies

  • Hi Fulvio,

    To troubleshoot your issue, I would first suggest you to go to check your SQL Server error log under the path like: Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\Log\ERRORLOG or check the Windows Event Log: Go to Run > eventvwr.msc > Click Ok > Windows event log opens to find more detailed error message. Also if it is possible, please share us your error log. It'll help us more to understand your actual situation.

    Then for the general SQL Server connection error, please refer to following articles to make some check:

    Troubleshoot Connecting to the SQL Server Database Engine 

    SSMS Error: "A network-related or instance-specific error occurred while establishing a connection to SQL Server"

    Thanks,
    Xi Jin.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 12, 2018 7:34 AM
  • Thanks a lot for the collaboration the file Rrroe that I find is the following, I hope it can give some additional indication

    2018-05-17 23:08:42.53 Server      Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64)
     Aug 22 2017 17:04:49
     Copyright (C) 2017 Microsoft Corporation
     Express Edition (64-bit) on Windows 10 Pro 10.0 <X64> (Build 17134: )
    2018-05-17 23:08:42.53 Server      UTC adjustment: 2:00
    2018-05-17 23:08:42.53 Server      (c) Microsoft Corporation.
    2018-05-17 23:08:42.53 Server      All rights reserved.
    2018-05-17 23:08:42.53 Server      Server process ID is 5324.
    2018-05-17 23:08:42.53 Server      System Manufacturer: 'System manufacturer', System Model: 'System Product Name'.
    2018-05-17 23:08:42.53 Server      Authentication mode is WINDOWS-ONLY.
    2018-05-17 23:08:42.54 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Log\ERRORLOG'.
    2018-05-17 23:08:42.54 Server      The service account is 'NT Service\MSSQLSERVER'. This is an informational message; no user action is required.
    2018-05-17 23:08:42.54 Server      Registry startup parameters:
      -d C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\master.mdf
      -e C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\Log\ERRORLOG
      -l C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER\MSSQL\DATA\mastlog.ldf
    2018-05-17 23:08:42.54 Server      Command Line Startup Parameters:
      -s "MSSQLSERVER"
    2018-05-17 23:08:42.56 Server      SQL Server detected 1 sockets with 4 cores per socket and 8 logical processors per socket, 8 total logical processors; using 8 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
    2018-05-17 23:08:42.56 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2018-05-17 23:08:42.56 Server      Detected 16339 MB of RAM. This is an informational message; no user action is required.
    2018-05-17 23:08:42.56 Server      Using conventional memory in the memory manager.
    2018-05-17 23:08:42.64 Server      Errore: 8317, gravità: 16, stato: 1.
    2018-05-17 23:08:42.64 Server      Cannot query value 'First Counter' associated with registry key 'HKLM\SYSTEM\CurrentControlSet\Services\MSSQLSERVER\Performance'. SQL Server performance counters are disabled.
    2018-05-17 23:08:42.70 Server      Default collation: Latin1_General_CI_AS (Italiano 1040)
    2018-05-17 23:08:42.91 Server      Buffer pool extension is already disabled. No action is necessary.
    2018-05-17 23:08:43.18 Server      Perfmon counters for resource governor pools and groups failed to initialize and are disabled.
    2018-05-17 23:08:43.22 Server      InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
    2018-05-17 23:08:43.22 Server      Implied authentication manager initialization failed. Implied authentication will be disabled.
    2018-05-17 23:08:43.32 Server      The maximum number of dedicated administrator connections for this instance is '1'
    2018-05-17 23:08:43.33 Server      This instance of SQL Server last reported using a process ID of 5556 at 17/05/2018 23:07:59 (local) 17/05/2018 21:07:59 (UTC). This is an informational message only; no user action is required.
    2018-05-17 23:08:43.33 Server      Node configuration: node 0: CPU mask: 0x00000000000000ff:0 Active CPU mask: 0x00000000000000ff:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
    2018-05-17 23:08:43.34 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.
    2018-05-17 23:08:43.36 Server      In-Memory OLTP initialized on standard machine.
    2018-05-17 23:08:43.41 Server      Database Instant File Initialization: abilitato. 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.
    2018-05-17 23:08:43.42 Server      Query Store settings initialized with enabled = 1,
    2018-05-17 23:08:43.43 Server      Software Usage Metrics is disabled.
    2018-05-17 23:08:43.51 spid6s      Starting up database 'master'.
    2018-05-17 23:08:43.59 Server      CLR version v4.0.30319 loaded.
    2018-05-17 23:08:43.89 spid6s      SQL Server Audit is starting the audits. This is an informational message. No user action is required.
    2018-05-17 23:08:43.89 spid6s      SQL Server Audit has started the audits. This is an informational message. No user action is required.
    2018-05-17 23:08:43.90 Server      Common language runtime (CLR) functionality initialized using CLR version v4.0.30319 from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\.
    2018-05-17 23:08:44.03 spid6s      SQL Trace ID 1 was started by login "sa".
    2018-05-17 23:08:44.04 spid6s      Server name is 'FULVIO-PC'. This is an informational message only. No user action is required.
    2018-05-17 23:08:44.20 spid15s     A self-generated certificate was successfully loaded for encryption.
    2018-05-17 23:08:44.20 spid15s     Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
    2018-05-17 23:08:44.20 spid15s     Server local connection provider is ready to accept connection on [ \\.\pipe\sql\query ].
    2018-05-17 23:08:44.20 spid15s     Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
    2018-05-17 23:08:44.20 spid15s     SQL Server is now ready for client connections. This is an informational message; no user action is required.
    2018-05-17 23:08:44.20 Server      SQL Server is attempting to register a Service Principal Name (SPN) for the SQL Server service. Kerberos authentication will not be possible until a SPN is registered for the SQL Server service. This is an informational message. No user action is required.
    2018-05-17 23:08:44.20 Server      The SQL Server Network Interface library could not register the Service Principal Name (SPN) [ MSSQLSvc/Fulvio-PC ] for the SQL Server service. Windows return code: 0xffffffff, state: 63. Failure to register a SPN might cause integrated authentication to use NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies and if the SPN has not been manually registered.
    2018-05-17 23:08:44.47 spid16s     A new instance of the full-text filter daemon host process has been successfully started.
    2018-05-17 23:08:44.55 spid19s     Starting up database 'msdb'.
    2018-05-17 23:08:44.55 spid9s      Starting up database 'mssqlsystemresource'.
    2018-05-17 23:08:44.55 spid20s     Starting up database 'fulvio'.
    2018-05-17 23:08:44.56 spid9s      The resource database build version is 14.00.1000. This is an informational message only. No user action is required.
    2018-05-17 23:08:44.59 spid9s      Starting up database 'model'.
    2018-05-17 23:08:44.64 spid9s      Polybase feature disabled.
    2018-05-17 23:08:44.64 spid9s      Clearing tempdb database.
    2018-05-17 23:08:44.67 spid20s     Error: 5173, Severity: 16, State: 1.
    2018-05-17 23:08:44.67 spid20s     One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files.  If this is an existing database, the file may be corrupted and should be restored from a backup.
    2018-05-17 23:08:44.68 spid20s     Error: 5173, Severity: 16, State: 1.
    2018-05-17 23:08:44.68 spid20s     One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files.  If this is an existing database, the file may be corrupted and should be restored from a backup.
    2018-05-17 23:08:44.68 spid20s     Log file 'F:\dati\datisql\fulvio_Recovered_log.ldf' does not match the primary file.  It may be from a different database or the log may have been rebuilt previously.
    2018-05-17 23:08:44.79 spid9s      Starting up database 'tempdb'.
    2018-05-17 23:08:44.90 spid20s     The Service Broker endpoint is in disabled or stopped state.
    2018-05-17 23:08:44.90 spid20s     The Database Mirroring endpoint is in disabled or stopped state.
    2018-05-17 23:08:44.91 spid20s     Service Broker manager has started.
    2018-05-17 23:08:44.92 spid6s      Recovery is complete. This is an informational message only. No user action is required.
    2018-05-17 23:14:27.86 spid51      Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
    2018-05-17 23:14:27.87 spid51      Using 'xplog70.dll' version '2017.140.1000' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
    2018-05-17 23:14:28.01 spid51      Starting up database 'fulvio2'.
    2018-05-17 23:14:28.07 spid51      Errore: 5173, gravità: 16, stato: 1.
    2018-05-17 23:14:28.07 spid51      One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files.  If this is an existing database, the file may be corrupted and should be restored from a backup.
    2018-05-17 23:14:28.07 spid51      Errore: 5173, gravità: 16, stato: 1.
    2018-05-17 23:14:28.07 spid51      One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files.  If this is an existing database, the file may be corrupted and should be restored from a backup.
    2018-05-17 23:14:28.07 spid51      Starting up database 'Fulvio-op'.
    2018-05-17 23:14:28.12 spid51      Parallel redo is started for database 'Fulvio-op' with worker pool size [4].
    2018-05-17 23:14:28.15 spid51      Parallel redo is shutdown for database 'Fulvio-op' with worker pool size [4].
    2018-05-17 23:14:28.19 spid51      Starting up database 'fulvio_2'.
    2018-05-17 23:14:28.25 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-17 23:14:28.27 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-05-17 23:14:34.40 spid51      Starting up database 'fulvio_2'.
    2018-05-17 23:14:34.43 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-17 23:14:34.45 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-05-19 20:30:28.49 spid51      Starting up database 'fulvio_2'.
    2018-05-19 20:30:33.39 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-19 20:30:33.41 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-05-19 20:30:40.22 spid51      Starting up database 'fulvio_2'.
    2018-05-19 20:30:40.24 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-19 20:30:40.26 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-05-20 20:32:24.50 spid51      Starting up database 'fulvio_2'.
    2018-05-20 20:32:24.61 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-20 20:32:24.64 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-05-20 20:32:33.86 spid51      Starting up database 'fulvio_2'.
    2018-05-20 20:32:33.90 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-20 20:32:33.93 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-05-26 02:16:18.42 spid51      Starting up database 'fulvio_2'.
    2018-05-26 02:16:18.76 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-26 02:16:18.78 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-05-26 02:16:25.75 spid51      Starting up database 'fulvio_2'.
    2018-05-26 02:16:25.78 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-26 02:16:25.80 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-05-27 02:18:25.05 spid51      Starting up database 'fulvio_2'.
    2018-05-27 02:18:25.11 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-27 02:18:25.13 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-05-27 02:18:31.91 spid51      Starting up database 'fulvio_2'.
    2018-05-27 02:18:31.95 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-27 02:18:31.98 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-05-28 23:33:10.54 spid51      Starting up database 'fulvio_2'.
    2018-05-28 23:33:10.69 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-28 23:33:10.77 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-05-28 23:33:22.27 spid51      Starting up database 'fulvio_2'.
    2018-05-28 23:33:22.32 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-05-28 23:33:22.35 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-06-02 12:02:25.20 spid51      Starting up database 'fulvio_2'.
    2018-06-02 12:02:25.34 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-06-02 12:02:25.37 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-06-02 12:02:32.04 spid51      Starting up database 'fulvio_2'.
    2018-06-02 12:02:32.07 spid51      Parallel redo is started for database 'fulvio_2' with worker pool size [4].
    2018-06-02 12:02:32.09 spid51      Parallel redo is shutdown for database 'fulvio_2' with worker pool size [4].
    2018-06-02 14:45:15.28 Server      SQL Server is terminating because of a system shutdown. This is an informational message only. No user action is required.
    2018-06-02 14:45:15.96 spid20s     Service Broker manager has shut down.
    2018-06-02 14:45:15.96 spid20s     Error: 17054, Severity: 16, State: 1.
    2018-06-02 14:45:15.96 spid20s     The current event was not reported to the operating system error log. Operating system error = (null). You may need to clear the operating system error log if it is full.
    2018-06-02 14:45:15.97 spid6s      .NET Framework runtime has been stopped.
    2018-06-02 14:45:16.16 spid6s      SQL Server shutdown has been initiated
    2018-06-02 14:45:16.16 spid6s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.


    Fulvio

    Tuesday, June 12, 2018 8:07 PM
  • Event error

    - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    - <System>
      <Provider Name="MSSQLSERVER" />
      <EventID Qualifiers="49152">8317</EventID>
      <Level>2</Level>
      <Task>2</Task>
      <Keywords>0x80000000000000</Keywords>
      <TimeCreated SystemTime="2018-05-14T22:20:53.525114100Z" />
      <EventRecordID>74</EventRecordID>
      <Channel>Application</Channel>
      <Computer>Fulvio-PC</Computer>
      <Security />
      </System>
    - <EventData>
      <Data>First Counter</Data>
      <Data>SYSTEM\CurrentControlSet\Services\MSSQLSERVER\Performance</Data>
      <Binary>7D200000100000000A000000460055004C00560049004F002D0050004300000000000000</Binary>
      </EventData>
      </Event>


    Fulvio

    Tuesday, June 12, 2018 8:18 PM