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

Migrator.Providers.Oracle.OracleDialect

NHibernate.Driver.OracleDataClientDriver

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

EnterpriseTester.Core.Dialects.MsSql2005DialectEx, EnterpriseTester.Core

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 application to use 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.

Oracle Database Configuration Notes when using Windows Server 2008r2

Enterprise Tester no longer ships with Oracle drivers. To use Enterprise Tester with an Oracle database you must download and install the Oracle ODP.Net drivers from the Oracle website (part of ODAC). You can install either 32bit: http://www.oracle.com/technetwork/database/windows/downloads/index-101290.html or 64bit: http://www.oracle.com/technetwork/database/windows/downloads/index-090165.html

We suggest using the XCopy deployment release. Once the XCopy release is downloaded, you can unzip the xcopy file into a folder, then run the following command: install.bat odp.net2 c:\oracle odac

Which will install the ODP.Net drivers into the GAC (Global Assembly Cache) see the readme.txt in the root of the ODAC xcopy zip file for further details. At this point you will be able to configure Enterprise Tester to connect to an Oracle database.

Because Oracle Drivers are specific to 32bit and 64bit operating systems - you need to ensure that Enterprise Tester's application pool is configured with an identical setting.

To confirm this:

  1. Go to Control Panel -> Administrative Tools -> Internet Information Services (IIS) Manager.
  2. On the left hand side select Application Pools.
  3. Click on the Application Pool being used by Enterprise Tester (this will normally be "DefaultAppPool" or "EnterpriseTester").
  4. Select on the right-hand side "Actions" panel "Advanced Settings...".

If you have installed the 32bit Oracle drivers, you must have "Enable 32-Bit Applications" set to True on the advanced settings screen of the application pool. If you have installed the 64bit Oracle drivers, you must have "Enabled 32-Bit Applications" set to False on the advanced settings screen of the application pool.

  • No labels