Skip to content

Commit 84d36bf

Browse files
committed
Add ability to run x86/x64 versions of Managed ODP.NET DTC
1 parent a81ba45 commit 84d36bf

13 files changed

+332
-37
lines changed

ShowBuildMenu.bat

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,18 @@ echo D. NHibernate Trunk - SQLite (32-bit)
256256
echo E. NHibernate Trunk - SQLite (64-bit)
257257
echo F. NHibernate Trunk - PostgreSQL
258258
echo G. NHibernate Trunk - Oracle (32-bit)
259-
echo H. NHibernate Trunk - SQL Server ODBC (32-bit)
259+
echo H. NHibernate Trunk - Oracle Managed (32-bit)
260+
echo I. NHibernate Trunk - Oracle Managed (64-bit)
261+
echo J. NHibernate Trunk - SQL Server ODBC (32-bit)
260262
echo.
261263
echo X. Exit to main menu.
262264
echo.
263265

264-
%BUILDTOOL% prompt ABCDEFGHX
265-
if errorlevel 8 goto main-menu
266-
if errorlevel 7 goto teamcity-sqlServerOdbc
266+
%BUILDTOOL% prompt ABCDEFGHIJX
267+
if errorlevel 10 goto main-menu
268+
if errorlevel 9 goto teamcity-sqlServerOdbc
269+
if errorlevel 8 goto teamcity-oraclemanaged-64
270+
if errorlevel 7 goto teamcity-oraclemanaged-32
267271
if errorlevel 6 goto teamcity-oracle32
268272
if errorlevel 5 goto teamcity-postgresql
269273
if errorlevel 4 goto teamcity-sqlite64
@@ -314,6 +318,18 @@ move "%CURRENT_CONFIGURATION%" "%CURRENT_CONFIGURATION%-backup" 2> nul
314318
move "%CURRENT_CONFIGURATION%-backup" "%CURRENT_CONFIGURATION%" 2> nul
315319
goto main-menu
316320

321+
:teamcity-oraclemanaged-32
322+
move "%CURRENT_CONFIGURATION%" "%CURRENT_CONFIGURATION%-backup" 2> nul
323+
%NANT% /f:teamcity.build -D:skip.manual=true -D:CCNetLabel=-1 -D:config.teamcity=oracle-managed32
324+
move "%CURRENT_CONFIGURATION%-backup" "%CURRENT_CONFIGURATION%" 2> nul
325+
goto main-menu
326+
327+
:teamcity-oraclemanaged-64
328+
move "%CURRENT_CONFIGURATION%" "%CURRENT_CONFIGURATION%-backup" 2> nul
329+
%NANT% /f:teamcity.build -D:skip.manual=true -D:CCNetLabel=-1 -D:config.teamcity=oracle-managed64
330+
move "%CURRENT_CONFIGURATION%-backup" "%CURRENT_CONFIGURATION%" 2> nul
331+
goto main-menu
332+
317333
:teamcity-sqlServerOdbc
318334
move "%CURRENT_CONFIGURATION%" "%CURRENT_CONFIGURATION%-backup" 2> nul
319335
%NANT% /f:teamcity.build -D:skip.manual=true -D:CCNetLabel=-1 -D:config.teamcity=sqlServerOdbc
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">
3+
<Association extension="config" schema="%InstallRoot%/xml/schemas/Oracle.ManagedDataAccess.Client.Configuration.Section.xsd"/>
4+
</SchemaCatalog>

lib/teamcity/oracle/managed/Oracle.ManagedDataAccess.Client.Configuration.Section.xsd renamed to lib/teamcity/oracle/managed/common/Oracle.ManagedDataAccess.Client.Configuration.Section.xsd

Lines changed: 43 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,26 @@
2929

