I am trying to query SharePoint list data from a database named like STS_bangbus_1 database, but there seem to be only one SQL Server instance with the named “bangbus” aka “SHAREPOINT”, with duplicated database file names in two different directories: C:\Program Files\Microsoft SQL Server\MSSQL$SHAREPOINT C:\Program Files\Microsoft SQL Server\MSSQL$SHAREPOINT\DATA
The latter is the default spot for the SharePoint list databases and has the much, much larger database file, likely with the current data. I suspect that someone made a backup copy in the parent directory (in Feb 2010?), which would be fine, except now we cannot query the AllList and AllUserData tables (in the lower directory) as we require.
Will deleting the backup database copy in the parent directory solve the issue? Can we delete these copies? If not, how can we query these two data tables to meet our requirements?
Any suggestions or advice would be most welcome.
PS It is an actual point in time copy of the mdf file in the parent directory. The working, active mdf in the child/default is not connected to the identically named database.