andrew.page
21st February 2004, 12:12
Since re-installing our BaaN server I can no longer have stored procedures switched on.

There is a setting in %BSE%\lib\defaults\db_resource:
msql_use_sp:0

Which disables stored procedures which I have set to work around the problem.

However if I remove this setting then I get the following 4 errors in the event log
Event Type: Error
Event Source: Baan
Event Category: Msql7_srv
Event ID: 1000
Date: 2/21/2004
Time: 10:57:19 AM
User: ESHQBAN01\baan
Computer: ESHQBAN01
Description:
Env Baan (D:\Baan)
Prog msql7_srv file \db\servers\MSQL\msql_odbc.c # 325
Keyword MSQL Error
Username baan type S language 2
Process 0x8e8
Lasterror 997 (Overlapped I/O operation is in progress.)
Errno 0
bdberrno 0
Message
dbs_errno = 510 Error 510 occurred:
Cannot open new ODBC connection for session bshell(main)
Flushed at \db\servers\MSQL\msql_odbc.c : #326.

when trying to log into BaaN.

Event Type: Error
Event Source: Baan
Event Category: Msql7_srv
Event ID: 1000
Date: 2/21/2004
Time: 10:57:19 AM
User: ESHQBAN01\baan
Computer: ESHQBAN01
Description:
Env Baan (D:\Baan)
Prog msql7_srv file \db\servers\MSQL\msql_error.c # 573
Keyword MSQL Messages
Username baan type S language 2
Process 0x8e8
Lasterror 0
Errno 0
bdberrno 0
Message
dbs_errno = 510 Error 510 occurred:
Error sqlcode 18456 (sqlstate: 28000, Return code: -1, diagRecNum: 1) during SQLConnect.
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'baandb'.
Flushed at \db\servers\MSQL\msql_error.c : #578.

and

Event Type: Error
Event Source: Baan
Event Category: Msql7_srv
Event ID: 1000
Date: 2/21/2004
Time: 10:57:19 AM
User: ESHQBAN01\baan
Computer: ESHQBAN01
Description:
Env Baan (D:\Baan)
Prog msql7_srv file \db\servers\MSQL\msql_error.c # 619
Keyword Suggestion
Username baan type S language 2
Process 0x8e8
Lasterror 0
Errno 0
bdberrno 0
Message
dbs_errno = 510 Error 510 occurred:
Check MSQL_INSTANCE='eshqban01'.
Check MSQL_SERVERHOST.
Flushed at \db\servers\MSQL\msql_error.c : #624.

and

Event Type: Error
Event Source: Baan
Event Category: Msql7_srv
Event ID: 1000
Date: 2/21/2004
Time: 10:57:19 AM
User: ESHQBAN01\baan
Computer: ESHQBAN01
Description:
Env Baan (D:\Baan)
Prog msql7_srv file \db\servers\MSQL\msql_odbc.c # 325
Keyword MSQL Error
Username baan type S language 2
Process 0x8e8
Lasterror 997 (Overlapped I/O operation is in progress.)
Errno 0
bdberrno 0
Message
dbs_errno = 510 Error 510 occurred:
Cannot open new ODBC connection for session bshell(main)
Flushed at \db\servers\MSQL\msql_odbc.c : #326.

and

Event Type: Error
Event Source: Baan
Event Category: Msql7_srv
Event ID: 1000
Date: 2/21/2004
Time: 10:57:19 AM
User: ESHQBAN01\baan
Computer: ESHQBAN01
Description:
Env Baan (D:\Baan)
Prog msql7_srv file \db\servers\MSQL\msql_table.c # 359
Keyword MSQL Error
Username baan type S language 2
Process 0x8e8
Lasterror 183 (Cannot create a file when that file already exists.)
Errno 0
bdberrno 0
Message
dbs_errno = 510 Error 850 occurred:
Executing Create Procedure failed.
See fatal SQL statement in 'D:/Baan/log/log.msql.mesg'.
Create Procedure failed for table 'dbo.tttadv450000'.
Driver reconfigured to prevent use of SPs!
Flushed at \db\servers\MSQL\msql_row.c : #264.

Any ideas?

Olaf vd Sanden
22nd February 2006, 09:32
Hi Andrew,

Did you get any answer on your problem?
Bye Olaf

andrew.page
22nd February 2006, 10:02
The problem was caused by the fact that baandb was not the database owner of the baandb database.

Ultimately it was solved with this SQL statement

USE baandb
GO
EXEC sp_changedbowner 'baandb'
GO

pokitlok
9th May 2007, 06:28
Recently I came across the same problem and found it is because BaaN application server cannot log in MS SQL database via BaaN User Group account (usually, as baandb in BaaN Doc). As creating stored proc and table, BaaN makes use of the BaaN User Group account to complete database works. Thus, the resolution is as below:

1. On MS SQL server, create database login, e.g. baandb, on local and other database instance with same password
2. Create user account for login baandb in BaaN's database and grant the user account the rights of [dbowner].
3. Login BaaN client with superuser and open session Maintain Database Groups (ttdba0120m000)
4. Add Database User Group "baandb" and set Create Group as "Externally"
5. Click [Create and Dump] and input database administrator and password to confirm
6. Repeat Step 5 under each company code

Please note the names of MS SQL login, database user and database are same, i.e. baandb.
:rolleyes: