26

Re: Recorder Network Setup

Hi Alan

Just to reassure you that improving the network installation guide is one of our major priorities in terms of improving Recorder 6.

I would very much welcome any idea's you or any other users have on the specific areas we could focus on. For example at the moment my list of suggestions asks for more information on; Logins, permissions and user groups, registry settings, and any ‘clean up’ required prior to installation.

My knowledge of network installations is somewhat limited so I hope these list items make sense.

Please let me know if there any other particular areas where you think more help is needed

Many thanks,

Sarah

Sarah Shaw,
Biodiversity Information Assistant,
JNCC

Sarah Shaw
Biodiversity Information Assistant
JNCC

27

Re: Recorder Network Setup

Alan and Rob: We have a user group for our staff which we use to apply permissions. We have mapped this user group to the NBNData database and also assigned the database roles of db_datareader, db_datawriter and public to NBNData (see SQL Books Online to see what permissions these grant). Recorder on our network seems to be able to run with only the public role, but I've had discussions with some that can only get Recorder to run if they assign the db_owner role (otherwise they get an EOleException: Login Failed for user 'DOMAIN\User'). Perhaps John could clarify what database roles should be assigned?

John: I've been working on the 'crash on startup issue' today and yes, I found the cause. It's a bit strange, but here's the deal (I'm going to be extra verbose in my description so others can make use of the techniques I've employed):

We created a new restricted user on the network so that we knew their profile was completely 'clean'.

I did a fresh workstation install onto a new laptop logged in as me (an administrator) and confirmed Recorder was working. It was.

I then logged out and logged in as our new restricted user and tried to run Recorder and got the crash.

So, I ran Regmon by right-clicking its .exe and choosing "run as..." then running it under my user account. This is an important step - you need to run regmon under a restricted user account in order to properly analyse what registry write, if any, is causing the crash. The trouble is, Regmon can only be run with admin priviledges, hence the need to 'run as...'

Once running I set Regmon to filter on 'recorder*' and registry writes and errors only.

I tried running Recorder again and voila, I get several ACCESS DENIED registry entries. It's the last one that appears to be causing the crash. Here's the key that Recorder is trying to write to:

HKEY_CLASSES_ROOT\TypeLib\{801EBE82-91CE-11D3-B564-005004B0B698}\1.0\0\win32

And here is what the key already contains:

\\DOMAIN-02\Data$\SWTBRC\Recorder 6 Server\Recorder.ex_

A restricted user doesn't have permission to write to this key in the registry, and so I assume that when it tries to do so, Recorder crashes.

What is odd is that this path is OK. I can CD to \\DOMAIN-02\Data$\SWTBRC\ no problem, so why is Recorder trying to rewrite it?

Further analysis reveals this:

Recorder is installed on our T:\ drive, which is mapped here:

\\domain-02\data$\swtbrc

which is identical apart from the case. Now here's the odd part: if I disconnect the T:\ drive an remap it to:

\\DOMAIN-02\Data$\SWTBRC\

in order to exactly match the existing registry key, then Recorder starts when logged in as the restricted user.

Obviously, the reason this crashing problem kept coming back is because our T:\ drive is getting automatically remapped to its initial, lowercase, path.

I reckon this is probably classed as a bug: Recorder shouldn't be trying to rewrite that registry key simply because it has case differences.

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

28

Re: Recorder Network Setup

I've just uploaded a screenshot showing the crucial part of our security config for SQL Server.

http://forums.nbn.org.uk/uploads.php?file=logins.png

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

29

Re: Recorder Network Setup

Charles

When you installed Recorder Workstation (as local admin) did you install it from the T drive mapping or the UNC path?  My typelib is registered against the drive mapping so I don't get the problem.

I'm not sure I can do much to fix Recorder on this one because the registration of the type library occurs automatically since Recorder is a COM server.

John van Breda
Biodiverse IT

30

Re: Recorder Network Setup

I don't remember exactly how I installed each individual workstation, but I am pretty sure I would have installed it from the drive mapping, rather than the UNC path. Is that what you mean? In other words, I went to T:\Recorder 6 Server\ (as opposed to \\server-02\BRC\Recorder 6 Server) and ran WorkstationSetup.exe.

Charles

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

31

Re: Recorder Network Setup

Hi ,

to resolve the ODBC/ linked Access table error, we have finally got the solution. Yes you're going to yell loudly here...

Make sure you have Access installed on the server.

Then it works

I can now open NBNData.mdb remotely, run queries etc.

It's always the simple things is it not?

Many thanks for all help over the past wee while,

We also may have cracked how to run R6 as a restricted user, will be back after some testing!

Cheers now, Rob.

32

Re: Recorder Network Setup

Good news indeed, though I have to confess I am confused as to why installing Access on a server makes any difference when running it from a client, since it is not a client server database. But if it works, great!

John van Breda
Biodiverse IT

33

Re: Recorder Network Setup

Hi all - I've been away for a bit, and just picking up on this again now. The first thing I have to confess is that I am very confused about the relationships, when using "Trusted Connection" authenication between Windows Users, database users on SQL Server and "Logins" on SQL Server.

In between cogitating on this I've carried out another fresh install, as Administrator on both client and server machines. Having established Recorder was runing OK from the Admin account on the client machine, I tried running as a) an ordinary User and b) a Power User. In the first instance I get a dialog prompting for  user on the server. Even if I enter an Administrator user here I still get a message "Login failed for user. The user is not associated with a trusted SQL Server connectiuon" If I try to run Recorder as a Power User I am not prompted fro a user on the server, but still get the same login error message.

I'm sorry if I'm missing the answer to all this in postings already made.

Thanks

Alan

Alan Hale
Aberystwyth

34

Re: Recorder Network Setup

Having looked at this some more can I  present my (flimsy) understanding of how a "Trusted Connection" is supposed to work, and ask people to comment?

1. Server and workstation machines must be part of the same Windows Domain

2. Users must have a  Domain login.

3. Either individual logins or (better?) a custom Group can be registered as a login in SQL Server, and given appropriate permissions in SQL Server.

4. A login registered in SQL Server can be associated with a particular database (or databases) e.g. NBNData, and when this is done a new user is created in that database. So you essentially access the database from your Windows account via this user.

If all the above is correct, I'm still not sure I understand how the "NBNUser" set up by a Recorder install fits in.

I'd be glad of further enlightenment.

(Sarah - I've noted your posting on the need to improve the network installation guide - thanks. I think my own postings here probably illustrate where I think the guide is deficient, but when I feel I have grasped how it is all supposed ot work I might be in a better position to comment further on requirements for improving teh guide).

Many thanks

Alan

Alan Hale
Aberystwyth

35

Re: Recorder Network Setup

adhale wrote:

1. Server and workstation machines must be part of the same Windows Domain

Not 100% sure on this. All I know is that our server and workstations are definitely part of the same domain.

adhale wrote:

2. Users must have a  Domain login.

Yes.

adhale wrote:

3. Either individual logins or (better?) a custom Group can be registered as a login in SQL Server, and given appropriate permissions in SQL Server.

Yes.

adhale wrote:

4. A login registered in SQL Server can be associated with a particular database (or databases) e.g. NBNData, and when this is done a new user is created in that database. So you essentially access the database from your Windows account via this user.

When you map a Windows account or group to a SQL Server login (which grants access to the server), and then map the login to a database (which gives access to the database within the server), you are effectively giving that Windows account (or any account within the Windows group) access to that database. You then assign roles to the login, which grants the user particular privilages within the database, such as db_datareader and db_datawriter. If I've understood you correctly, there isn't an intermediate user created. You can create users within SQL Server, but this is for situations when you're not using a Windows trusted connection. It's better to use Windows trusted if you can; creating and managing users in SQL Server is there as a backup if Windows trusted isn't available for whatever reason.

That's all a bit jumbled so I hope it makes some semblance of sense.

adhale wrote:

If all the above is correct, I'm still not sure I understand how the "NBNUser" set up by a Recorder install fits in.

I'm not 100% sure on this either, but I'm fairly certain it's the principal that logs in when you're using standalone, non-trusted authentication. It's one of the SQL Server managed users I referred to above. I'm sure someone from Dorset or JNCC will correct me if I'm wrong, though. :)

Charles

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

36 (edited by adhale 24-08-2006 16:18:30)

Re: Recorder Network Setup

Thanks Charles - this does a least confirm I'm not completely off-track.

I've been wondering if the problems that I've experienced (Recorder not being accessible from accounts other than Admin) are because the two (virtual) machines I'm using as server and client are not actually  within a domain - they are networked in a workgroup, i.e. peer-to-peer. So  the logins are specific to each machine, rather than being domain logins - if that makes sense! :/

Cheers

Alan

Alan Hale
Aberystwyth

37

Re: Recorder Network Setup

Have been away a few days and just picked up this thread again. It sounds like you are on the right track. To confirm:

1) The NBNUser login is used by Recorder when you don't use the Trusted Connection option. It allows Recorder to get read only access to the data - enough to verify the Recorder user login details and switch on the appropriate level of database access (using Application Roles if anyone is interested).

