vishbaan
27th October 2005, 18:11
dr fans,

In a working server, as installed we had the baandb, 001/002 databases were existing with baan user working.

I wanted to add a new database baandb2. (idea was to link a company and its tables to a new physical database of SQL 2000)

I created in Maintain Database Groups, but it didnt create; I created in SQL server using the steps same as that of baandb.
from SQL 2000 Enterprise Manager I did the following:
new db : baandb2;
new user baandb2;
new user baan2;
new role baandbg2 to baandb2
and database access for baan2 user I checked the role baandbg2.

in baan, I created a new database definition as 004.
I added 004 to database group baandb2.
finally, one existing user xxx I linked to 004 using Maintain links between Baan user and RDMS user; Dump users reported error hence I did upload user file; It asked for DBA password I gave the same as the sa password of SQL2000.

after this no users are able to login to baan (this was a working server).

not even the baan user is able to login.

I get the BW error as follows:

Error : bdb_errno 514 on ttadv999
Fatal Error : Error 514 (Security error; Probably no permission) on ttadv002000 in db first.

can u pls tell me advise me most URGENT pls....

VISH

Nandan
28th October 2005, 20:28
Restore the file $BSE\lib\msql\msql_users file and check if u can connect to Baan.

vishbaan
30th October 2005, 08:15
dear nandan,

thank you so much, nandan.

the file mssql_users and mssql_users- were empty and had 0 bytes.

I copied from another server the same file and it worked for the baan user. you are great and thanks so much, it helped me with no downtime.

can you please give me an idea, as installed;

1) what all the users involved and how they are handled by baan;
Eg:
baan as OS user;
baandb/baandb user in SQL 2000;
baandbg role in SQL 2000;
users from within baan;
and in Maintain RDBMS Admin, it asks Enter DBA password, what is password supposed to be....?

2) How to create a new database like baandb say baandb2 and attach few companies/tables under the baandb2.

Thanking you in advance, have a good week-off.

VISH

Nandan
31st October 2005, 21:12
Hi Vish,

Good to know that your system is back on track.

I am attaching a document, which I had prepared some time back for doing the Baan Installation using existing Baan installation, without using Normal installer procedure. This may help you.

I would be able to answer your question later, as it is Diwali Time.

BTW, HAPPY DIWALI AND PROSPEROUS NEW YEAR TO YOU AND TO ALL THE FANS OF THIS FORUM!!!!!!!!!

vishbaan
1st November 2005, 08:22
tks nandan, I will go thru it full;

Still, once you are back, pls let me know the possibility of adding another baandb (say baandb2) under the same instance.

and where are you currently placed, aren't you coming to DXB these days.. take care.

Have a thunderous Deepavali.

VISH

PBforBaan
3rd November 2005, 18:15
As far as i can remember we faced the same Problem in an Oracle-Environment.
The Solution was quite smple:
Keep the Group Users of both databases equal in Name and Password.

The reason for this is, that (in our case) Baan (c4) was not able to manage more than one Databasegroup. It always took the first Groupuser in the list.

Give it a try.

Nandan
15th November 2005, 09:29
1. What all the users involved and how they are handled by baan.
Three users are invloved.

OS User - Authetication Purpose
Baan User - Application user.
Database User - For accessing database on behalf of Baan user


Baan user and the OS user mapping is stored in the maintain user data. Upon logon the username and password of the OS user is dispacthed to OS subsystem for authetication. (OS in tern can use local authetication, domain authentication, NIS etc)

Once authenticated at OS level, baan now retrives database username/password and group username/password.
This information is collected based on the database driver assigned (tabledef6.1/2 runtime information of assign tables by databases)
Hence, if database driver specified is of the type oracle, files ora_users and ora_groups from $BSE/lib/ora are used. In case of MS SQL msql_users and msql_groups from $BSE/lib/msql are used. (Similar in case of Informix and DB2).
Exception is Baan Base, no such mapping is required as Baan Manages it by itself.

File Formats:
msql_users/ora_users........
<baan user>:<database user>:<encrypted password>:<group name>

msql_group/ora_group...........
<group name>:<encrypted password>

In case of MS SQL baan, always uses the database name same as group name. (Please check the MS SQL driver internals). And intrestingly, user same as group name is created and granted the dbo permission at the time of installation. That means, dbo and database are same and are indentified by group name.

Baan uses "group name" (dbo) at the time of creation of tables. This implies, all the objects created by baan are owned by group name. Now for users to have permission (delete etc), Baan creates a another role (<group name>g). This role is given necessary permissions at the time of installation.

If you trace the db calls (dbslog = 1600), for creation of tables, you can find this.

MSQL LOGON to database <baan> user <baan> Connection SUCCESSFUL id 6124312
>>owner_execute Table <dbo.tnacom900662> Login name Group Action 1 Arg 0
SQL> CREATE TABLE dbo.tnacom900662 (t_name CHAR(35) NOT NULL,t_date DATETIME NOT NULL,t_Refcntd INTEGER NOT NULL,t_Refcntu INTEGER NOT NULL,hash1 BINARY(35) NOT NULL)... SQLSetStmtAttr(NOSCAN) Done. ... SQLSetStmtAttr(QUERY_TIMEOUT) Done. ... SQLSetStmtAttr(QUERY_TIMEOUT) Done.
owner_execute Done...<<
>>owner_execute Table <dbo.tnacom900662> Login name Group Action 8 Arg 0
SQL> GRANT SELECT, INSERT, UPDATE, DELETE ON dbo.tnacom900662 TO baang... SQLSetStmtAttr(NOSCAN) Done. ... SQLSetStmtAttr(QUERY_TIMEOUT) Done. ... SQLSetStmtAttr(QUERY_TIMEOUT) Done.
owner_execute Done...<<
Note:
Database/group name : baan
Role Name: baang

and in Maintain RDBMS Admin, it asks Enter DBA password, what is password supposed to be....?

I guess, it is password for user "sa"

The remaining query, I will answer later.....:) (Too much of writting for today)

vishbaan
17th November 2005, 10:20
hi

thanks for the good details.

is it possible to create an additional physical database like baandb ?
Eg: baandb2

bcos we have problem maintaining all company data under one sql database i.e, baandb.

the requirement is,
to create a number of baandbs (physical databases in SQL) for a range of company data.

Eg:
company 000-100 in baandb
company 110-200 in baandb2
company 210-300 in baandb3

will it be possible. How folks, nandan hv you done this anytime, it will help

thanks

VISH

Nandan
23rd November 2005, 11:08
Not possible to create the the different databases in the same instance, accessed by the same Baan environment. Unless you copy the 000 company in every database you create in the same sql server instance, I guess.
This is due the reason that, baan reads the group file, it gets the first entry for the user and it uses that group as the the database name. If "000" tables are not found in that database it will throw error.

However, if your inention for having the setup you are describing, is to seperate the companies by storage. (to gain on performance). Then you can consider using "filegroup" option in msql_storage file. (This is similar to using tablespace clause in case of oracle). Create a new filegroup in the databse used by baan, with the files residing on the different disk. Specify this filegroup in the $BSE\lib\msql\msql_storage.

Here is a sample entry.

*:888:T:group:T::011:5:filegroup test
*:888:I::011:5:

vishbaan
1st December 2005, 16:43
Dear all and Nandan

we got it worked with multiple SQL server instances.

Created a new SQL instance; Created the baandb;baan user; baan dbg role

in Baan created a new database definition say 003 with parameter MSQL_SERVERHOST=servername\instancename;

attached selected baan coy to the new database definition pointing to new SQL instance; and there it is; it worked;

So we are now able to put companies data in different baandbs.

Thanks to you all.

VISH