TIBCSecurityService: Cannot attach to services manager

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
monkeymynd
Posts: 12
Joined: Thu 04 Dec 2008 23:08

TIBCSecurityService: Cannot attach to services manager

Post by monkeymynd » Thu 18 Mar 2010 16:40

I'm unable to add a user via the TIBCSecurityService. Wondering if anyone has encountered this before? It is working on some machines, but not on others. For instance, it will work on one Vista machine, but not the other. Also, not working on Windows 7 machine, but we only have one of them here for testing.

When calling TIBCSecurityService.Attach, I get an error 'Cannot attach to services manager'.

Any help would be greatly appreciated.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Mon 22 Mar 2010 07:22

Hello

To resolve your issue I need to know version of Interbase that you use, OS where Interbase is installed and OS where the client is installed.

monkeymynd
Posts: 12
Joined: Thu 04 Dec 2008 23:08

Post by monkeymynd » Wed 24 Mar 2010 14:08

bork wrote:Hello

To resolve your issue I need to know version of Interbase that you use, OS where Interbase is installed and OS where the client is installed.
Using IB 6 on Windows 7. Executable is running locally on the same machine.

monkeymynd
Posts: 12
Joined: Thu 04 Dec 2008 23:08

Post by monkeymynd » Wed 24 Mar 2010 20:24

I seem to have gotten past the user creation. At this point, it is working, it just takes a very long time. But, I am now getting an error when I call IBCConnection.CreateDatabase.


"operating system directive CreateFile failed

The requested operation cannot be performed on a file with a user-mapped section open."


The code is a follows:

Code: Select all

    MyDatabase.Database := ExtractFilePath(Application.ExeName)+DATA_PATH+DATA_FILE_NAME;
    MyDatabase.Params.Clear;
    MyDatabase.Params.Add('SERVER ''MINIPC1''');
    MyDatabase.Params.Add('USER ''MYUSERNAME''');
    MyDatabase.Params.Add('PASSWORD ''mypassword''');
    MyDatabase.Params.Add('PAGE_SIZE 4096');
    MyDatabase.CreateDatabase;
[/code]

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Thu 25 Mar 2010 12:32

TIBCSecurityService manages users for the whole InterBase server (not for a single database). Therefore independently on database location (local or remote) application must connect to InterBase server by TCP protocol to the 3050 port. If you try to connect to InterBase server by TCP protocol you can get error "Cannot attach to services manager" in two cases:
- FireWall on the computer doesn't allow to connect to the 3050 port.
- Only InterBase 2007 SP1 is certified for Windows Vista. InterBase 6 and InterBase 7 sometimes can be installed incorrectly on Windows Vista and Windows 7. If installation was incorrect then InterBase 6 and InterBase 7 don't listen to the 3050 port and you cannot connect to server by TCP protocol to the 3050 port. In this case database can work correctly if you try to connect locally. But you cannot manage users because you cannot connect to port 3050.

Error "Operating system directive CreateFile failed. The requested operation cannot be performed on a file with a user-mapped section open." can arise if you try to edit or recreate a file that is blocked by another application. In your situation this error can arise if your try to create database with a file name that already exists and is used by some application (including recreating an existing database).

Post Reply