Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Eran 28 posts 78 karma points
    Jul 06, 2014 @ 02:00
    Eran
    0

    Umbraco 6&7 database

    Umbraco 6 require a database (I mean ms sql server one). when I upload it to a server I need to setup a data base.

    In version 7 there is an mdf file in the 'app_data' folder, is that means that if I upload the project to a server I only upload the solution and don't need to set a database there?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 06, 2014 @ 11:24
    Dennis Aaen
    0

    Hi Eran,

    If you see system requirements for Umbraco 6 and 7 http://our.umbraco.org/documentation/Installation/system-requirements you can see that both versions supports the same type of databases. SQL CE, SQL Server 2008 (Express and higher)

    If you are choosing running your Umbraco installation on a SQL CE, the file that is located on the app_data' folder named Umbraco.sdf, and when you need to get it online on a server, you just need to copy all the files to the server and you don´t need to setup a database.

    If you choose to run on a MSSQL database, then you need to set up a database on the new server, and take a copy of your database from your other environment, then install it on the server.

    If you choose to run on a SQLCE database, and later on the process want to change to an MSSQL database, it not a problem you can migrate from e.g a SQLCE to a MSSQL database at any to.

    If you need to do this you could e.g use Webmatrix to do that. Open the Webmatrix, and in the lower left corner in the webmatrix UI you can select the database - Then browse to the SQLCE database, it´s located in the \App_Data folder after that a "migrate button" will appear in the upper menu options. By press that button a migrate dialogue appears asking for connection details to the MSSQL database will appear, then you fill the information out. Then you done converting your SQL CE database to MSSQL database.

    The last thing you need then is change the connection string in web.config from something like:

    <add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;" providerName="System.Data.SqlServerCe.4.0" />

    To something like:

    <add name="umbracoDbDSN" connectionString="server=.\SQLExpress;database=dbname;user id=dbuser;password=dbpassword" providerName="System.Data.SqlClient" />

    Hope this explains it, and helps,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft