Cannot find database after Sitefinity Trial Installation

Posted by nidhiv on 17-Mar-2020 12:49

Hi Everyone!

I am new to Sitefinity. I installed Sitefinity 12.2 version and created a new project. The DataConfig.config file in the new instance has below connection string - 

<add connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Sitefinity.mdf" name="Sitefinity" />

The issue is it does not have Initial Catalog in ConnectionString. How to find the database where it is installed?

I searched in SQL Server but cannot find any database related to sitefinity. 

All Replies

Posted by gauntt@upenn.edu on 17-Mar-2020 13:13

It looks to me like it created a SQLExpress database called Sitefinity.mdf on your computer. Says "DataDirectory" so maybe it is in the App_Data folder?

Posted by Ryan Kanawyer on 17-Mar-2020 13:15

It looks like you are using SQL Express which I have never used but my guess is that what you are looking for is the "AttachDBFilename" section of the connection string. It has the path of the db file along with the name of the file. That is assuming you were wanting to use SQL Express and not SQL Server or something.

On the SQL Server you will need to create a DB and add the sitefinity account as an admin for that DB. Sitefinity will populate the DB with the tables that it needs. Another option is for you to give the account Sitefinity will use the ability to create a DB but that is less secure so I would suggest against it.

If you need to update the DB connection, you can also manually edit the connection string inside of the DataConfig.config file. If you want to setup the DB again (say you were meaning to pick something else and don't want to manually update the connection string) you can remove the DataConfig.config file from the configuration folder > reset app pool > hit the site and it will prompt you for the db info again to rebuild the DataConfig.config file from scratch.

Posted by jread on 17-Mar-2020 13:19

It is running the database as a User Instance.  The database is located in the App_Data folder at the root of the project Sitefinity.mdf & Siteifnity_log.ldf.  If you want you can attach the mdf to as a database on any SQL server.  If you want to literally browse the user instance DB you can find the connection string for the DB by running the following script.  Connect to the SQLExpress instance in SSMS and then run the below. The 'owning_principal_name' column has the connection string

SELECT owning_principal_name, instance_pipe_name, heart_beat FROM sys.dm_os_child_instances


https://docs.microsoft.com/en-us/SQL/relational-databases/system-dynamic-management-views/sys-dm-os-child-instances-transact-sql?view=sql-server-2017

This thread is closed