Store Operations Business Rules error. Can't launch Store Operatio

When trying to launch Store Operations I get an error:

Store Operations Business Rules

Error #-2147467259 Unspecified error (Source: Microsoft OLE DB Provider for SQL Server) (SQL State: ) (NativeError: 0) No Help File available

SET NOCOUNT ON SELECT * FROM VersionHistory ORDER BY ID DESC

When I press okay, another error shows up: Invalid Database Unable to check current database version. Verify that the selected database is valid.

----------- Headquarters client has an error:

Error -2147467259: Unspecified error Error 91: Object variable or With block variable not set (Unhandled Error, state = '7')

----------

When I try to connect to the database through Store Operations Administrator:

Connect Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services.

If any help could be provided, I'd sure appreciate it. Right now we can't do anything and the weekends are our busiest time (we're having to turn customers away). I can't get to the database to backup things (or can I?) otherwise, I'd reinstall the software, etc. As it is, I'm stuck. Thanks.

Reply to
sbb
Loading thread data ...

Another detail is when I restarted the computer and Headquarters client launched, I get this error:

Error #-2147217900 Internal Query Processor Error: The query could not produce a query plan. For more information, contact Cusomter support Services. (Source: Microsft OLE DB Provider for SQL Server) (SQL State: 42000) (NativeError: 8624) ...

if EXISTS (select * from >

Reply to
sbb

From SO Administrator, launch Integrity procedure.. your database seem damaged.. or you use a non Store Op. databases..

cod

Reply to
cod

Sounds like you may have to resync your stores. Let's see if there is someone out there who knows better.

-J

Reply to
JerryData

Hi, I finally got things working by manually copying the database files (mdf etc.). I couldn't do any repairing / reindexing through SO admin because it wouldn't connect to any databases, thus leaving all options greyed out. The only thing I could do through SO Admin was try to connect. So I copied the files to a new computer with a db server working (SQL Server 2005 express), and used Management Studio to make a backup of the database. Then I uninstalled and reinstalled everything on the original computer and restored the database. Whew. It worked. I'm sure there was a better option, but ...

So, everything is working fine now except HQ client. It launches in the backgroung, but I can never get to the GUI. I can see the process in task manager, but I think it's frozen. I've uninstalled and reinstalled it (plus the service pack), but it just does the same thing. I'm stuck there.

Thanks for the resp>

Reply to
sbb

Hopefully this helps somebody. I was getting this error running SQL Server

2008 SP1 64-bit on a Windows Server Enterprise 64-bit with 16GB of RAM.

I was consistently getting the following error while automatedly reloading a database in a development environment:

Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services.

The process just uses a batch file driver (.BAT, DOS) to load scripts based upon a certain load order that I'm dictating (so, DDL scripts first, followed by object - stored procedures, views, functions - definition scripts, followed by loading of lookup tables, followed by loading of other data, etc.). Running the script from within SSMS didn't have much luck either as doing so caused the same internal query processor errors to occur from within SSMS (just as they were when running the script from a .BAT file). However, after some trial and error, I discovered that if I opened the script that creates the stored procedure from within SSMS, run it (the script effectively drops/recreates the SP), and then ran the data load script that all was fine. (Hmm, must be a session setting, right?) More trial and error pointed me to a couple of common themes: 1) I was using a HIERARCHY data type in the stored procedure (the table it was doing the insert for had a column with a HIERARCHY data type), and 2) I didn't have a SET QUOTED_IDENTIFIER ON at the top of the SP. Once I added that to the top of the SP definition, all worked fine.

So, to summarize, this bug appears to occur on SQL Server 2008 SP1 (probably in other versions as well) when the two things mentioned above are occurring. To fix, be sure to always include SET QUOTED_IDENTIFIER ON at the top of your stored procedure definitions when you have a HIERARCHY data type.

So, if your stored procedure definition looks like this...

IF EXISTS (SELECT * FROM sys.objects WHERE object_id OBJECT_ID(N'[dbo].[uspInsert...]') AND type in (N'P', N'PC')) DROP PROCEDURE [dbo].[uspInsert...] GO

CREATE PROCEDURE [dbo].[uspInsert...]( )

Change it to look like this...

SET QUOTED_IDENTIFIER ON;

IF EXISTS (SELECT * FROM sys.objects WHERE object_id OBJECT_ID(N'[dbo].[uspInsert...]') AND type in (N'P', N'PC')) DROP PROCEDURE [dbo].[uspInsert...] GO

CREATE PROCEDURE [dbo].[uspInsert...]( )

Once I took care of that, the auto-load scripts ran without a hitch. Obviously, please note that this may not be the only set of circumstances that cause this error.... but maybe the info contained herein will help you to figure out what your particular situation is. Raul

Reply to
salsafreak

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.