3030
<xs:simpleType name="datatype">
3131
<xs:restriction base="xs:string">
32+
<xs:enumeration value="System.Binary"/>
33+
<xs:enumeration value="System.Boolean"/>
34+
<xs:enumeration value="System.Byte"/>
3235
<xs:enumeration value="System.Byte[]"/>
33-
<xs:enumeration value="System.Decimal"/>
34-
<xs:enumeration value="System.String"/>
36+
<xs:enumeration value="System.Char"/>
3537
<xs:enumeration value="System.DateTime"/>
3638
<xs:enumeration value="System.DateTimeOffset"/>
37-
<xs:enumeration value="System.TimeSpan"/>
38-
<xs:enumeration value="System.Int64"/>
39-
<xs:enumeration value="System.Boolean"/>
40-
<xs:enumeration value="System.Char"/>
39+
<xs:enumeration value="System.Decimal"/>
4140
<xs:enumeration value="System.Double"/>
4241
<xs:enumeration value="System.Guid"/>
4342
<xs:enumeration value="System.Int16"/>
4443
<xs:enumeration value="System.Int32"/>
44+
<xs:enumeration value="System.Int64"/>
4545
<xs:enumeration value="System.SByte"/>
46+
<xs:enumeration value="System.Single"/>
47+
<xs:enumeration value="System.String"/>
48+
<xs:enumeration value="System.TimeSpan"/>
4649
<xs:enumeration value="System.UInt16"/>
4750
<xs:enumeration value="System.UInt32"/>
4851
<xs:enumeration value="System.UInt64"/>
49-
<xs:enumeration value="System.Single"/>
50-
<xs:enumeration value="System.Array"/>
51-
<xs:enumeration value="System.Byte"/>
52-
<xs:enumeration value="System.Binary"/>
5352
</xs:restriction>
5453
</xs:simpleType>
5554

@@ -76,13 +75,11 @@
7675
<xs:enumeration value="NClob"/>
7776
<xs:enumeration value="NVarchar2"/>
7877
<xs:enumeration value="Raw"/>
79-
<xs:enumeration value="RefCursor"/>
8078
<xs:enumeration value="Single"/>
8179
<xs:enumeration value="TimeStamp"/>
8280
<xs:enumeration value="TimeStampLTZ"/>
8381
<xs:enumeration value="TimeStampTZ"/>
8482
<xs:enumeration value="Varchar2"/>
85-
<xs:enumeration value="XmlType"/>
8683
</xs:restriction>
8784
</xs:simpleType>
8885

@@ -92,13 +89,10 @@
9289
<xs:enumeration value="Binary_Float"/>
9390
<xs:enumeration value="Binary_Double"/>
9491
<xs:enumeration value="Blob"/>
95-
<xs:enumeration value="Byte"/>
9692
<xs:enumeration value="Char"/>
9793
<xs:enumeration value="Clob"/>
9894
<xs:enumeration value="Date"/>
9995
<xs:enumeration value="Number"/>
100-
<xs:enumeration value="Float"/>
101-
<xs:enumeration value="Integer"/>
10296
<xs:enumeration value="Interval Day To Second"/>
10397
<xs:enumeration value="Interval Year To Month"/>
10498
<xs:enumeration value="Long"/>
@@ -107,41 +101,33 @@
107101
<xs:enumeration value="NClob"/>
108102
<xs:enumeration value="NVarchar2"/>
109103
<xs:enumeration value="Raw"/>
110-
<xs:enumeration value="Ref Cursor"/>
104+
<xs:enumeration value="Rowid"/>
111105
<xs:enumeration value="Timestamp"/>
112106
<xs:enumeration value="Timestamp With Local Time Zone"/>
113107
<xs:enumeration value="Timestamp With Time Zone"/>
108+
<xs:enumeration value="URowid"/>
114109
<xs:enumeration value="Varchar2"/>
115-
<xs:enumeration value="XmlType"/>
116110
</xs:restriction>
117111
</xs:simpleType>
118112

