4
votes

I tried to install orchard CMS the from source code. I opened it in VS 2012, and I m using Sql Server 2012.

I am geting the following error.

enter image description here

error text:

Setup failed: could not execute query [ select rolerecord0_.Id as Id13_, rolerecord0_.Name as Name13_ from Test_Orchard_Roles_RoleRecord rolerecord0_ where rolerecord0_.Name=@p0 ] Name:p1 - Value:Anonymous [SQL: select rolerecord0_.Id as Id13_, rolerecord0_.Name as Name13_ from Test_Orchard_Roles_RoleRecord rolerecord0_ where rolerecord0_.Name=@p0]

I cant find any solution for this error. Where did I go wrong? How can I fix this error? When I choose built-in storage, it runs. Also, are there any disadvantages if I use the built-in one?

UPDATE (new error message)

Setup failed: could not execute query [ SELECT TOP (@p0) this_.Id as Id17_2_, this_.Number as Number17_2_, this_.Published as Published17_2_, this_.Latest as Latest17_2_, this_.Data as Data17_2_, this_.ContentItemRecord_id as ContentI6_17_2_, contentite1_.Id as Id16_0_, contentite1_.Data as Data16_0_, contentite1_.ContentType_id as ContentT3_16_0_, contenttyp4_.Id as Id18_1_, contenttyp4_.Name as Name18_1_ FROM Orchard_Framework_ContentItemVersionRecord this_ inner join Orchard_Framework_ContentItemRecord contentite1_ on this_.ContentItemRecord_id=contentite1_.Id left outer join Orchard_Framework_ContentTypeRecord contenttyp4_ on contentite1_.ContentType_id=contenttyp4_.Id WHERE contentite1_.Id = @p1 and this_.Published = @p2 ] Name:cp0 - Value:2 Name:cp1 - Value:True [SQL: SELECT TOP (@p0) this_.Id as Id17_2_, this_.Number as Number17_2_, this_.Published as Published17_2_, this_.Latest as Latest17_2_, this_.Data as Data17_2_, this_.ContentItemRecord_id as ContentI6_17_2_, contentite1_.Id as Id16_0_, contentite1_.Data as Data16_0_, contentite1_.ContentType_id as ContentT3_16_0_, contenttyp4_.Id as Id18_1_, contenttyp4_.Name as Name18_1_ FROM Orchard_Framework_ContentItemVersionRecord this_ inner join Orchard_Framework_ContentItemRecord contentite1_ on this_.ContentItemRecord_id=contentite1_.Id left outer join Orchard_Framework_ContentTypeRecord contenttyp4_ on contentite1_.ContentType_id=contenttyp4_.Id WHERE contentite1_.Id = @p1 and this_.Published = @p2]

3
What database permissions does your SQL Server user have? - mdm
Also, please look in app_data\logs and get the full stack trace. - Bertrand Le Roy
Also you may need to check your database collation: orchard.codeplex.com/workitem/17938 - Piotr Szmyd
@mdm , you right, it looks permission problem. - AliRıza Adıyahşi
@mdm I cant find right permission. Could you suggest anything about permission... - AliRıza Adıyahşi

3 Answers

2
votes

Before creating SQL Server database, set collocation as Latin1_General_100_CI_AS

Do this, right click to Database note on SQL Server management Tool and click to New Database. When you see the New Database window, type the database name and click to Option tab left hand side on New Database windows.

You will see Collocation combobox top of the New Database window. Change default to Latin1_General_100_CI_AS. And then run Orchard setup again.

1
votes

Set up a new application pool in your IIS manager and have it run as an account with permissions to query your sql server. Then assign your orchard website to use that application pool. Here is a screen shot of where to set the identity of the application pool, click the "Advanced Settings" link to get to this menu:

iis settings

In the "Process Model" section - set the Identity to an account with SQL server permissions. Set "Load User Profile" = 'false'. This will prevent the pool from trying to retrieve the user profile when running the orchard website.

0
votes

I find that usually when I get that error message, it's because the query being executed has a syntax error, or table/column names don't match. If you can halt execution where the exception is thrown, you can check the InnerException to see if that provides more info. If not, just copy the SQL from the message, fill in the parameters @p0, @p1, @p2 with values, and try to run it in whatever tool you use to manually query your database. It will often give you a more helpful error message.