SQL Server 2022 - After Installation " Error: 17204"

Ralf.Dreckmann 15 Reputation points
2023-05-16T17:09:05.5466667+00:00

Hello,

after installation of SQLServer 2022 there is a Error:

2023-05-16 17:24:57.35 spid35s Starting up database 'model_replicatedmaster'.

2023-05-16 17:24:57.35 spid39s Starting up database 'model'.

2023-05-16 17:24:57.36 spid39s Error: 17204, Severity: 16, State: 1.

2023-05-16 17:24:57.36 spid39s FCB::Open failed: Could not open file D:\dbs\sh\5uj5\1008_054209\cmd\11\obj\x64retail\sql\mkmastr\databases\mkmastr.nativeproj\model.mdf for file number 1. OS error: 3(Das System kann den angegebenen Pfad nicht finden.).

2023-05-16 17:24:57.36 spid39s Error: 5120, Severity: 16, State: 101.

2023-05-16 17:24:57.36 spid39s Unable to open the physical file "D:\dbs\sh\5uj5\1008_054209\cmd\11\obj\x64retail\sql\mkmastr\databases\mkmastr.nativeproj\model.mdf". Operating system error 3: "3(Das System kann den angegebenen Pfad nicht finden.)".

2023-05-16 17:24:57.36 spid39s Error: 17207, Severity: 16, State: 1.

2023-05-16 17:24:57.36 spid39s FileMgr::StartLogFiles: Operating system error 2(Das System kann die angegebene Datei nicht finden.) occurred while creating or opening file 'D:\dbs\sh\5uj5\1008_054209\cmd\11\obj\x64retail\sql\mkmastr\databases\mkmastr.nativeproj\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.

2023-05-16 17:24:57.36 spid39s File activation failure. The physical file name "D:\dbs\sh\5uj5\1008_054209\cmd\11\obj\x64retail\sql\mkmastr\databases\mkmastr.nativeproj\modellog.ldf" may be incorrect.

2023-05-16 17:24:57.36 spid39s Error: 945, Severity: 14, State: 2.

2023-05-16 17:24:57.36 spid39s Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.

The problem is "D:\dbs\sh\5uj5\1008_054209\cmd\11\obj\x64retail\sql\mkmastr\databases\mkmastr.nativeproj\model.mdf" because nowhere during installtion I wrote "D:" and of course the model.mdf is stored at "C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA"

How can I fix this problem?!?

Thx, Ralf

SQL Server | Other
{count} votes

3 answers

Sort by: Most helpful
  1. Ralf.Dreckmann 15 Reputation points
    2023-05-19T14:07:43.9166667+00:00

    Hello to all.

    Solved!!! The only reason ist "Samsung HD".

    a) deinstall SQL-Server

    b) Adding registry-key

    REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "ForcedPhysicalSectorSizeInBytes" /t   REG_MULTI_SZ /d "* 4095" /f

    c) starting machine again

    d) installing SQL-Server

    = no errors, works

    Thanks to all!

    3 people found this answer helpful.

  2. Erland Sommarskog 121.9K Reputation points MVP Volunteer Moderator
    2023-05-16T21:18:43.3433333+00:00

    Apart from model not being accessible, is the SQL Server instance running? If you run SELECT * FROM sys.master_files, what do you see?

    It is possible that you can get this to work by running:

    ALTER DATABASE model MODIFY FILE = (NAME = 'modeldev', FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\model.mdf')
    ALTER DATABASE model MODIFY FILE = (NAME = 'modellog', FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\DATA\modellog.mdf')
    

    and then restart SQL Server. You need to verify that the files actually exists in those locations.


  3. Anonymous
    2023-05-17T07:04:27.5666667+00:00

    Hi @Ralf.Dreckmann

    For "Error: 17204", you can refer to this thread.

    https://stackoverflow.com/questions/28443791/sql-server-moved-files-cant-start-cant-configure

    Best regards,

    Percy Tang


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.