Skip to content

Commit c020a40

Browse files
fredericDelaportehazzik
authored andcommitted
Update to Oracle installation instructions.
1 parent 8ffa874 commit c020a40

File tree

2 files changed

+39
-13
lines changed

2 files changed

+39
-13
lines changed
Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,44 @@
11

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.
56
(Note: you'll need to sign-up for a (free) Oracle account to download)
67

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.
1114

1215
Creating the NH Schema:
1316

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.
1843

44+
Please note that some tests are dependent on the machine locales, and may fail if they are not English.

src/NHibernate.Config.Templates/Oracle-Managed.cfg.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ for your own use before compile tests in VisualStudio.
99
<session-factory name="NHibernate.Test">
1010
<property name="connection.driver_class">NHibernate.Driver.OracleManagedDataClientDriver</property>
1111
<property name="connection.connection_string">
12-
User ID=nhibernate;Password=nhibernate;Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
12+
User ID=nhibernate;Password=nhibernate;Data Source=(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORCL)))
1313
</property>
1414
<property name="show_sql">false</property>
1515
<property name="dialect">NHibernate.Dialect.Oracle10gDialect</property>
1616
<property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
1717
</session-factory>
18-
</hibernate-configuration>
18+
</hibernate-configuration>

0 commit comments

Comments
 (0)