User create script

I have about 50 new users that I need to create.  Rather than do it manually, I was curious if anyone has done this via a script and if they'd be willing to share their code if they have.  Thanks!

  • Right off the bat when I try to insert a new userid (using sql) into t_metuser, I get an interesting error:

    Error: Cannot insert protected data. Either the encryption or indexing keys are not available or the indexing key is not valid for MAC generation.

    Doing a trace to see what the application does when creating a new user, I do not see any relevant code executed prior to this point, so my concern is that the application is hard-coded to do something that allows inserting a new row into t_metuser.  If so, there may not be a way around this.  Another possibility is permissions, but I am doing my insert statement as sa...

    Thoughts?

  • Hey Jason,

    T_METUSER (I believe) uses a combination of the Tessitura security certs and the database asymmetric keys for encryption, so you probably have to open the key before you can insert the data correctly.

    The SQL for that is basically:
    OPEN SYMMETRIC KEY Key_name DECRYPTION BY <decryption_mechanism>

    This link has detailed information on the above statement:
    http://technet.microsoft.com/en-us/library/ms190499.aspx

    Kevin.

     

  • That pointed me in the right direction and I was able to open the symmetric keys and create the tessitura users.

    My issue now is that I cannot see via profiler what the application executes to create the system login and sql user accounts.  What I get is:

    -- 'CREATE LOGIN' was found in the text of this event.
    -- The text has been replaced with this comment for security reasons.

    From what I have read there is no way around this as it is done at the sql server level.  I don't suppose anyone from Tessitura can comment on what code is being called at this point? :)   My other option would be to write my own create user and create login statements....I just want to make sure I do not miss something.

    EDIT:  So there is a little more information in my trace after that msg, however, I don't believe everything is shown...still looking at this.



    [edited by: Jason Kaiser at 2:41 PM (GMT -6) on 11 Sep 2009]
  • I would recommend looking for stored procedures used for customer account creation, rather than trying to insert directly into system tables, not that I know what they are off the top of my head.

  • The steps to create Tessitura users programmatically would be:

    • Open symmetric key
    • create login for sql
    • Insert into t_metuser
    • sp_grantdbaccess
    • @userid ,@userid
    • sp_addrolemember
    • 'ImpUsers' ,@userid
    • AP_UPDATE_PASSWORDS - for tessitura password
      • AP_UPDATE_PASSWORDS - for sql password
  • The attachment did not come through.

     

    --Tom

    718.724.8135

    tbrown@BAM.org

     

    From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Brian Wilbur Grundstrom
    Sent: Friday, December 19, 2014 12:31 PM
    To: Thomas Brown
    Subject: RE: [Tessitura Technical Forum] User create script

     

    Attached is a shared procedure that I’ve modified to reset passwords.  It has really helped to have manager be able to reset their report’s passwords.

     

     

    BRIAN WILBUR GRUNDSTROM | Database Administrator
    SHAKESPEARE THEATRE COMPANY
    Recipient of the 2012 Regional Theatre Tony Award®

    516 Eighth Street, SE | Washington, DC 20003-2834
    p 202.547.3230 ext. 2216 | c 917.952.7957
    bwg@shakespearetheatre.org
    www.shakespearetheatre.org
    www.brianwilbur.com
    2014|2015 SEASON •• Shakespeare’s AS YOU LIKE IT • Shakespeare’s  THE TEMPEST • Ives’ THE METROMANIACS • MAN OF LA MANCHA • Greig’s DUNSINANE • Molière’s TARTUFFE

     

     

     

    From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Jon Ballinger
    Sent: Friday, December 19, 2014 7:36 AM
    To: Brian W. Grundstrom
    Subject: Re: [Tessitura Technical Forum] User create script

     

    The steps to create Tessitura users programmatically would be:

    • Open symmetric key
    • create login for sql
    • Insert into t_metuser
    • sp_grantdbaccess
    •  
    • @userid ,@userid
    • sp_addrolemember
    •  
    • 'ImpUsers' ,@userid
    • AP_UPDATE_PASSWORDS - for tessitura password
      • AP_UPDATE_PASSWORDS - for sql password

    From: Jason Kaiser <bounce-jasonkaiser4021@tessituranetwork.com>
    Sent: 9/11/2009 2:32:10 PM

    That pointed me in the right direction and I was able to open the symmetric keys and create the tessitura users.

    My issue now is that I cannot see via profiler what the application executes to create the system login and sql user accounts.  What I get is:

    -- 'CREATE LOGIN' was found in the text of this event.
    -- The text has been replaced with this comment for security reasons.

    From what I have read there is no way around this as it is done at the sql server level.  I don't suppose anyone from Tessitura can comment on what code is being called at this point? :)   My other option would be to write my own create user and create login statements....I just want to make sure I do not miss something.

    EDIT:  So there is a little more information in my trace after that msg, however, I don't believe everything is shown...still looking at this.




    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!




    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!