Installing Membership Authorization Database

The InstallOPPSADBs.ps1 (PowerShell) file installs the Membership Authorization Database based on input parameters (see parameters below).

  1. To prepare for the database installation process, copy all contents from the OPPSA\DBInstallationScripts folder to the Database Server.
  2. Open Windows PowerShell console.
    Note:
    • Run the command prompt as an "administrator."
    • The default Powershell execution policy value is Restricted. To be able to run PowerShell scripts, enter the following command at the PowerShell command line to change the execution policy. >Set-ExecutionPolicy RemoteSigned.
    • Check the .ps script files to make they are not blocked.
  3. Navigate to the folder where the InstallOPPSADBs.ps1 file is located.
  4. Run InstallOPPSADBs.ps1 using following parameters:

    Parameter Description
    SQLHOSTNAME

    Fully qualified server name where new membership database will be created.

    Property for Membership DB configuration for ASP.NET membership provider application authentication.

    SQLINSTANCENAME

    Property for Membership DB configuration. Specify the name of the SQL Server instance.

    CONNECTIONDBUSER

    Property to define the DB user to be used for installing the membership authentication DB.

    If using Windows Authentication, this parameter does not need to be included.

    CONNECTIONDBPASS

    Property to define the password for the DB user to be used for installing the membership authentication DB.

    If using Windows Authentication, this parameter does not need to be included.

    OppsaAspNetMembershipDb

    Property to define the name of the membership authentication DB.

    OPPSA.ApplicationNameLower

    Property to define application name (lowercase) in membership database.

    See OPPSA.ApplicationGUID for reference information.

    OPPSA.ApplicationName

    Property to define application name in membership database.

    See OPPSA.ApplicationGUID for reference information.

    SQLSESSIONHOSTNAME

    Property for Session DB configuration for load balancer.

    Fully qualified server name for session database.

    This could be on the same database server as the membership database or a separate server. Specify existing session DB if load balancing configuration already exists and intend to use for this application as well.

    SQLSESSIONINSTANCENAME

    Property for Session DB configuration. Specify the name of the SQL Server instance.

    CONNECTIONSESSIONDBUSER

    Property to define the session DB user to be used for installing the session DB.

    If using Windows Authentication, this parameter does not need to be included.

    CONNECTIONSESSIONDBPASS

    Property to define the password for the session DB user to be used for installing the session DB.

    If using Windows Authentication, this parameter does not need to be included.

    OppsaAspNetStateDb

    Property to define the name of the membership state/ session DB.

    If creating a new session database, the value must be “ASPState”.

    If using an existing session database, specify the state/ session DB name.

    OPPSAApplicationGuid

    Property to define application name GUID in membership authentication database.

    • For new installations, enter zero’s for the GUID value in this format (8-4-4-4-12): Value="00000000-0000-0000-0000-000000000000". Also, define the application name to be created in properties: OPPSA.ApplicationNameLower and OPPSA.ApplicationName.
    • If using a previously installed membership database, the install assumes the application name in membership services is named “MyApplication”.
      • If the application name is “MyApplication”, then remove these 3 properties:
        • OPPSA.ApplicationGuid
        • OPPSA.ApplicationNameLower
        • OPPSA.ApplicationName.

    If the application name is not “MyApplication”, then locate the application GUID in the membership DB and use that for this property value. Also, specify the application name properties. The install will modify these values in the membership DB and the web.config so they are in sync.

    USEINTEGRATEDSECURITY

    Property to indicate type of trusted connection to use.

    Values: 0-SQL Server Authentication, 1-Windows Authentication.

    If using Windows Authentication, remove the user and password properties:

    CONNECTIONDBUSER, CONNECTIONDBPASS

    USEINTEGRATEDSECURITYSESSION

    Property to indicate type of trusted connection to use.

    Values: 0-SQL Server Authentication, 1-Windows Authentication.

    If using Windows Authentication, remove the corresponding user and password properties:

    CONNECTIONSESSIONDBUSER, CONNECTIONSESSIONDBPASS

    Example Powershell Command Syntax:
    .\InstallOPPSADBs.ps1 -SQLHOSTNAME "LABW6408HVM972.WKMNLAB.NET" -SQLINSTANCENAME 
    "" -CONNECTIONDBUSER "sa" -CONNECTIONDBPASS "qwerty123" -OppsaAspNetMembershipDb 
    "OPPSA_Install_Test" -OPPSAApplicationName "OPPSA" -OPPSAApplicationNameLower "oppsa" -
    SQLSESSIONHOSTNAME "LABW6408HVM972.WKMNLAB.NET" -SQLSESSIONINSTANCENAME "" -
    CONNECTIONSESSIONDBUSER "sa" -CONNECTIONSESSIONDBPASS "qwerty123" -
    OppsaAspNetStateDb "ASPState" -OPPSAApplicationGuid "00000000-0000-0000-0000-000000000000" -
    USEINTEGRATEDSECURITY false -USEINTEGRATEDSECURITYSESSION false