terminal server and tessitura v11

So I did my research and it looks like i will need to implement a vb script to fix the ini file so that each connection via RDP has a unique hostname. The problem is how do I update the tx machine location at the same time? I have 400 users who work remotely and locally. I can't imagine having to sit here and manually create TX locations for each user. Thanks

 

 

Parents
  • You can create a stored procedure to do this by selecting from T_METUSER.

     

    I created a routine that created 5 machine locations per user to support each user having 2 live connections, and 1 for each of the dev/testing environments. 

     

    It runs every time a new user is added and builds matching locations for any that don’t exist.

     

    Since there are 5 locations it appends the number 1-5 to the user name; so that each environment has a unique machine location.  Then you can have 2 live and multiple test sessions running concurrently.  I believe the that rollout script for the rdp connections triggers the sql procedure.

     

    The procedure looks more or less like this:

     

    drop table #tx_machine_location

    create table ##tx_machine_location(

          machine_no  int identity,

          machine_name varchar(16),

          location int)

         

    insert into #tx_machine_location

    select SUBSTRING(fname,1,1) + SUBSTRING(lname,1,14) + '5' as machine_name,1

    from  t_metuser m

    where not exists (select * from TX_MACHINE_LOCATION where machine_name  = SUBSTRING(fname,1,1) + SUBSTRING(lname,1,14)  + '5')

          and inactive = 'N'

          and location <> 'Admin Processing'

     

    declare @end_machine_no int

     

     

    select @end_machine_no = (select MAX(machine_no) from TX_MACHINE_LOCATION)

     

    insert into TX_MACHINE_LOCATION(machine_no,machine_name,location)

    select @end_machine_no + ml.machine_no,

          machine_name,

          location

    from #tx_machine_location ml

     

     

    From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of John Lee
    Sent: Thursday, April 03, 2014 11:35 AM
    To: llindvall@cfl.rr.com
    Subject: [Tessitura Technical Forum] terminal server and tessitura v11

     

    So I did my research and it looks like i will need to implement a vb script to fix the ini file so that each connection via RDP has a unique hostname. The problem is how do I update the tx machine location at the same time? I have 400 users who work remotely and locally. I can't imagine having to sit here and manually create TX locations for each user. Thanks

     

     




    This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!

  • Thanks that helps a lot. I only need 2 locations live and test. So the script triggers when they log in via RDP. That's interesting

  • Because our Terminal Server can only pick up Windows login which is different (occasionally very)  from  the Tessitura login we added a sql call to the start up script. which calls the following stored procedure (with windows username although this has to be truncated to 16 characters in both the stored procedure and the vbscript that creates the ini file as we did have one user with a very long username), this is called before the ini file is created and Tessitura is started.

    CREATE PROCEDURE [dbo].[LP_ADD_NEW_MACHINE_LOCATION]
    (
                 @username varchar(30)

    AS

    Set NoCount On      

    BEGIN

    select @username=left(@username,16)

            if exists (select 1 from TX_MACHINE_LOCATION m(NOLOCK) where m.machine_name=@username and m.location is null)
          begin

                  update TX_MACHINE_LOCATION
                  set location=14
                 where machine_name=@username
          end

           if not exists (select 1 from TX_MACHINE_LOCATION m(NOLOCK) where m.machine_name=@username)
           begin

                  declare @next_id int    

                  select @next_id=MAX(machine_no)+1
                  from TX_MACHINE_LOCATION

                   insert into TX_MACHINE_LOCATION (machine_no, machine_name, location, create_dt, created_by, create_loc, last_update_dt, last_updated_by)
                 values(@next_id,@username,14,GETDATE(),'tessitur','vs-l-tess-32',GETDATE(),'tessitur')

            end

     

    END

     

    Mark

Reply
  • Because our Terminal Server can only pick up Windows login which is different (occasionally very)  from  the Tessitura login we added a sql call to the start up script. which calls the following stored procedure (with windows username although this has to be truncated to 16 characters in both the stored procedure and the vbscript that creates the ini file as we did have one user with a very long username), this is called before the ini file is created and Tessitura is started.

    CREATE PROCEDURE [dbo].[LP_ADD_NEW_MACHINE_LOCATION]
    (
                 @username varchar(30)

    AS

    Set NoCount On      

    BEGIN

    select @username=left(@username,16)

            if exists (select 1 from TX_MACHINE_LOCATION m(NOLOCK) where m.machine_name=@username and m.location is null)
          begin

                  update TX_MACHINE_LOCATION
                  set location=14
                 where machine_name=@username
          end

           if not exists (select 1 from TX_MACHINE_LOCATION m(NOLOCK) where m.machine_name=@username)
           begin

                  declare @next_id int    

                  select @next_id=MAX(machine_no)+1
                  from TX_MACHINE_LOCATION

                   insert into TX_MACHINE_LOCATION (machine_no, machine_name, location, create_dt, created_by, create_loc, last_update_dt, last_updated_by)
                 values(@next_id,@username,14,GETDATE(),'tessitur','vs-l-tess-32',GETDATE(),'tessitur')

            end

     

    END

     

    Mark

Children
No Data