You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

To change which database is being targeted, the web.config file must be edited, and at a minimum there are 3 options which must be changed to support each database engine - as per the table below:

 

Database ProductMigrator ProviderNHibernate DriverNHibernate Dialect

MySQL

Migrator.Providers.Mysql.MysqlDialect

NHibernate.Driver.MySqlDataDriver

EnterpriseTester.Core.Dialects.MySqlDialectEx, EnterpriseTester.Core

Oracle 10g/11g (Unmanaged Driver)

Migrator.Providers.Oracle.OracleDialect

NHibernate.Driver.OracleDataClientDriver

NHibernate.Dialect.Oracle10gDialect

Oracle 10g/11g (Managed Driver) (info)Migrator.Providers.Oracle.OracleManagedDriverDialect

EnterpriseTester.Core.Dialects.OracleManagedDataClientDriver, EnterpriseTester.Common

NHibernate.Dialect.Oracle10gDialect 

PostgreSQL

Migrator.Providers.PostgreSQL.PostgreSQL82Dialect

NHibernate.Driver.NpgsqlDriver

NHibernate.Dialect.PostgreSQL82Dialect

SQLServer 2005 (and above)

Migrator.Providers.SqlServer.SqlServer2005Dialect

NHibernate.Driver.SqlClientDriver

NHibernate.Dialect.MsSql2005Dialect

Oracle Managed Driver

When using the Oracle managed driver, you will also need to configure the following in the appsettings section of your web.config file:

<appsettings>
<add key="nhibernate.driver.oracle.enable-multiquery" value="true" />
...
<\appsettings>

Database Specific Notes on Setting the Character Set

MySQL

Enterprise Tester supports unicode strings in MySql databases, but you must ensure some steps are followed during initial setup.

Step 1 - Database Creation

When creating the database, you must specify UTF8 as the default character set and utf8 case insensitive as the default collation: 

 CREATE DATABASE `enterprisetester` CHARACTER SET utf8 COLLATE utf8_general_ci; 

 

Step 2 - Configuring Character Set in Connection String

If your connection string to the MySql database is: 

<add name="Default" connectionString="Server=10.1.1.1;Database=enterprisetester;Uid=etuser;Pwd=etpass" /> 

Then you must append the UTF8 character set declaration to end, like so:

<add name="Default" connectionString="Server=10.1.1.1;Database=enterprisetester;Uid=etuser;Pwd=etpass;CharSet=utf8;" /> 

(warning)If you have not set the UTF8 character set, there are ways to change the character set through a process of dumping out the database, performing a search/replace of all character set / collation declarations, then importing the modified database dump. Please consult your in-house MySql DBA for assistance.

 

 

PostgreSQL

Enterprise Tester supports unicode strings in Postgresql databases, but you must ensure some steps are followed during initial setup of the database. Before beginning, make sure you have a version of PostgreSQL that supports a column type of "uuid" (normally version 8.3 and later) as this is required by Enterprise Tester.

PostgreSql Databases must be created with a unicode encoding and we recommend using "UTF-8". If you use a non-unicode encoding such as WIN1252 Enterprise Tester will still work, but you may experience some issues when restoring baselines from other ET instances, importing data or when users save textual data that contains unicode characters.

For Postgresql to support unicode strings, you must create the database with the 'UTF8' encoding, like so: 

CREATE DATABASE "enterprisetester" 
  WITH OWNER "postgres" 
  ENCODING 'UTF8' 
  LC_COLLATE = 'en_US.UTF-8' 
  LC_CTYPE = 'en_US.UTF-8'; 

Unlike MySql there is no need to change the connection string to accommodate UTF8 encoding. If you wish to learn more about setting the locale and collation for a PostgreSql database, please refer to the PostgreSql documentation: 

http://www.postgresql.org/docs/current/interactive/locale.html
http://www.postgresql.org/docs/current/interactive/collation.

 

(warning) If you are installing Enterprise Tester for the first time and using an Oracle Database we strongly suggest using the Managed Oracle Driver - as this will provide a much easier installation experience.


When using the managed driver you:

  • Do not need to install ODAC or any Oracle client packages on your ET server.
  • Do not need to add additional configuration sections to your web.config file.
  • Need less disk splace (Installing ODAC requires an additional 200mb or more of disk space for installation).
  • Can configure the application pool to either 32bit of 64bit without having to change the version of ODAC installed (such as if you wish to support importing .EAP files from Enterprise Architect, which requires the application pool be configured to support 32bit applications.

 

Example Connection Strings

Each database also uses a slightly different connection string format - the http://connectionstrings.com/ website provides useful details of each connection string format.

Database ProductExample Connection String

Oracle

UserID=SYSTEM;Password=password;Data Source=192.168.1.232:1521/orcl

PostgreSQL

(info)

Host=192.168.1.232;Port=5432;Database=etest;UserId=postgres;Password=Password123;Timeout=60;CommandTimeout=120;

SQL Server Express (user-attached database)

DataSource=.\SQLExpress;AttachDbFilename=C:\ProgramFiles(x86)\CatchLimited\EnterpriseTests\Data\EnterpriseTester.mdf;InitialCatalog=EnterpriseTester;Trusted_Connection=Yes;

SQL Server (Integrated Security)

DataSource=.\SQLExpress;Initial Catalog=EnterpriseTester;IntegratedSecurity=True;

SQL Server (SQL username/password)

DataSource=dbserver;Initial Catalog=EnterpriseTester;UserId=etuser;Password=etpass;

Configuring a PostgreSQL Database

Before beginning, make sure you have a version of PostgreSQL that supports a column type of "uuid" (normally version 8.3 and later) as this is required by Enterprise Tester.

  • No labels