Avatar of MainSail2007
MainSail2007
 asked on

SQL DATABASE File

I have a .MDF file stored in the SQL DATA directory and it is not listed on management studio
However when I try to copy if off or move it - the system says in use by SharePoint.  It has a date modified of today but not listed any where in the management studio
Lost on where it might be
Microsoft SQL Server

Avatar of undefined
Last Comment
Member_2_4226667

8/22/2022 - Mon
Russ Suter

Is it possible that it is attached to another instance of SQL Server installed on the same machine?
ASKER CERTIFIED SOLUTION
Member_2_4226667

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Jason clark

it might be helpful for you:

declare @files table (
    db_name sysname,
    physical_name nvarchar(260)
)

insert into @files
    exec sp_MSforeachdb 'select "?", physical_name from ?.sys.database_files'

select db_name, physical_name 
    from @files

Open in new window

MainSail2007

ASKER
where do I run this code??
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Member_2_4226667

You can run these code in the management studio. Just connect to the server, and click the "New query" button on the top left corner, copy and paste the code in and execute it.