Umbraco via Nuget - how do I change the database? - nuget

I have installed Umbraco 7 via Nuget
Empty ASP.NET 4.5 project
Package Manager console command: install-package umbracocms
Build & run, following the Umbraco wizard
Looking in the web.config this is writing to the SQL Server CE database on my system which I definitely DO NOT WANT because of a known issue with Web Matrix / IIS Express and SQL CE
Link to known issue on Umbraco forums
How do I tell Umbraco to use my SQL Server 2012 Express database? Is it just the web.config that I change? Do I do this before building & running for the first time?

Build the project and run in (without debugging).
When you are asked to enter a username, email address and password do so.
Before hitting the green INSTALL button, click 'Custom'.
The custom install screen allows you to choose which database to install to. In my case I have two versions of SQL Server (2008 R2 and 2012 Express and the former I don't have admin rights to) but there is only one SQL Server option. I had to specify a custom connection string like so:
Data Source=APIWSEMMA\MYSQL2012;Initial Catalog=MyUmbraco;User ID=sa;Password=MyPassword
Now begin the installation. You should see all the tables created in your database when it is finished.

Related

Integrating Entity Framework 6.0 with Postgres 9.3

I have a local database developed in Postgres 9.3. The Postgres server name on my computer is just "localhost". I would like to use the Entity Framework 6 Designer that is built into Visual Studio 13 to automatically generate a data model of EF classes and properties that correspond to the database tables and columns.
As described in various web articles, and using Nuget package manager, I added onto VS 13 these extensions or packages: EF 6, Npgsql, Npgsql Data Provider for EF 6, and Dotconnect express for Postgresql. Afterwards, in the VS 13 Server Explorer window, I was able to connect and see my Postgres tables and columns.
However, I cannot seem to get the EF Designer Wizard to automatically generate the .edmx file. I tried adding an ADO.net data object, selecting "EF Designer from Database" and alternatively, "Code First from Database." When I got to the next screen, I had to choose a Data Source. I tried both "MS SQL Server Database File" and alternatively, "Other." For the Data Provider, there was no other option than ".Net Data Provider for SQL."
In the next screen I tried to create a connection, using SQL server authentication, with user name and password, but I could never get VS 13 to connect or even display the Postgres server like it did in Server Explorer window. For the Server Name I used the same one as I used for the Server Explorer window, ie. localhost.mydatabasename.myschema. For the SQL User, I used the owner of the Postgres database, a Role I created, ie. mydatabasename_role.
When that faied, I tried going into MS SQL Management Studio 2014 to see if I could display the Postgres server there, using the same info used in the Server Explorer window, but I could not get SSMS to display the Postgres server there either. Is there a way to automatically generate the data model and .edmx file as I have been trying, using just VS 13 and SSMS 14? Or do I need to purchase the proprietary / licensed version of dotconnect for Postgres developed by Devart? Thank you in advance.
A Visual Studio plugin is currently being developed which supports the EF Designer Wizard.
You can find it here: https://github.com/npgsql/Npgsql/pull/213
After about a week of research and banging my head againts my desk, I FINALLY got my Npgsql MVC Entity Framework application to work... and work WITH the wizard. The steps are below....
1) Close Visual Studio, then download and install Npgsql PostgreSQL Integration from: https://marketplace.visualstudio.com/items?itemName=RojanskyS.NpgsqlPostgreSQLIntegration
2) Reboot your computer. (yes, it's needed, I promise)
3) Open visual studio and install the following NuGet packages, IN THE ORDER listed and the VERSION listed...
--> EntityFramework version 6.0.0, then clean and rebuild
--> Npgsql 3.1.0, then clean and rebuild
--> EntityFramework6.Npgsql 3.1.1, then clean and rebuild
NOTE: You may need to uninstall other Nuget packages if these will not install in the order and version listed. If so, just make note and add them back later. and yes, you will want to clean/rebuild between each one above.
4) Close all applications and restart your computer. (yes, it's needed, I promise)
5) After your computer restarts, open Visual Studio again and go to your solution. NOTE: I advise you add a new project for your database connection, but this is more a preference than anything.
6) Try using the Entity Framework Wizard again. You should see the Npgsql selections and it shouldn't just crash on you.

When SQL isn't explicitly installed what is the default data store Visual Studio 2012 and/or Entity Framework 5/6?

I have the situation below and can't figure out where everything is being saved.
I'm using a new installation of Visual Studio 2012 and didn't explicitly install any version of SQL. I created a Console project in VS and used NuGet to add references to the latest -Pre version of EF (6.0.1 at the time).
When I did the database operations I wanted (just some test stuff: create, add, query, migrations, etc.) everything worked. Shutdown the application, bring it back up and the data was persisted correctly. No problem so far.
When I went to look at the database I was surprised to find that I didn't have Management Studio installed. I also wasn't able to see any databases in the SQL Server Object Explorer in VS2012. I could see a "(localdb)\Projects" server but my database wasn't in it.
When I checked the generated connection string it was:
Data Source=.\SQLEXPRESS;Initial Catalog=TestProject.Context;Integrated Security=True;MultipleActiveResultSets=True
Using add server in the SQL Server Object Explorer I had to manually enter server names since none were found automatically. I tried localhost\SQLEXPRESS, (localdb)\SQLSERVER, .\SQLEXPRESS, and other similar variants, but those couldn't be found either.
Where is everything being saved?
Thanks.
If SqlExpress is not installed the default is (localdb)\v11.0 which is installed when you install VS2012 (or VS2013).

