|
1 | 1 |
|
2 |
| -Installation steps for Oracle (Express Edition) for NH TeamCity: |
3 |
| - |
4 |
| -1. Download Oracle Database 10g Express Edition (OracleXE.exe): http://www.oracle.com/technetwork/database/express-edition/downloads/102xewinsoft-090667.html; |
| 2 | +Installation steps for Oracle for NH TeamCity: |
| 3 | +1. Download Oracle Database 12c from https://oracle.com/. Please make sure you comply with it's license. |
| 4 | + 12.2 will fail some tests (mainly NH-1171) due to a bug with comments in queries, see |
| 5 | + https://stackoverflow.com/q/7493028/1178314. So take care of installing 12.1 instead. |
5 | 6 | (Note: you'll need to sign-up for a (free) Oracle account to download)
|
6 | 7 |
|
7 |
| -2. Run the installer ... choose any HTTP port for the listener if asked (it may automatically choose the default 8080 if available); |
8 |
| -3. Enter 'password' as the password for the SYS and SYSTEM accounts; |
9 |
| -4. The setup should install Oracle (XE) on the machine; |
10 |
| -5. Once the installation is complete, leave the option ticked to open the homepage for configuration. |
| 8 | +2. Run the installer ... |
| 9 | +3. Choose any HTTP port for the listener if asked (it may automatically choose the default 8080 if available); |
| 10 | +4. Choose the ASCII character set. You will have to ensure nhibernate.oracle.use_n_prefixed_types_for_unicode |
| 11 | + parameter is set to true; Choosing instead the Unicode character set will cause some NHibernate tests to fail. |
| 12 | +5. Enter 'password' as the password for the SYS and SYSTEM accounts; |
| 13 | +6. The setup should install Oracle on the machine. |
11 | 14 |
|
12 | 15 | Creating the NH Schema:
|
13 | 16 |
|
14 |
| -a. Login to the homepage using login/password SYSTEM/password; |
15 |
| -b. Select Administration->Database Users->Create User; |
16 |
| -c. Enter Username=nhibernate, Password=nhibernate, and select the DBA role; |
17 |
| -d. Click 'Create' to create the user/schema. |
| 17 | +a. Run SQL Plus: |
| 18 | + SQL*Plus: Release XXX Production on YYY |
| 19 | + Copyright (c) 1982, 2014, Oracle. All rights reserved. |
| 20 | + Enter user-name: |
| 21 | +b. Enter: |
| 22 | + / as SYSDBA |
| 23 | + Expected result: |
| 24 | + Connected to: |
| 25 | + Oracle Database XXX |
| 26 | + SQL> |
| 27 | +c. Enter |
| 28 | + create user nhibernate identified by nhibernate; |
| 29 | +d. If it fails with ORA-65096, enter following command then go back to c. |
| 30 | + alter session set "_ORACLE_SCRIPT"=true; |
| 31 | +e. Once the user is created, enter: |
| 32 | + grant dba to nhibernate; |
| 33 | + |
| 34 | +Resolve conflict between Oracle client and with the managed driver NuGet package (12.1 and below): |
| 35 | + |
| 36 | +1. Within an elevated command line, navigate to {Oracle home}\product\{version}\{dbhome}\ODP.NET\managed\x64 |
| 37 | +2. Run |
| 38 | + OraProvCfg /action:ungac /providerPath:Oracle.ManagedDataAccess |
| 39 | +This is needed because NHibernate test uses the managed driver NuGet package, but Oracle client installation |
| 40 | +(excepted 12.2 and higher) put in the GAC a conflicting version of the assembly. This conflicting |
| 41 | +version needs to be removed from the GAC. Read more on https://stackoverflow.com/a/35176586/1178314. |
| 42 | +Not doing this may notably cause failures in distributed transaction tests. |
18 | 43 |
|
| 44 | +Please note that some tests are dependent on the machine locales, and may fail if they are not English. |
0 commit comments