Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2004
    Location
    Arizona
    Posts
    5

    Unanswered: limiting the number of concurrent connections to ASA 9 by a specific login

    I saw there is an ASE 12.5 method for limiting the number of concurrent connections to ASE by a specific login is there an equivilent for ASA 9?

    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524

    Re: limiting the number of concurrent connections to ASA 9 by a specific login

    On ASE, the ire trigger is used.
    Seems to me that ASA has NOT this behavior

  3. #3
    Join Date
    Jan 2004
    Location
    Arizona
    Posts
    5

    Re: limiting the number of concurrent connections to ASA 9 by a specific login

    Originally posted by fadace
    On ASE, the ire trigger is used.
    Seems to me that ASA has NOT this behavior
    I see that there is a login_procedure I am looking for a way to see if the end user is already logged in. The I could force a disconnect and login the new authinticated user.

    There is a login_check procedure for limiting overall concurrency. (I will let the license hand this) I am wanting to modify the login_check procedure to focus on just the current user logging in.

    Thanks.

  4. #4
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208

    Re: limiting the number of concurrent connections to ASA 9 by a specific login

    Originally posted by gjohnson3b
    I saw there is an ASE 12.5 method for limiting the number of concurrent connections to ASE by a specific login is there an equivilent for ASA 9?

    Yes.. there is LOGIN TRIGGER in ASA9..

    create procedure DBA.login_check()
    begin
    declare INVALID_LOGON exception for sqlstate '28000';
    // Allow a maximum of 3 concurrent connections
    if( db_property('ConnCount') > 3 ) then
    signal INVALID_LOGON;
    else
    call sp_login_environment;
    end if;
    end
    go
    grant execute on DBA.login_check to PUBLIC
    go
    set option PUBLIC.Login_procedure='DBA.login_check'
    go
    An alternative means to disallow a connection is by using the RAISERROR
    statement:

    CREATE MESSAGE 28000 AS 'User %1! is not allowed to connect there are
    already %2! users logged on';
    ALTER procedure DBA.login_check()
    begin
    declare INVALID_LOGON exception for sqlstate '28000';
    // Allow a maximum of 3 concurrent connections
    if( db_property('ConnCount') > 2 ) then
    RAISERROR 28000, connection_property('Userid'),
    db_property('ConnCount')
    else
    call sp_login_environment;
    end if;
    end

  5. #5
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524

    Red face Re: limiting the number of concurrent connections to ASA 9 by a specific login

    Originally posted by fadace
    On ASE, the fire trigger is used.
    Seems to me that ASA has NOT this behavior
    Sorry : bad info (I didn't correcly check the ASA version) !

  6. #6
    Join Date
    Jan 2004
    Location
    Arizona
    Posts
    5

    Re: limiting the number of concurrent connections to ASA 9 by a specific login

    Originally posted by willy_and_the_ci
    Yes.. there is LOGIN TRIGGER in ASA9..

    create procedure DBA.login_check()
    begin
    declare INVALID_LOGON exception for sqlstate '28000';
    // Allow a maximum of 3 concurrent connections
    if( db_property('ConnCount') > 3 ) then
    signal INVALID_LOGON;
    else
    call sp_login_environment;
    end if;
    end
    go
    grant execute on DBA.login_check to PUBLIC
    go
    set option PUBLIC.Login_procedure='DBA.login_check'
    go
    An alternative means to disallow a connection is by using the RAISERROR
    statement:

    CREATE MESSAGE 28000 AS 'User %1! is not allowed to connect there are
    already %2! users logged on';
    ALTER procedure DBA.login_check()
    begin
    declare INVALID_LOGON exception for sqlstate '28000';
    // Allow a maximum of 3 concurrent connections
    if( db_property('ConnCount') > 2 ) then
    RAISERROR 28000, connection_property('Userid'),
    db_property('ConnCount')
    else
    call sp_login_environment;
    end if;
    end
    I read this in the help file. This is useful but only limits total concurrent connections. I could modify this procedure to the limit user login to one connection per login. However I need a method for finding if the user id is already connected, then drop the current connection and allow the new connection.

    Thanks.

  7. #7
    Join Date
    Feb 2002
    Location
    Willy is on vacation
    Posts
    1,208
    You can do this by looking at sa_conn_info() to check if connection already exists.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •