-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to start a new instance on an existing SQL Server Database #8698
Comments
Can you check the log file after the first error? |
Sure here you go : I have found a workarround by starting with a SqlServer CE then droping the database with SqlCe40ToolBox.zip then restoring that database on our Sql Server instance. I then had to tweak Settings.txt in App_Data and I think I suppressed the mappings.bin also. Not so simple but it eventually does work. |
I think this would mean that your SQL Server database is actually not empty and has tables that Orchard is trying to created. By using the sqlserverce temporarily you just skip the tables creation. Can you try a different database, or try to set a custom table prefix in the setup screen to confirm this? Also what is the version of your SQL Server instance, it could be that it's not supported and some SQL statements fail. |
Context :
Sql Server 13.0
Windows 11
VS 2019 16.11.22
Orchard freshly cloned from https://github.com/OrchardCMS/Orchard.git
Empty Database created on the server
Starting the Orchard.Web project leads to http://localhost:30321/OrchardLocal/ with the "Get Started" page. Choosing "Use an existing SQL Server, SQL Express database" and filling the "Connection string".
After validation, this error pops up in Visual Studio on line 36 of OrchardCMS\src\Orchard\Data\FetchRequest.cs :
NHibernate.Exceptions.GenericADOException : 'could not execute query
[ select contentpar0_.Id as Id12_0_, contentpar1_.Id as Id13_1_, contentfie2_.Id as Id11_2_, contentpar0_.Name as Name12_0_, contentpar0_.Hidden as Hidden12_0_, contentpar0_.Settings as Settings12_0_, contentpar1_.Name as Name13_1_, contentpar1_.Settings as Settings13_1_, contentpar1_.ContentFieldDefinitionRecord_id as ContentF4_13_1_, contentpar1_.ContentPartDefinitionRecord_id as ContentP5_0__, contentpar1_.Id as Id0__, contentfie2_.Name as Name11_2_ from Settings_ContentPartDefinitionRecord contentpar0_ left outer join Settings_ContentPartFieldDefinitionRecord contentpar1_ on contentpar0_.Id=contentpar1_.ContentPartDefinitionRecord_id left outer join Settings_ContentFieldDefinitionRecord contentfie2_ on contentpar1_.ContentFieldDefinitionRecord_id=contentfie2_.Id ]
[SQL: select contentpar0_.Id as Id12_0_, contentpar1_.Id as Id13_1_, contentfie2_.Id as Id11_2_, contentpar0_.Name as Name12_0_, contentpar0_.Hidden as Hidden12_0_, contentpar0_.Settings as Settings12_0_, contentpar1_.Name as Name13_1_, contentpar1_.Settings as Settings13_1_, contentpar1_.ContentFieldDefinitionRecord_id as ContentF4_13_1_, contentpar1_.ContentPartDefinitionRecord_id as ContentP5_0__, contentpar1_.Id as Id0__, contentfie2_.Name as Name11_2_ from Settings_ContentPartDefinitionRecord contentpar0_ left outer join Settings_ContentPartFieldDefinitionRecord contentpar1_ on contentpar0_.Id=contentpar1_.ContentPartDefinitionRecord_id left outer join Settings_ContentFieldDefinitionRecord contentfie2_ on contentpar1_.ContentFieldDefinitionRecord_id=contentfie2_.Id]'
Then, on the "Get Started" page, another error is displayed :
Setup failed: could not execute query
[ select contenttyp0_.Id as Id5_, contenttyp0_.Name as Name5_ from Orchard_Framework_ContentTypeRecord contenttyp0_ where contenttyp0_.Name=@p0 ]
Name:p1 - Value:Site
[SQL: select contenttyp0_.Id as Id5_, contenttyp0_.Name as Name5_ from Orchard_Framework_ContentTypeRecord contenttyp0_ where contenttyp0_.Name=@p0]
If I look at the Database, there's only one table : Orchard_Framework_DataMigrationRecord
So Orchard had access to the database and even created a table but there is nothing there like Orchard_Framework_ContentTypeRecord or Settings_ContentPartDefinitionRecord
I'm clueless on how to fix that.
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: