dbatools icon indicating copy to clipboard operation
dbatools copied to clipboard

[BUG] New files with SQL 2019 installer

Open gbargsley opened this issue 4 years ago • 8 comments

Environmental information

#### PowerShell version:

Name                           Value                                                                                  
----                           -----                                                                                  
PSVersion                      5.1.18362.145                                                                          
PSEdition                      Desktop                                                                                
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                
BuildVersion                   10.0.18362.145                                                                         
CLRVersion                     4.0.30319.42000                                                                        
WSManStackVersion              3.0                                                                                    
PSRemotingProtocolVersion      2.3                                                                                    
SerializationVersion           1.1.0.1                                                                                




#### dbatools Module version:


Name    : dbatools
Path    : C:\Program Files\WindowsPowerShell\Modules\dbatools\1.0.100\dbatools.psd1
Version : 1.0.100

Name    : dbatools
Path    : C:\Program Files\WindowsPowerShell\Modules\dbatools\1.0.83\dbatools.psd1
Version : 1.0.83

Name    : dbatools
Path    : C:\Program Files\WindowsPowerShell\Modules\dbatools\1.0.9\dbatools.psd1
Version : 1.0.9


#### SQL Server: 
<!-- Paste output of `SELECT @@VERSION` -->
```sql
Microsoft SQL Server 2019 (RTM-CU2) (KB4536075) - 15.0.4013.40 (X64)   Feb  3 2020 16:40:57   Copyright (C) 2019 Microsoft Corporation  Developer Edition (64-bit) on Windows Server 2016 Datacenter 10.0 <X64> (Build 14393: ) (Hypervisor) 

Report

With the SQL 2019 installation the following four files are now being dropped in the DATA folder by default.

model_msdbdata.mdf model_msdblog.ldf model_replicatedmaster.ldf model_replicatedmaster.mdf

The current version of the function identifies these as orphaned because they are not hosted by SQL Server, but I believe they are there for AG replication of system files or for some other SQL related feature. I would not recommend displaying these as orphaned as deleting them might break the SQL 2019 instance.

Host used

  • [ ] powershell.exe
  • [ ] ISE
  • [ ] VS Code
  • [ ] Other (please specify)

If anything other than powershell.exe was used, please confirm that you can duplicate the issue with powershell.exe

  • [ ] Still buggy in powershell.exe

Errors Received

Steps to Reproduce

Expected Behavior

Actual Behavior

gbargsley avatar Mar 02 '20 21:03 gbargsley

So you have a vanilla installation of SQL Server 2019 and found those files there?

wsmelton avatar Mar 02 '20 21:03 wsmelton

Yes on multiple boxes. I cannot find it in any MS docs, but it seems related to a feature.

gbargsley avatar Mar 02 '20 21:03 gbargsley

What method did you use to install it?

wsmelton avatar Mar 02 '20 21:03 wsmelton

Engine only with all the defaults.

gbargsley avatar Mar 02 '20 21:03 gbargsley

I just installed SQL Server 2019 enterprise edition and encountered the same thing. I have 4 extra model db files in the default directory.

model_msdbdata.mdf model_msdblog.ldf model_replicatedmaster.ldf model_replicatedmaster.mdf

krahi600 avatar Jan 11 '22 17:01 krahi600

I can confirm this is an issue with 2019 installs. Have encountered it with Developer Edition and Standard Edition.

Dean-McMillan avatar Aug 31 '22 22:08 Dean-McMillan

are yall running Find-DbaDbOrphanFile?

potatoqualitee avatar Sep 01 '22 03:09 potatoqualitee

Those files are listed here with a now retired feature: https://docs.microsoft.com/en-us/sql/big-data-cluster/deployment-high-availability?view=sql-server-ver16.

Shame I was looking forward to maybe having an MSDB and aspects of the master database that could be more AG aware.

Kevin-S-Lewis avatar Sep 06 '22 11:09 Kevin-S-Lewis

Fixed with https://github.com/dataplat/dbatools/pull/6395.

andreasjordan avatar Jun 11 '23 11:06 andreasjordan