Sun GlassFish Web Space Server 10.0 Administration Guide

Configuring Web Space Server for Microsoft SQL

You must have the following software installed:

ProcedureTo Install SQL Server Express 2008 With Management Tools

  1. Download SQL Server 2008 Express with Tools/SQL Server 2008 Express Advanced Series.

  2. Run the SQLEXPRADV_x86_ENU.exe file.

  3. Click the System Configuration Checker in the SQL Server Installation Center to see if all the prerequisites are installed.

  4. Choose Installation.

    • If you are doing a fresh installation, select the New SQL Server standalone installation.

    • If you are upgrading an existing installation, select the Add Features to an Existing Installation option.

  5. Type the product key and click Next.

    The product key setting page appears.

  6. Accept the licence terms and click Next.

    The licence terms page appears.

  7. Click Install in the Set Up Support Files screen. Click Next on completing the setup.

  8. In the Features Selection screen that appears, select the Database Engine Services and ManagementTools-Basic features.

  9. Type MSSQLSERVER in the Named instance and Instance ID boxes for Instance configuration. Click Next.

    See http://msdn.microsoft.com/en-us/library/ms165614.aspxfor more information about configuration.

  10. Make the following changes in the Server Configuration page

    1. Use NT AUTHORITY\SYSTEM as the account name for SQL Server Database engine.

    2. Change the SQL Server browser startup to Automatic.

    Other settings remain the same.

  11. Do the following changes in the Database Engine Configuration screen:

    1. Select Mixed Node so that the built in admin user sa can be user for authorization in addition to Windows authorization.

    2. Provide a password for the account sa.

    3. Click Next and wait till the installation is complete.

ProcedureTo Start Microsoft SQL Server

  1. Run MSSQL Server Configuration Manager.

  2. Navigate to SQL Server Network Configuration -> Protocols for SQL SERVER. Enable TCP/IP and Named Pipes. SQL server uses port 1433 by default.

  3. Right-click SQL Server Services and choose SQL Server from the pop-up menu. Click Start.

  4. Verify that Microsoft SQL is running.

    You can verify this on the Solaris platform by running the netstat -an | grep 1433 command in a terminal window.

ProcedureTo Connect to Microsoft SQL Using the Management Studio tool

  1. Run SQL Server Management Studio.

  2. Navigate to File -> Connect Object Explorer.

  3. Apply the following settings:

    • Server Type: Database Engine

    • Server Name: Name of the computer

    • Authentication : SQL Server Authentication. In order to use SQL Server authentication, you need to select the Mixed Mode (Windows authentication + SQL Server authentication) option while installing Microsoft SQL.

      • Login : sa

      • Password : MSSQL administrator password assigned during installation

  4. Click Connect.

  5. Select New Query in the Management Studio tool.

  6. Type create database lportal and click Execute.

    The message “Query executed successfully” is displayed on successful creation of the database named lportal.

ProcedureTo Configure Web Space Server to Use Microsoft SQL

  1. Add the following text to theportal-ext.properties file in theRoot-Dir/webspace-for-gfv2/var/webspace/war-workspace/customs/webspace/WEB-INF/classes directory.

    # SQL Server
        #
        jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
        jdbc.default.url=jdbc:jtds:sqlserver://localhost:1433/lportal
        jdbc.default.username=sa
        jdbc.default.password=<admin password set for MsSQL>
  2. Download the jTDS JDBC driver from http://jtds.sourceforge.net/.

  3. Copy the JAR file to the GlassFish-install-dir/domains/domain1/lib directory.

  4. Restart the GlassFish server.