119113
<xs:simpleType name="providerDBType">
120114
<xs:restriction base="xs:string">
115+
<xs:enumeration value="AnsiString"/>
116+
<xs:enumeration value="AnsiStringFixedLength"/>
121117
<xs:enumeration value="Binary"/>
122-
<xs:enumeration value="Boolean"/>
123118
<xs:enumeration value="Byte"/>
124-
<xs:enumeration value="Currency"/>
125119
<xs:enumeration value="Date"/>
126120
<xs:enumeration value="DateTime"/>
121+
<xs:enumeration value="DateTimeOffset"/>
127122
<xs:enumeration value="Decimal"/>
128123
<xs:enumeration value="Double"/>
129-
<xs:enumeration value="Guid"/>
130124
<xs:enumeration value="Int16"/>
131125
<xs:enumeration value="Int32"/>
132126
<xs:enumeration value="Int64"/>
133-
<xs:enumeration value="Object"/>
134-
<xs:enumeration value="SByte"/>
135127
<xs:enumeration value="Single"/>
136128
<xs:enumeration value="String"/>
137129
<xs:enumeration value="StringFixedLength"/>
138130
<xs:enumeration value="Time"/>
139-
<xs:enumeration value="UInt16"/>
140-
<xs:enumeration value="UInt32"/>
141-
<xs:enumeration value="Uint64"/>
142-
<xs:enumeration value="VarNumeric"/>
143-
<xs:enumeration value="Xml"/>
144-
<xs:enumeration value="DateTimeOffset"/>
145131
</xs:restriction>
146132
</xs:simpleType>
147133

