views:

89

answers:

4

This is a really strange one. I am using SQL Server Express 2005, and have the following connection string (in a DotNetNuke web.config):

Data Source=ELECTROMORPH\S15304561;Integrated Security=True;User Instance=True

Note that there is no AttachDbFilename parameter - so I'm not sure how SQL server even knows what to connect to. But it is connecting to something because the website works and can be updated!

I have tried searching for all .mdf files on the server, but can't see any likely candidates. The system databases don't seem to contain any user tables.

Does anyone have any idea if there is a "default" database which might be used - perhaps one that doesn't have an .mdf extension?

This is clearly the reward for accepting a default configuration! I really should know better but I'm completely stumped here, so would appreciate any suggestions!

A: 

Connect to the data source using Sql Server Management studio (comes free with Sql Server Express with tools.) Right click the database, and it will show you where the files are stored.

Andomar
A: 

See this part on User Instances. As for AttachDbFilename, this parameter might be added at run-time or specified elsewhere. Look for App_Data folder inside your application root directory.

Anton Gogolev
+1  A: 

Hi,

Perhaps this is a reference to the just the SQL Server Instance and so the default catalog is used, until a specific database is referenced, perhaps at run time.

See

http://msdn.microsoft.com/en-us/library/ms247257.aspx

Also refer to: SQL Server Express User Instances and read "How user intances work"

http://msdn.microsoft.com/en-us/library/ms254504.aspx

Use the following query to identify the Specific User Instances that are running under the default SQL server Express instance.

SELECT owning_principal_name, instance_pipe_name FROM sys.dm_os_child_instances
John Sansom
A: 
Zaagmans