You are viewing limited content. For full access, please sign in.

Question

Question

Error executing SQL command. general database error 9008

asked on August 4, 2021 Show version history

Only happening in one repository.

Details:

Error Code: 9008
Error Message: Error executing SQL command.
General database error. [9008]

------------ Technical Details: ------------

LF.exe (10.4.0.311):
    Call Stack: (Current)
        CSearchView::RunSearch
        CSearchView::BeginSearch
    Call History:
           CAttachedRepository::GetProfileValue
          GetOptionString ([Search]ContextHitLength)
           CAttachedRepository::GetProfileValue
          GetOptionString ([Search]IncludeShortcuts)
           CAttachedRepository::GetProfileValue
          GetOptionString ([Settings]UseDefaultCollation)
           CAttachedRepository::GetProfileValue
          CSearchView::GetTemplateIdFromSearchString

0 0

Answer

SELECTED ANSWER
replied on August 4, 2021

It looks like a bug related to the volumes on the Laserfiche server. This happens when the repository has more than 30 volumes that the current user can't access. We filed a bug report to investigate it further (bug#336714). One workaround is to run the search as a user with the "Manage Entry Access" privilege.

0 0

Replies

replied on December 20, 2021

I resolved this issue for one of our users by wiping out the account attributes. Once done, the search error went away.

1 0
replied on August 4, 2021

To troubeshoot SQL errors, check the event log on the Laserfiche Server machine, under Application and Services Logs->Laserfiche->ContentRepository:

0 0
replied on August 4, 2021

The log contains an error that has the following in it:

Invalid object name '#tmpsearchvolid'.

Any idea what that means?

0 0
replied on August 4, 2021

Does the user specified in the SQL login for the repository have rights to create tables in the database?

0 0
replied on August 4, 2021

Yes, the login account has create table rights.

0 0
replied on August 4, 2021

Please post the full error message (blanking out any sensitive information of course).

0 0
replied on August 4, 2021

Log Name:      Laserfiche-ContentRepository-Service/Admin
Source:        Laserfiche-ContentRepository-Service
Date:          8/4/2021 8:33:03 AM
Event ID:      150
Task Category: None
Level:         Error
Keywords:      
User:          ServiceAccountName
Computer:      ServerName
Description:
An error occurred when executing an SQL query, retrieving the results of a query, or otherwise communicating with the database server. Session ID=1099; Dialog ID=775259; Repository="AMCOM-COMMAND-GROUP"; Function=Search::ParseAndExecute; Message="[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Invalid object name '#tmpsearchvolid'."; Statement="INSERT INTO #tempresult (tocid, rsid, hitcount, parentid, etype, acl_tocid, vol_id, path) SELECT tocid, :rsid<int>, :hitcount<int>, parentid, etype, acl_tocid, vol_id, '' FROM ( SELECT toc.name displayname, toc.* FROM toc ) toc WHERE tocid = :tocid<int> AND tocid <> 2 AND del_tocid = 0 AND (etype <> -2 OR vol_id NOT IN (SELECT vol_id FROM #tmpsearchvolid))"; SQL Variable=""; SQL State="42S02".
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Laserfiche-ContentRepository-Service" Guid="{82FC23FE-4B0A-435C-82E6-01C7077098AF}" />
    <EventID>150</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2021-08-04T13:33:03.271348500Z" />
    <EventRecordID>611811</EventRecordID>
    <Correlation ActivityID="{5F9D7A07-219A-41C1-858B-5CFCF23F8698}" />
    <Execution ProcessID="2840" ThreadID="4660" />
    <Channel>Laserfiche-ContentRepository-Service/Admin</Channel>
    <Computer>ServerName</Computer>
    <Security UserID="S-1-5-21-3822721094-983390456-1902330015-16993477" />
  </System>
  <EventData>
    <Data Name="sessionID">1099</Data>
    <Data Name="dialogID">775259</Data>
    <Data Name="repository">AMCOM-COMMAND-GROUP</Data>
    <Data Name="func">Search::ParseAndExecute</Data>
    <Data Name="message">[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Invalid object name '#tmpsearchvolid'.</Data>
    <Data Name="stmt">INSERT INTO #tempresult (tocid, rsid, hitcount, parentid, etype, acl_tocid, vol_id, path) SELECT tocid, :rsid&lt;int&gt;, :hitcount&lt;int&gt;, parentid, etype, acl_tocid, vol_id, '' FROM ( SELECT toc.name displayname, toc.* FROM toc ) toc WHERE tocid = :tocid&lt;int&gt; AND tocid &lt;&gt; 2 AND del_tocid = 0 AND (etype &lt;&gt; -2 OR vol_id NOT IN (SELECT vol_id FROM #tmpsearchvolid))</Data>
    <Data Name="sqlvar">
    </Data>
    <Data Name="sqlstate">42S02</Data>
  </EventData>
</Event>

0 0
SELECTED ANSWER
replied on August 4, 2021

It looks like a bug related to the volumes on the Laserfiche server. This happens when the repository has more than 30 volumes that the current user can't access. We filed a bug report to investigate it further (bug#336714). One workaround is to run the search as a user with the "Manage Entry Access" privilege.

0 0
replied on August 5, 2021

Thanks to all who contributed to this thread.

1 0
replied on August 5, 2021

Unfortunately, the workaround doesn't work. I tried executing a search while logged in as Admin and still received the same error.

Jim

0 0
replied on August 5, 2021

Sorry to hear that, we are looking into it. To follow up further, please open a support case.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.