@@ -174,6 +160,18 @@
174160
</xs:sequence>
175161
</xs:complexType>
176162
</xs:element>
163+
<xs:element minOccurs="0" name="LDAPsettings">
164+
<xs:complexType>
165+
<xs:sequence>
166+
<xs:element maxOccurs="unbounded" minOccurs="0" name="LDAPsetting">
167+
<xs:complexType>
168+
<xs:attribute name="name" type="xs:string" use="required" />
169+
<xs:attribute name="value" type="xs:string" use="required" />
170+
</xs:complexType>
171+
</xs:element>
172+
</xs:sequence>
173+
</xs:complexType>
174+
</xs:element>
177175
<xs:element minOccurs="0" name="distributedTransaction">
178176
<xs:complexType>
179177
<xs:sequence>
@@ -198,6 +196,21 @@
198196
</xs:sequence>
199197
</xs:complexType>
200198
</xs:element>
199+
200+
<xs:element minOccurs="0" name="connectionPools">
201+
<xs:complexType>
202+
<xs:sequence>
203+
<xs:element maxOccurs="unbounded" minOccurs="0" name="connectionPool">
204+
<xs:complexType>
205+
<xs:attribute name="connectionString" type="xs:string" use="required" />
206+
<xs:attribute name="poolName" type="xs:string" use="required" />
207+
</xs:complexType>
208+
</xs:element>
209+
</xs:sequence>
210+
</xs:complexType>
211+
</xs:element>
212+
213+
201214
<xs:element minOccurs="0" name="edmMappings">
202215
<xs:complexType>
203216
<xs:sequence>
@@ -231,7 +244,7 @@
231244
<xs:attribute name="mode" type="parameterDirection" use="required" />
232245
</xs:complexType>
233246
</xs:element>
234-
<xs:element maxOccurs="unbounded" minOccurs="1" name="metadata">
247+
<xs:element maxOccurs="unbounded" minOccurs="0" name="metadata">
235248
<xs:complexType>
236249
<xs:attribute name="columnOrdinal" type="xs:int" use="required" />
237250
<xs:attribute name="columnName" type="xs:string" use="required" />
@@ -265,7 +278,7 @@
265278
</xs:complexType>
266279
</xs:element>
267280
</xs:sequence>
268-
<xs:attribute name="schema" type="xs:string" use="required" />
281+
<xs:attribute name="schema" type="xs:string" use="optional" />
269282
<xs:attribute name="name" type="xs:string" use="required" />
270283
</xs:complexType>
271284
</xs:element>
Binary file not shown.
Binary file not shown.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
@ECHO OFF
2+
REM
3+
REM configure.bat
4+
REM
5+
REM This .bat file configures ODP.NET, Managed Driver
6+
REM
7+
8+
9+
REM Configure machine.config for ODP.NET, Managed Driver's configuration file section handler and client factory
10+
echo.
11+
echo OraProvCfg /action:config /product:odpm /frameworkversion:v4.0.30319 /providerpath:"%~dp0..\common\Oracle.ManagedDataAccess.dll" /set:settings\TNS_ADMIN:"%~dp0..\..\..\network\admin"
12+
OraProvCfg /action:config /product:odpm /frameworkversion:v4.0.30319 /providerpath:"%~dp0..\common\Oracle.ManagedDataAccess.dll" /set:settings\TNS_ADMIN:"%~dp0..\..\..\network\admin"
13+
14+
15+
REM Configure machine.config for ODP.NET, Managed Driver's Performance Counter
16+
echo.
17+
echo OraProvCfg /action:register /product:odpm /component:perfcounter /providerpath:"%~dp0..\common\Oracle.ManagedDataAccess.dll"
18+
OraProvCfg /action:register /product:odpm /component:perfcounter /providerpath:"%~dp0..\common\Oracle.ManagedDataAccess.dll"
19+
20+
21+
REM Place the ODP.NET, Managed Driver assemblies into the GAC
22+
echo.
23+
echo OraProvCfg /action:gac /providerpath:"%~dp0..\common\Oracle.ManagedDataAccess.dll"
24+
OraProvCfg /action:gac /providerpath:"%~dp0..\common\Oracle.ManagedDataAccess.dll"
25+
echo.
26+
echo OraProvCfg /action:gac /providerpath:"Oracle.ManagedDataAccessDTC.dll"
27+
OraProvCfg /action:gac /providerpath:"Oracle.ManagedDataAccessDTC.dll"
28+
29+
30+
REM Enable intelli-sense for ODP.NET, Managed Provider configuration section
31+
echo.
32+
echo xcopy ..\common\Oracle.ManagedDataAccess.Client.Configuration.Section.xsd "%VS100COMNTOOLS%\..\..\Xml\Schemas" /R /Y
33+
if defined VS100COMNTOOLS xcopy ..\common\Oracle.ManagedDataAccess.Client.Configuration.Section.xsd "%VS100COMNTOOLS%\..\..\Xml\Schemas" /R /Y
34+
echo xcopy ..\common\Oracle.ManagedDataAccess.Catalog.xml "%VS100COMNTOOLS%\..\..\Xml\Schemas" /R /Y
35+
if defined VS100COMNTOOLS xcopy ..\common\Oracle.ManagedDataAccess.Catalog.xml "%VS100COMNTOOLS%\..\..\Xml\Schemas" /R /Y
36+
37+
echo.
38+
echo xcopy ..\common\Oracle.ManagedDataAccess.Client.Configuration.Section.xsd "%VS110COMNTOOLS%\..\..\Xml\Schemas" /R /Y
39+
if defined VS110COMNTOOLS xcopy ..\common\Oracle.ManagedDataAccess.Client.Configuration.Section.xsd "%VS110COMNTOOLS%\..\..\Xml\Schemas" /R /Y
40+
echo xcopy ..\common\Oracle.ManagedDataAccess.Catalog.xml "%VS110COMNTOOLS%\..\..\Xml\Schemas" /R /Y
41+
if defined VS110COMNTOOLS xcopy ..\common\Oracle.ManagedDataAccess.Catalog.xml "%VS110COMNTOOLS%\..\..\Xml\Schemas" /R /Y
42+
43+
44+
REM Add a registry entry for enabling event logs
45+
echo.
46+
echo reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Oracle Data Provider for .NET, Managed Driver" /v EventMessageFile /t REG_EXPAND_SZ /d %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\EventLogMessages.dll /f
47+
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\Oracle Data Provider for .NET, Managed Driver" /v EventMessageFile /t REG_EXPAND_SZ /d %SystemRoot%\Microsoft.NET\Framework64\v4.0.30319\EventLogMessages.dll /f
48+
49+
50+
REM Create a registry entry to add managed assembly in the Add Reference Dialog box in VS.NET
51+
echo.
52+
echo reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed" /ve /t REG_SZ /d %~dp0..\common /f
53+
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed" /ve /t REG_SZ /d %~dp0..\common /f
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
@ECHO OFF
2+
REM
3+
REM unconfigure.bat
4+
REM
5+
REM This .bat file unconfigures ODP.NET, Managed Driver
6+
REM
7+
8+
9+
REM Unconfigure machine.config for ODP.NET, Managed Driver's configuration file section handler and client factory
10+
echo.
11+
echo OraProvCfg /action:unconfig /product:odpm /frameworkversion:v4.0.30319 /providerpath:"%~dp0..\common\Oracle.ManagedDataAccess.dll"
12+
OraProvCfg /action:unconfig /product:odpm /frameworkversion:v4.0.30319 /providerpath:"%~dp0..\common\Oracle.ManagedDataAccess.dll"
13+
14+
15+
REM Unconfigure machine.config for ODP.NET, Managed Driver's Performance Counter
16+
echo.
17+
echo OraProvCfg /action:unregister /product:odpm /component:perfcounter /providerpath:"%~dp0..\common\Oracle.ManagedDataAccess.dll"
18+
OraProvCfg /action:unregister /product:odpm /component:perfcounter /providerpath:"%~dp0..\common\Oracle.ManagedDataAccess.dll"
19+
20+
21+
REM Remove the ODP.NET, Managed Driver assemblies from the GAC
22+
echo.
23+
echo OraProvCfg /action:ungac /providerpath:"Oracle.ManagedDataAccess, Version=4.121.1.0"
24+
OraProvCfg /action:ungac /providerpath:"Oracle.ManagedDataAccess, Version=4.121.1.0"
25+
echo.
26+
echo OraProvCfg /action:ungac /providerpath:"Oracle.ManagedDataAccessDTC, processorArchitecture=AMD64, Version=4.121.1.0"
27+
OraProvCfg /action:ungac /providerpath:"Oracle.ManagedDataAccessDTC, processorArchitecture=AMD64, Version=4.121.1.0"
28+
29+
30+
REM Disable intelli-sense for ODP.NET, Managed Provider configuration section
31+
if EXIST "%VS100COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Client.Configuration.Section.xsd" (
32+
echo.
33+
echo del "%VS100COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Client.Configuration.Section.xsd"
34+
del "%VS100COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Client.Configuration.Section.xsd"
35+
)
36+
if EXIST "%VS100COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Catalog.xml" (
37+
echo.
38+
echo del "%VS100COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Catalog.xml"
39+
del "%VS100COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Catalog.xml"
40+
)
41+
42+
if EXIST "%VS110COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Client.Configuration.Section.xsd" (
43+
echo.
44+
echo del "%VS110COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Client.Configuration.Section.xsd"
45+
del "%VS110COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Client.Configuration.Section.xsd"
46+
)
47+
if EXIST "%VS110COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Catalog.xml" (
48+
echo.
49+
echo del "%VS110COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Catalog.xml"
50+
del "%VS110COMNTOOLS%..\..\Xml\Schemas\Oracle.ManagedDataAccess.Catalog.xml"
51+
)
52+
53+
54+
REM Remove the registry entry for enabling event logs
55+
echo.
56+
echo reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application\Oracle Data Provider for .NET, Managed Driver" /f
57+
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Application\Oracle Data Provider for .NET, Managed Driver" /f
58+
59+
60+
REM Delete the registry entry to remove managed assembly in the Add Reference Dialog box in VS.NET
61+
echo.
62+
echo reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed" /f
63+
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed" /f
67.5 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)