Orchard CMS installing error? - asp.net-mvc

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.
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]

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.

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:
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.

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.

Related

How to add Job in Customer table with qodbc insert statement

I am trying to add a job to the QuickBooks Customer table using the following sql statement. The customer table has several CustomFields (columns). When I apply the statement without the customField/column the statment works. When I run the sql line with the customField/column - I get an error and the row IS inserted without the customField/column data
INSERT INTO Customer (Name, ParentRefFullName, Companyname, Billaddressaddr1, CustomFieldAddNumber) VALUES ('.10~Root Name 01', '.00~Root Name 01', 'Zen Enterprise', 'my Address one', '.10' )
Error: only with 'CustomFieldAddNumber' set to '.10'
What is the correct way to add a Job to Customer table with CustomFeilds/Columns ?
Thanks
I would suggest you download & install QODBC latest version 320 from below link & test again:
http://www.qodbc.com/qodbcDownload.htm
If you are still facing the issue, I kindly request you to please raise a support ticket to the QODBC Technical Support department from below mentioned link & provide requested information:
http://support.flexquarters.com/esupport/index.php?/Tickets/Submit
We may need the following information, I kindly request you to attach below listed files when replying to the ticket.
1) Screenshot of QODBC Setup Screen -- > About
2) Screenshot of the issue you’re facing.
Share Entire Log Files as an attachment in text format from
3) QODBC Setup Screen -- > Messages -- > Review QODBC Messages
4) QODBC Setup Screen -- > Messages -- > Review SDK Messages

Table or view does not exist when opening cursor?

I have a procedure that identifies each locked
account that was locked because of invalid login attempts. However the sp is creating with compilation errors: "ORA-00942: table does not exist". If I run the select statement by itself it works fine but within the sp. Can anyone help?
Create or replace PROCEDURE IdentifyLockedAccounts(p_recordset OUT SYS_REFCURSOR) AS
BEGIN
OPEN p_recordset FOR SELECT USERNAME FROM DBA_USERS WHERE ACCOUNT_STATUS = 'LOCKED' OR ACCOUNT_STATUS = 'LOCKED(TIMED)';
END IdentifyLockedAccounts;
/
Your schema probably has SELECT privilege on DBA_USERS via some role (SELECT_CATALOG_ROLE for instance) - that is why you are able to run it via SQL client.
Roles are not enabled during the compilation of plsql/views therefore you have to grant SELECT ON DBA_USERS directly to schema to be able to use it in stored procedure.
GRANT SELECT ON DBA_USERS to YOURSCHEMA;

Can not publish sql server code to source control with SSDT because of CDC

I am trying to publish database source code to source control (TFS) with SSDT (Sql server 2008R2, SSDT VS 2010). The problem is that it generates the code even before Pre-script with the following script:
IF EXISTS (SELECT 1
FROM [master].[dbo].[sysdatabases]
WHERE [name] = N'$(DatabaseName)')
BEGIN
ALTER DATABASE [$(DatabaseName)]
SET CHANGE_TRACKING = OFF
WITH ROLLBACK IMMEDIATE;
END
GO
It fails with following message:
(64,1): SQL72014: .Net SqlClient Data Provider: Msg 22115, Level 16,
State 1, Line 5 Change tracking is enabled for one or more tables in
database 'MyDb'. Disable change tracking on each table before
disabling it for the database. Use the sys.change_tracking_tables
catalog view to obtain a list of tables for which change tracking is
enabled.
The only workaround I found is to disable change tracking manually and enable it in pre-script, but this solution is not very good...
Any suggestions?
I found solution. I just needed to mark checkbox "Change tracking" in the Project Settings -> Database Settings -> Operational

Oracle Sql Developer 3.1 Unable to see Stored Procedure

Hi I am using Oracle SQL Developer 3.1.06 and connected to 11g EE. Whenever I will click edit in any procedure in the left pane, showing "create or replace" in the right side window.. I am not able to see any procedure code. I am able to see the procedure in same login in toad.
Are you sure the user you are logging in with is the owner of the objects?
You can check the owner by looking into the ALL_OBJECTS table:
SELECT * FROM ALL_OBJECTS WHERE OBJECT_NAME LIKE '%MYOBJECT%'
The user you are logging into could perhaps only have limited view rights preventing you from accessing the code. If you found the owner, you could browse in the connection window to other users and select the procedure from the relevant user. You should then be able to see everything.
I have a user called LOW_PRIVS.
They only have RESOURCE and CONNECT.
I create a procedure.
I open procedure.
Here is what we run to get the source code on a local procedure:
WITH src AS (
SELECT ROWNUM,
line,
text,
origin_con_id
FROM sys.all_source
WHERE type = :type
AND owner = :owner
AND name = :name
)
SELECT text
FROM src,
(
SELECT MAX(origin_con_id) max_orig
FROM src
)
WHERE origin_con_id = max_orig
ORDER BY line
We're hitting the ALL_SOURCE view that belongs to SYS. That should work for anyone.
But test and verify.
Note: I am on version 18.2 - that is many years newer than version 3.1. For best support, upgrade.

What is the correct syntax to use when trying to create a Data Source View to a linked server?

I have tried several statements but this one at least returns data.. but I get the error message: Deferred prepare could not be prepared. Incorrect syntax near')'. Incorrect syntax near the keyword 'DECLARE'. The following statement executed when creating namedquery:
SELECT[vwStatistics].*
FROM
(
***THIS IS MY QUERY***
DECLARE #SQL1 VARCHAR(500)
SET #SQL1 = 'SELECT *
FROM OPENQUERY(PORTAL, ''SELECT DeviceID, Date, Count
FROM printer_stats.Statistics
GROUP BY DeviceID'')'
EXEC (#SQL1)
***END OF MY QUERY***
)
AS[vwStatistics] (Microsoft.AnalysisServices.Controls)
I am new to linked servers and to SSAS. This is our company's first Cube from a linked server. My query does run in Management Studio and creates a SSRS report but it is slow.
Any suggestions would be helpful. Not much info on syntax for this situation on web. I have been looking for any such situation and have not found much help other than trying changes on server. EX: Make sure openrowset is on and reinstall OWC component.. I do not have that capability.
This is what we found to work:
SELECT DeviceID, CAST(statsdt AS CHAR) AS sdt, Count FROM OPENQUERY (
PORTAL, 'select * from (select DeviceID,CAST( Date AS CHAR) statsdt, Count from printer_stats.Statistics) as pstats')

Resources