2) For a network user to be trusted on an SQL Server, there must be a database login set up which fully recognises that user. I don't think it will work in a workgroup environment. If you use more than one domain this is Ok, as you can prefix the username when you set up the database user as follows: DOMAIN\Username.

John van Breda
Biodiverse IT

38 (edited by adhale 04-09-2006 07:55:04)

Re: Recorder Network Setup

Hi John, welcome back and thanks for this. I have since my last posting tried setting up a dedicated Windows account on the server machine, mapping this as a SQL Server login (with appropriate permissions) and mapping this to NBNData. Then, when I try to connect as an ordinary user from the workstation and get a prompt to enter a login, enter the details of this account on the server (hope you're still with me!). It's rejected as a Trusted Connection - so I guess you are right, this will not work with workgroups (though I'm still puzzled why it works at all, with the admin account used to do the workstation install.

It does leave us  with a problem  at CCW, where our network is based on Netware. As I understand it from our network admin, we don't use Windows domains at all. Central authentication is done by Netware which gets passed account details from individual workstations when people login. At the moment we cannot see how to get Recorder 6 working for multiple users in this network environment.

Regards
Alan

Alan Hale
Aberystwyth

39

Re: Recorder Network Setup

Alan,

In this case, you are forced to use the default connection type which is not trusted. Then Recorder will create and use its own NBNUser login for authentication, and you will not have to worry about all the connection options discussed in this thread. Its a much easier option which is why its the default.

John van Breda
Biodiverse IT

40

Re: Recorder Network Setup

Is there any disadvantage to doing it through SQL Server authentication? As you say, all the discussion in this thread has revolved arround setting up Trusted Connections.

Alan

Alan Hale
Aberystwyth

41

Re: Recorder Network Setup

The main reason for supporting Trusted connections would be if you have an existing SQL Server with a database administrator who does not want additional logins cluttering up the server. They may be used to controlling access to applications through windows logins and trusted connections and would prefer to continue that way. They would be able to prevent users getting into Recorder at all (even if they have a login within the application) so there is an extra level of control through trusted connections.  Having said that I doubt that this is necessary for the vast majority of Recorder users.

My personal recommendation would be to stick to the default option, unless you have a good reason not to and need to use trusted connections.

John van Breda
Biodiverse IT

42

Re: Recorder Network Setup

Just back from 2 weeks leave and starting to pick this up again, by re-installing from scratch, but this time setting up with SQL Server (rather than Windows) Authetication. 

At the stage "Create the Recorder 6 database and attach it to your instance of SQL Server/MSDE" you are prompted for a server login (if you don't choose trusted connection). The default is "sa" with no password. My first question is  -why isn't the defult here the NBNUser login created by Recorder 6?. Secondly, if I want to set the server login here to NBNUser, what is the password on this login? Thirdly, would it work if I created my own custom login on the server beforehand and entered it here? Bear in mind that I want to transfer the database to SQL Server 2005 once I have done the preliminary installation, so using "sa", no password will not be an option.

Thanks

Alan

Alan Hale
Aberystwyth

43

Re: Recorder Network Setup

The installation tool is asking you for a login with System Administrator privileges, which is 'sa' with blank password on a default MSDE install. The NBNUser login is used by Recorder for limited access to the NBNData database, and is a completely different login to the login required for installation which needs admin rights in order to set up the database correctly for you.

John van Breda
Biodiverse IT

44 (edited by adhale 18-09-2006 16:49:12)

Re: Recorder Network Setup

OK, thanks for that clarification. When I move to the database to a SQL Server 2005 instance, I imagine I will need to create an NBNUser login at the server level for this to work?

Alan Hale
Aberystwyth

45

Re: Recorder Network Setup

Assuming you are using the standard method of authentication (i.e. not trusted) from Recorder, then yes. Also, having done the move you should run the following script to ensure that the database and server versions of the NBNUser account are properly joined:

EXEC sp_change_users_login ‘Update_One’, ‘NBNUser’, ‘NBNUser’
John van Breda
Biodiverse IT

46

Re: Recorder Network Setup

Thanks John. And what is the NBNUser password? Do I not need this to set up the server level login?
Alan

Alan Hale
Aberystwyth

47

Re: Recorder Network Setup

There's is information on this account in the Network Installation Guide on the CD - under the section entitled "Recorder 6 Database Security". Its probably best to read that information before proceeding.

John van Breda
Biodiverse IT

48

Re: Recorder Network Setup

I've now at least got this working on MSDE, though not without numerous problems, some of which are documented below

I firstly did a standard installation on the server machine leaving all the options at default except for giving the MSDE instance a custom name (RECORDER_MSDE). Everything seemed to go OK. I checked with Management Studio and a) I could connect to MSDE; b) NBNData was attached; c) NBUser was registered as a Login and mapped to NBNData d) I could login to the MSDE instance using NBNUser. I shared the Recorder 6 Server folder and on the client machine mapped a network drive to this folder and ran the workstation installation. This appeared to go without hitch. However, when I tried to run Recorder 6 from the shortcut I just got an exception dialog ""SQL Server does not exist or access denied".

