Database Connection String

Topics: Administration, General, Installing Orchard, Troubleshooting
May 3, 2013 at 1:01 PM
Hi,

I cant remember if I installed Orchard to use the compact database or use a remote sql server.

I cant seem to find the web.config, so am wondering where they are stored...

Any pointers would be appreciated.
Developer
May 3, 2013 at 1:57 PM
The connection string is stored in /App_Data/Sites/Default/Settings.txt (Replace "Default" with the name of your tenant if you named your tenant differently).
May 3, 2013 at 5:08 PM
Thanks. Does it have any log-in details or does it just use the windows account?

Im trying to check whether I installed this locally with Compact Edition or on a remote SQL Server. If it is the Compact I want to try and put it onto my new local SQL Server.

Normally but I would just check the SQL Server, but I had issues with Orchard and had to make several installation attempts. So there is bound to be some orphans in the SQL eitherway.
Developer
May 3, 2013 at 5:17 PM
That depends on the connection string. If you open the Settings.txt file you'll see what DB engine is used: Sql or SqlCe.
If you used Sql, then the connection string could contain log-in details. Or, it contains the Integrated Security = True setting, for example.
May 3, 2013 at 5:25 PM
This is the contents of the Settings file:


Name: Default
DataProvider: SqlCe
DataConnectionString: null
DataPrefix: null
RequestUrlHost: null
RequestUrlPrefix: null
State: Running
EncryptionAlgorithm: AES
EncryptionKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
HashAlgorithm: xxxxxxxxxxxxxxxxxxxxxxxx
HashKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Themes:

So that suggests this use the Compact Edition. Using my SQManager, would this just be 127.0.0.1 or is there any port needed?
Are the log-in credentials just the local user account?

Thanks.
May 3, 2013 at 6:00 PM
The default way (and I guess the only way I've ever worked on an SDF file) is to open it from Visual Studio using the Server Explorer (you can find it under the view pull down). Then you'd open a new connection via the SQL Server Compact option. There shouldn't be a password or anything needed to log into the SDF file.
May 3, 2013 at 6:08 PM
Thanks Adrian.