Could not find stored procedure

  • 3 April 2007
  • 7 replies
  • 4 views

Badge +1
Hi there

I get this error every sec when running the K2 Server in consol mode.

A database error occured : Could not find stored procedure 'SELECT Originator FROM _ProcInst (NOLOCK) WHERE ID = @ProcInstID'.

Does any one have an idea about what store procudure it is complaining about and how to correct it

7 replies

Badge +10
Hi,

_ProcInst is a table in the K2 database.
I suspect that you have a permission issue in which the account that K2.net 2003 Server uses to connect to your database does not have access to this table.
To check which account is being used to connect to your databases, have a look at the K2Server.config file located in (C:Program FilesK2.net 2003Bin)
The <Database> and <LogDatabase> keys have the connectionstrings to both databases. If SQL authentication is used, the connection string will show you which user it is trying to use.
If Integrated authentication is used, then the account that you log on with while running K2.net 2003 Server in console mode must have access to the K2 and K2Log databases and should have dbo rights to both databases.
Please remember that K2.net 2003 Server in console mode will use the context of the currently logged on user. If this user is different from the service account used to run K2.net 2003 Server as a service, then I suggest that you use the "Run as" command to launch K2.net 2003 Server in console mode, specifying the service account as the user it should run as.

Hope this helps.

JohanL.
Badge +1
Hi,

We are using Integrated authentication and when I start the K2.net 2003 Server in console mode. I use the same user as when running under a service. And it seems that the Server is working. I can create instances and complete tasks. The user have full rights to the database. But I still gets this funny message.
Badge +1

Hi,


 Did you ever figure out how to fix this issue? We are currenlty getting this error in our test environment.


Thanks,


Holly

Badge +11

Hi Holly,


The root cause for this is either:
A. That the 'kOriginator' sproc does not exist or that the K2Server Service account has not got execute permissions on this sproc; OR
B. The parent IPC process has completed before the child IPC process could obtain the originator of the parent.


Case (B) is a known issue and can be worked around by implementing a 'keep alive' activity in the parent process - until the child can obtain the Originator name. I.e. Just make sure that the Activity containing the IPC Event is not the last Activity in the process - Add a dummy Activity with an empty server event (with a 5 or 10 second StartRule) after the Activity containing the IPC Event.


HTH,


Ockert

Badge +7

Hi Ockert,

I hit this problem today in a development environment - and I found this thread when looking for cause.

The problem was case (B) as above - the parent process had completed before the child process had got the originator name. Fine - your workaround worked perfectly.

However I was stuck in the situation where I was seeing the error message (usually run the K2 server in console mode while developing) every second. However there was no process instance for me to "stop" in service manager. Restarting the K2 Service did not help.

I was able to resolve the issue by using the database cleanup stored procs to delete all process instances. This was fine as it was a test environment however I am curious as to what we might have done had this occurred in production?

Many thanks, Richard

Badge +6

This happens when an IPC child process is started as 'Originator' (Asynchronously) but the parent process completes before the IPC is started.


Unfortunately the IPC entry is already in the database which causes a continuous attempt by the K2Server to start the process hence the high number of error messages.


This error should be picked up in development but if it somehow slipped into production contact your local support team. Do not attempt to delete anything from the K2 databases. This will cause havoc.


HTH

Badge +7

Thanks Conrad.

I suspected as much... As you say should be caught before going to production, but mistakes do happen. Good to know what course of action to take in that eventuality.

Cheers! R 

Reply