I has a desktop program which uses MS sql LocalDb 2022. I realized when this program is running then SSMS 20.1 can not access the corresponding db.
use DbName
causes
"Operating system error 32: "32(The process cannot access the file because it is being used by another process.)"
The mdf file can not be accessed. I checked on an other machine and there was no problem there. I reinstalled the LocalDb and the ssms but it did not fix the problem. Any idea?
AttachDbFilename
in your connection string?