<< Up | < Previous Page | Next Page >

Database Setup

Before installing @task, you must install and configure your database. @task currently supports three standard databases natively: MySQL, Oracle, and Microsoft SQL Server 2000/2005. Installation instructions for each of these databases can be found on subsequent pages:

N O T E : The following material assumes that you have already installed your database server.

Database Setup for MySQL

A file called attaskSchema.sql is included in the installer package. Before @task can communicate with a database, the database needs to allow @task access to it and needs to contain all of the tables and fields that @task needs to store its data. The procedure you should follow is: create the schema, add hosts, set privileges, and test the configuration.

Create Schema
1. Open a command prompt
2. Type the following command:

mysql -u root -p

3. You will be prompted to enter a password. Enter the password created during the Server configuration process. If done correctly, the screen should like this:
4. Type the following command:

create database attaskRx;

  • Don't forget to put the semi-colon (;) at the end of the command.
  • Add Hosts

    N O T E : With a command line setup, adding hosts is accomplished while setting privileges.

    Set Privileges
    1. Type the following commands at the command line (replacing PASSWORD with the password created during the Server configuration process:

    GRANT ALL ON attaskRx.* TO 'root'@'%' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;

  • The different parts of this command are explained here:
      1. a. GRANT ALL ON attaskRx.* - This tells the system to "grant" privileges on the attaskRx database to all tables (*) in that database.

        b. TO `root'@'%' - designates the user to whom the privileges will be granted and from what hosts they can connect. This command allows the user `root' to connect from ANY host (%). If we wanted to restrict access only from the localhost, we could replace this with `root'@'localhost'.

        c. IDENTIFIED BY `PASSWORD' - designates the password that `root' will use when connecting to the database.

        d. WITH GRANT OPTION; - Allows the user `root' to grant privileges to other users. This is optional in the mysql setup for @task.

      2. Type the following command to save the changes to the privileges.

    flush privileges;

    3. Type the following to close the MySQL command-line interface:

    exit

    Testing configuration
    1. To test the configuration, type the following at the command line (replacing PASSWORD with the password created during the Server configuration process):

    mysql -uroot -pPASSWORD attaskRx

    2. If you get an error message, you may not have followed the steps correctly for configuration, or you may have typed the above command correctly.
    3. If you get a mysql> prompt, then you have successfully configured the database.

    Creating a New Database Using the MySQL Administrator

    The following describes essentially the same process as above using the MySQL Administrator GUI tool.

    Create Catalog
    1. Open MySQL Administrator. You will get a login screen similar to this:
    2. Enter the following information:

      a. Server Host: localhost

      b. Username: root

      c. Password: enter the password created during the Server configuration process

    3. Click OK.
  • You should now see the application window similar to this:
  • 4. Click Catalogs
    5. Right-click in the Schemata pane and select Create New Schema
    6. Enter a name for your new schema. The example below uses the name attask.
    7. Click OK
  • Notice that the new schema has been added to the listing in the schemata pane
  • Add Hosts
    1. Click User Administration and then right click in the User Accounts pane below:
    2. Select Add Host from which the user can connect
    3. Enter a host (% is a wildcard for unlimited hosts, otherwise enter host IP address)
    4. Click OK
    Set Privileges
    1. Click the host created in step 5 and choose the Schema Privileges tab
    2. Use the << Option to assign all available Privileges for the schema to the host

    Repeat for each host created (including localhost)

    Backing up Your MySQL Database

    A backup of a MySQL database can be done using more than one method:

    1. Dump the database information to a text file that can be imported to recreate the database.
    This is done with the mysqldump tool in a manner similar to that shown here:

    mysqldump -udbUser -pdbPass -c --add-drop-table myAttaskDatabase > backup.sql

  • You can access help for using the mysqldump tool by typing mysqldump with no parameters. The mysqldump tool is in the 'bin' directory of the MySQL installation.
  • 2. Copy the actual data directory where MySQL stores the information about the database. Look in <MYSQL_INSTALLATION>/data to find a folder for every database created in your MySQL instance. Simply copy the desired directory to a safe place. You may want to use a tar or zip file for the directory for convenience and storage.

    Database Setup for Oracle

    Before @task can communicate with a database, the database needs to allow @task access to it and needs to contain all of the tables and fields that @task needs to store its data.

    Database Space Requirements

    While every instance of @task stores different information and has unique disk space requirements, there is a general estimate on needs. As your particular instance exceeds your space allocations, you may need to increase the size of your tablespace extent or datafile size, or create additional datafiles to store in the tablespace. It is assumed that there is sufficient expertise within your organization to accomplish these tasks.

    @task uses two tablespaces, ATTASK_DATA, for storing the data tables, and ATTASK_IDX for storing the indexes. As a general rule, these should start with at least 80 MB each.

    These sizes are estimates based on data that includes 100,000 tasks, 1000 projects, 500 users and 100,000 notes while still allowing for growth. Because some organizations will create more notes and others will add more tasks, it is impossible to determine exact memory requirements for inexact data sizes. Therefore, it is important to monitor the sizes of the tablespaces, tables and extents within your local instance and extend the datafile size or the number of datafiles if necessary to avoid data insertion problems and unnecessary downtime in the future.

    Localization Note

    The @task schema needs to be installed on an Oracle database that uses the LANG environment setting `en_US.UTF-8'. If you are installing @task on a database server that is outside of the United States, it is likely that the default LANG setting on the database is something other than `en_US.UTF-8'. For example, in germany, the default LANG setting is most likely `de_DE.UTF-8'. In these cases, you will need to set the LANG environment setting on your attask database to `en_US.UTF-8' before creating the schema.

    Database Creation

    The steps to install @task on Oracle are: create the database, create the tablespaces, create tables within the database, import all of the setup data, and give access rights to the Web application.

    NOTE: The instructions contained here assume a high level of expertise with Oracle and should be performed by an Oracle DBA.

    Create the Database

    Create a database for @task. The name chosen must follow the Oracle naming conventions for database names. This documentation assumes the name `attask'.

    1. At an Oracle console that is connected to the instance where the database is to be created, type:

      a. Create database attask;

      b. Switch to the newly created attask database by reconnecting to the database using the new SID.

    Create the Tablespaces

    The @task database uses two tablespaces, one for the data tables and one for the indexes. These are described below:

    1. ATTASK_DATA - The tablespace that holds the @task data tables
    2. ATTASK_IDX - The tablespace for the index tables

    It is recommended that you do NOT change the tablespace names as the automatic update features of @task assume these two tablespace names. We recommend that each tablespace have an initial size of at least 80 megabytes for the core system install.

    N O T E : It is also highly recommended that your tablespaces have autoextend=true.

    You can create tablespaces through the Oracle Enterprise Manager or through an Oracle console using a script.

    Included in the installation package is a script that can be modified to create the tablespaces in your environment. This file is called createTablespaces.sql. To modify this file:

    1. Open `createTablespaces.sql' in a text editor. You will see two `CREATE TABLESPACE' commands.
    2. You need to modify the values for the DATAFILE parameters to match your local system. These parameters use standard OFA directory structures for maximum portability. You need to make sure that the directory structure that you specify is compliant with the operating system Oracle is running on (for example, forward slashes `/' for Unix-based operating systems and back slashes `\' for Windows-based operating systems,) and that the directory structure exists.
  • The basic structure of the OFA directory should be something like:
  • /[mount_point]/APP/[application_name]/PRODUCT/[version]/application

  • This example uses a more simple form (from a Windows computer):
  • c:\u01\oradata\attask\

  • More information on OFA can be found in your Oracle documentation set.
  • 3. The tablespace commands here specify default table storage sizes for tables that are created within the tablespace, but don't specify their own storage parameters.

    Once the file is modified, you should be able to execute the script to create the necessary tablespaces.

    Set up Database Access Rights

    You can choose any user name and password. However, you will need to enter this user name and password in the @task installation wizard.

    From an Oracle console you need to enter access rights to the user that @Task will use to connect to the database. Replace `USERNAME' in the following statement with your information and replace the host name with the host provided as part of your @task License Key:

    GRANT INSERT,SELECT,UPDATE,DELETE ON ALL_TABLES TO <USERNAME>;

    Database Setup For Microsoft SQL Server 2005

    This guide assumes that Microsoft SQL Server 2005 has already been installed, that users have a general knowledge of the SQL Server Configuration Manager, and Microsoft SQL Server Manger Studio applications are included in the install.

    CREATE THE DATABASE

    Using Microsoft SQL Server Management Studio, perform the following steps:

    1. In the Object Explorer window on the left side, expand the correct server.
    2. Right-click on Databases, select New Database... from the pop-up menu.
    3. Enter a database name. The name can be anything. This documentation assumes the name is 'attask'.
    4. On the Owner dropdown, select the DB Login that you want to use for the @task database. This will ensure that this Login has all the privileges needed. You must use the username and password associated with this Login in the @task install wizard.
    5. On the Database files table, set an initial size of at least 50 MB for the Data file and 25 MB for the Log file.
    6. Select OK to create the database.
    ENSURE PROPER NETWORK SUPPORT

    @task is a Java-based application and uses JDBC over TCP/IP to communicate with Microsoft SQL Server 2005. It is important that SQL Server 2005 is configured to support TCP/IP communication. Using the SQL Server Enterprise Manager, perform the following steps to ensure TCP/IP support is enabled:

     

    1. In the console pane of the SQL Server Configuration Manager, expand SQL Server 2005 Network Configuration, then expand Protocols for <instance name>, and then double-click TCP/IP.
    2. In the TCP/IP Properties dialog box, on the IP Addresses tab, several IP addresses appear, in the format IP1, IP2, up to IPAll. Scroll down and set the TCP Port of IPAll to the default value of 1433. This value is used in the @task configuration file (attask-config.xml).
    3. Switch to the Protocol tab, and change the Enabled option to Yes. Click OK.
    4. In the console pane, click SQL Server 2005 Services.
    5. In the details pane, right-click SQL Server (<instance name>) and then click restart, to stop and restart SQL Server.

    Database Setup for microsoft SQL Server 2000

    The same assumptions as detailed for Microsoft SQL Server 2005 apply for Server 2000.

    CREATE THE DATABASE

    Using Microsoft SQL Server Management Manager, perform the following steps:

    1. Select a host. Select New-> Database... from the popup menu.
    2. Enter the database name. The name can be anything. This documentation assumes that the name is `attask'.
    3. On the Data Files tab, select an initial size of at least 50 MB. Select the Automatically Grow File option, and specify a Growth By Percent value of at least 25%.
    4. Select OK to create the database.
    ENSURE PROPER NETWORK SUPPORT

    @task is a Java-based application and uses JDBC over TCP/IP to communicate with Microsoft SQL Server. It is important that SQL Server is configured to support TCP/IP communication. Using the SQL Server Enterprise Manager, perform the following steps to ensure TCP/IP support is enabled:

     

    1. Select the host on which the `attask' database resides.
    2. Select Properties.
    3. On the Server Properties popup dialog, select the General tab.
    4. On the General tab, select the Network Configurations... button.
    5. Make sure that the TCP/IP protocol is in the Enable Protocols list.
    6. Select TCP/IP from the Enabled Protocols list and select Properties.
    7. The Default Port is the TCP port number that the SQL Server database communicates on. The default value is 1433. This value is used in the @task configuration file (web.xml).
    8. Select OK until all popup dialogs close.
    9. You may need to restart Microsoft SQL Server 2000 for changes to take effect.