I read that my Local SQL Server Express Database Files should be located here (since user on my machine is "bclay"):
C:\Users\bclay\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB
...but that can't be, as the newest file there is over 2 months old, and I updated SQL Server Express data today (via my C# Winforms app, created with Visual Studio 2019). How can I sleuth out where those files are, so I can back them up?
Using the answer from marc_s, I was able to get that from Visual Studio's Server Explorer:

Okay, this seems bizarre: I navigate to that location in Windows Explorer, and it won't show me what's in the \Data subfolder. Although I have selected the Data subfolder, it is showing me what's in the Installs subfolder below it, and when I right-click the Data subfolder to czech out its properties, it tells me I don't have the credentials to view it:

How can I backup the .mdf file if I can't even see it?
I did a hard-drive-wide search for all *.mdf files, and it does not "find" (show me) my tables. The only ones that could be related are the top ones here, but they have generic names:

I think it was marc_s that mentioned somewhere to use MS SQL Server Management Studio, and to select Task > Backup. I downloaded/installed it, and it seemed to work: it did create a Backup folder in the expected location. I see that it was created today, 10/1/2020, but I still can't see anything in the folder, thus I can't copy anything from it. Here's what I see (the contents of the last-selected folder) when I select the "Backup" folder:

In SSMS, if you're connected to the database in question, you can run this query
SELECT *
FROM sys.database_files
and the physical_name column in the result set will show you the path of the files in question
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With