Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello!
How it's possible to add a custom password to an .sdf database when you create a new Umbraco installation?
Because usually, when I select SQL CE Compact database on the installation, the wizard create a db with an empty password...
Hi Bob!
As a DB password must be specified when creating the database for SQL Server compact, I'd think the only way to do that would be to create a new SQL Server Compact Database and then remember to add the password to the web.config connection string.
For reference: https://technet.microsoft.com/en-us/library/ms171741(v=sql.110).aspx
An alternative is to use SQL Server instead of Compact.
Hope this helps, Niels...
Thank you Niels ;)
I found the solution!
If you've already created the db and you want to add the password, there is a tool (for command line) called SqlCeCmd40.
From cmd, after you have moved to the folder that contains the SqlCeCmd40.exe, you can run this command:
sqlcecmd40 -d "Data Source=C:\path-of-umbraco-appdata\Umbraco.sdf;" -z "Data Source=;Password=secretpasswordtochoose"
Now, to access the db you need to use the password.
So, you've just to change the web.config with a new connectionstring:
<add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Password=secretpasswordtochoose;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />
I hope this little tutorial can be helpful to others :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Add password to .sdf database on new Umbraco installation
Hello!
How it's possible to add a custom password to an .sdf database when you create a new Umbraco installation?
Because usually, when I select SQL CE Compact database on the installation, the wizard create a db with an empty password...
Hi Bob!
As a DB password must be specified when creating the database for SQL Server compact, I'd think the only way to do that would be to create a new SQL Server Compact Database and then remember to add the password to the web.config connection string.
For reference: https://technet.microsoft.com/en-us/library/ms171741(v=sql.110).aspx
An alternative is to use SQL Server instead of Compact.
Hope this helps, Niels...
Thank you Niels ;)
I found the solution!
If you've already created the db and you want to add the password, there is a tool (for command line) called SqlCeCmd40.
From cmd, after you have moved to the folder that contains the SqlCeCmd40.exe, you can run this command:
Now, to access the db you need to use the password.
So, you've just to change the web.config with a new connectionstring:
I hope this little tutorial can be helpful to others :)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.