I then tried another installation leaving the MSDE name at the default "RECORDER". This caused its own problems in that this instance could not be found when the install tried to attach NBNData. Nor could Management Studio connect to it (though it appeared in the list of installed servers). It turned out the instance had been registered with just the computer name - i.e. instead of "ComputerName\RECORDER" it was registered as "ComputerName". Having established this I continued with the rest of Recorder 6 installation, and could connect to and run Recorder from the workstation.

So it appears that a) this won't work if choose a custom name for the MSDE instance; b) it stil won't work if you use the default name, unless you recognise when attaching NBNData that MSDE instance name is truncated to just the computer name.

I've come across a number of other inconsistencies with the installation process, but I'll report those separately to avoid over-complication.

Any comments please?

Alan

Alan Hale
Aberystwyth

49

Re: Recorder Network Setup

Further to my last posting, I've realised that one of the issues arose from my misinterpretation of one of the install dialog boxes. Thus, I'd assumed the Recorder install defaults the MSDE instance name to "Recorder" (this name remains in the correspoding text box even when "I want to specify my own server instance name" is unchecked - this suggests to me the name defaults to "Recorder").

Anyway, the point still remains that, apparently, the MSDE instance is only found by the workstation if its name is left at default (i.e. no name).

Furthermore, it seems to me that, whether you use Windows authentication or SQL Server authentication, you are probably going to require a domain-based network. It does not seem to be that you can install the Recorder workstation as an administrator and then that any other users on the client will be able to access Recorder (as John V suggested would be the case) unless they are domain registered users. This is because of permissions governing access to the shared folder on the server machine. The only other alternatives I can see is that either you have each Windows user login details duplicated on the server, or have everyone login as the same specific user whose login details are replicated on the server. I suppose either of these options are feasible, if not ideal.

Alan

Alan Hale
Aberystwyth

50

Re: Recorder Network Setup

Hi Dan,

Can you clarify what you are trying to do? Are you using a VPN to try and access Recorder on a remote SQL Server, or are you actually doing the install? The install of database files must take place on the actual server.

Thanks

John van Breda
Biodiverse IT