I recently worked on a problem caused by an application storing the wrong location of MSSQL .ldf and .mdf files. The SQL Server was 2005.
The application was looking for the files in: \server\app root\database\data and \server\app root\database\log, but the files were in \server\mssql\data and \server\mssql\logs. I moved the database files to the location where the application was expecting them, which fixed the problem.
I don't understand why an application would need to know where these files are, it should only care about an ODBC name, or OLE access (host name, credentials). Does anyone know why an application would need this information?
SQL Express (only Express) allows a feature called User Instances in which you can specify the location of a .mdf file in an app's connection string, using the SqlClient Managed Provider, and it will be attached as a database on the server. There are some limitations to this:
When this feature is used then the server admin does not create the database on the server. SQL attaches the .mdf file when the connection is made to the app.
You see this most often with some (brainless and/or cheap) web hosts, and also when SQL Express is used as the db engine for a local user app.
From a web app perspective it makes your database fairly portable and does provide an alternative when you're not able to run a backup of your database through a hosting control panel or something. Otherwise I've found that it's biggest use is in the local app arena.
Unless we're talking about software that, for whatever reason, needs to directly access those files there is no reason for it to know about them. Even then, it's just plain bad and inconsiderate programming to make assumptions or have unrealistic expectations about such details. The software should, at the very least, ask you where the files are if it can't locate them on its own. I certainly agree with Sim, that programmer(s) definitely needs a few whacks with the cluestick. You really have to wonder what else is wrong with the application.