Sql Server 2008 R2 Web setup throws application error when starting FixSqlRegistryKey_x86.exe

I have Windows 7 64bit. I had Sql Server 2008 R2 Express installed. I unistalled it and then I tried to install Sql Server 2008 R2 Web. Unfortunatelly on the Setup Support Rules page for 'Consistency validation for SQL Server registry keys' I got 'Failed'. I spent half of a day trying to solve it, but then I assumed that there must be realy something wrong with registry keys and it will be faster just to reinstall Windows.
After formatting the disk and reinstalling Windows 7, rebooting dozen of times I installed all Windows upadtes as well. I also did install some programs like Skype, Thundirbird etc. which has no influence on Sql Server setup.
And then I tried again to install Sql Server 2008 R2 Web. And again an error. A bit different one. Now when the setup is on the Setup Support Rules page I get an error message box with the title "FixSqlRegistryKey_x86 - Application Error" and content: The application was unable to start correctly (0xc000007b). Click OK to close the application. 'Consistency validation for SQL Server registry keys' gets 'Failed' status as well.
My team mate has exactly the same machine as mine. He had no problem with installation (he didnt even need to reinstall Windows).
I run the setup as administrator, from a local folder. I even tried to use the setup files copied from my team mate, for a case if my copy is corrupted. In the setup options I have chosen the 'x64' version.
Any ideas what can be the reason of the problem?
Problem solved.
Someone suggested to me that Web edition should not be installed on Win 7 (just on Windows Server). So perhaps installing a different version would work. My team mate perhaps succeeded acidentially - due to having sql server installed already in express edition... but it is just a guess.
Before I tried to install another edition of SqlServer, I downloaded 2008 Express version and I started the install. From the temporary folder created by the express edition I copied FixSqlRegistryKey_x86.exe file and I had overwritten the problematic file in the Web setup with this file.
I started the setup again. It passed the verification this time. But has crashed on a later point - setup unpacks the installation files to C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2 and runs from it. So I needed to again overwrite the problematic file in this location. Now the installation succeeded.

Unable to upgrade to Microsoft SQL Server2008 R2 RTM - Express with Advanced Services

I am trying to upgrade my current Express edition to Express with Advanced Services for supporting full-text search.
The current system setup is:
OS version: Windows server 2008 R2 web server 64 bit
SQL Server 2008 R2 Express, SP1, v10.50.2500.0
I have downloaded the SQL Server with Advanced Services. I am unable to upgrade the edition. The installation step goes without any issues and even getting Edition upgrade completed page. But once I click the close this page, an error will pop up.
SQL Server Setup has encountered the following error: Invoke or
BeginInvoke cannot be called on a control until the window handle has
been created.
Can some please assist me here to the right direction?
I could see that the version of SQL Server Express with Advanced Services is 10.50.1600.1. Is this the cause? So should I downgrade the sp1 to normal Express r2 edition before upgrading?
Downloaded link for the Express with advanced services http://www.microsoft.com/download/en/details.aspx?id=25174
I got it working finally!!
I was getting the below error previously. It is a bug and is related to UI. So i have upgraded using the command line that too in QUIET mode to prevent any UI intervention.
"SQL Server Setup has encountered the following error:
Invoke or BeginInvoke cannot be called on a control until the window handle has been created."
Following are the steps i used:-
Downloaded the latest sp1 for SQL Server 2008 r2 with Advanced Services (SQLEXPRADV_x64_ENU.exe) from http://www.microsoft.com/download/en/details.aspx?id=26729
Extracted the SQLEXPRADV_x64_ENU.exe to D:\SQL2008
Open command prompt as "Administrator"
Executed the following commands
D:\sql2008\setup.exe /ACTION=editionupgrade /INSTANCENAME=MyInstance /IACCEPTSQLSERVERLICENSETERMS /FEATURES=SQL,RS /INDICATEPROGRESS /Q
*MyInstance is your sql server instance name
*/INDICATEPROGRESS will show the setup progress to command prompt(For a confirmation :) )
You can follow this doc for more setup parameters
http://msdn.microsoft.com/en-us/library/ms144259(v=sql.105).aspx
Verified the upgrade has been successful.
Unfortunately FULL-TEXT Search feature was not enabled.
So Run the setup.exe as normall(double click) and added "FULL-TEXT Search" feature to the existing instance.
Everything works fine now. Thank you all.
I can verify that this bug and the same resolution also apply to SQL Server 2008 R2 Express SP2 v10.50.4000.0

Migration from SQL Server 2008 R2 Express to SQL Server 2008 R2 Developers Edition

I've done some reading on the installation but it's not clear to me whether I will be UPGRADED to the SQL Server Developers edition or whether the install will create another instance. I want to get rid of SQL Server Express. Will the install give me that option?
If the install does not provide that option
What files must be deleted?
Are there any configuration items I need to gather before the install?
Anything else to be aware of?
You definitely can install a separate instance.
Don't even try to delete or replace sql server files manually - use standard windows instrumentation instead - uninstall it as regular application.
As far as I know - there were no any options to upgrade from express edt. to developer, if you need so - just keep your db in safe place, uninstall express, install developer, attach the db. And be aware of developer license restrictions!