OracleConnection not detecting Oracle Client in BIML Express - oracle

I'm trying to establish a connection (using Bilm) with an Oracle database using the OracleConnection and OracleSource objects in BimlExpress for Visual Studio Enterprise 2017 using the following Biml script:
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
<Connections>
<OracleConnection
Name="oracleConn"
ConnectionString="Data Source=XXX.XX.XX.XXX:XXX/XXX; User Id=XXXX;Password=XXXX;Integrated Security=no;"/>
</Connections>
<Packages>
<Package Name="package1" ConstraintMode="Linear">
<Tasks>
<Dataflow Name="obtain data">
<Transformations>
<OracleSource Name="load table" Connection="oracleConn">
<ExternalTableInput Table="table1"/>
</OracleSource>
</Transformations>
</Dataflow>
</Tasks>
</Package>
</Packages>
</Biml>
However, when I try to run the validation in Visual Studio this message shows up:
Validating Biml
Error 0 Oracle Client Access not detected. Install the 32-bit or 64-bit version of Oracle Client Access that matches your version of Biml/BimlStudio. Biml Validator threw an exception attempting to validate your package. Exception type: InvalidOperationException 0 0
AstValidator. There were errors during compilation. See compiler output for more information.
I already have the Oracle client installed along with the Attunity connectors for Oracle found here and have used them for projects not involving Biml (obtaining tables from Oracle in Visual Studio using the connectors). So I really don't know what the problem could be other than Biml somehow not being able to access the client. Is there a way I can debug this or is there some known fix for this?

Related

SSIS Error - Parsing Query from SQL Task Fails Due to 80040153, Invalid Value for Registry

Problem Statement
I have a lot of SQL Server environments locally.
When trying to parse a SQL task with very basic truncate table dbo.table syntax, I get the following error message.
I should note that when I execute the task it works fine despite throwing an error when parsed.
My understanding is that it's related to a corrupt .ddl file at the 'Microsoft SQL Server/1XX/DTS/Binn/'
- having trouble determining which SQL Server version's components be the cause.
Is there a way of determining the corrupt .dll and reconciling this issue?
Error Message
------------------------------
Retrieving the COM class factory for component with CLSID {dummy123-dum1-dum2-dum3-dummyds2309}
failed due to the following error: 80040153 Invalid value for registry
(Exception from HRESULT: 0x80040153 (REGDB_E_INVALIDVALUE)).
What I've Tried
Tested on Visual Studio 2017/2019
Figuring out What Com Object is the Problem
Because the message only gives me the CLSID I'm having trouble locating the actual com object it's referencing.
I've run reg query HKCR\CLSID /s /f "{<CLSID>}"
This confirmed that it isn't there, but that wasn't helpful.
Environment
Microsoft Visual Studio Enterprise 2019 Version 16.4.1 VisualStudio.16.Release/16.4.1+29609.76 Microsoft .NET Framework Version 4.8.03752 Installed Version: Enterprise
SQL Server Data Tools 16.0.61912.09160 Microsoft SQL Server Data
Tools
SQL Server Integration Services 15.0.1900.80 Microsoft SQL Server
Integration Services Designer Version 15.0.1900.80
SsmsVsIntegration 1.0 Visual Studio Container Tools Extensions
(Preview) 1.0 View, manage, and diagnose containers within Visual
Studio.

Oracle Entity Data Model(ODP.NET)

We are trying to create an Entity Data model (edmx) file using Database first approach for Oracle Db.( We already have a running version of edmx for SQL Server).
Installed ODP.NET package which includes Oracle.ManagedDataAccess.dll and Oracle.ManagedDataAccess.EntityFramework.dll in Visual studio 2017 for Framework 4.5 via Nuget Packages
Manually modified the connection string for Oracle as
<connectionStrings>
<add name="FacetsDataModel"
connectionString="metadata=res://*/EntityDataModel.csdl|res://*/EntityDataModel.ssdl|res://*/EntityDataModel.msl;provider=System.Data.OracleClient;provider connection string=”Data Source=***;User Id=**;Password=***;”;" providerName="Oracle.ManagedDataAccess.Client" />
</connectionStrings>
The above approach didn't work because we found out that we are missing ODP.Net Managed Provider in the system. So we tried installing ODT Tools for Visual Studio 2013(didn’t work) uninstalled the same and installed 2017(still the same issue)
We found out that we missed ODAC (Oracle Data Access Components), so we installed the same but still, we didn't get the ODP.Net Managed Data Provider.
We checked the machine.config file from the below path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config
When we tried searching for a solution, we got the below link ODP.NET Managed - Unable to find requested.Net Framework Data Provider
Point 11 -- They have mentioned modifying the machine.config file by including ODP.NET, Managed Driver Under section. After modifying the machine.config file, our visual studio got crashed.
As mentioned in the link, we checked with Registry key file and check if RegKey exists or not.
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed
A managed ODP.NET driver does not show up in Data Source dialogue
But in our system, there is no such folder exists named AssemblyFoldersEx in the specified path.
You missed several information, for example what is in your config file machine.config. Also you did not provide us any error message. Statements as "The above approach didn't work" are not very helpful.
Anyway I will try to give you some hints:
ODAC (Oracle Data Access Components) is a collection of various providers (ODP.NET managed and unmanaged, ODBC, OLE DB). Perhaps you selected the wrong component while installation.
HKLM\SOFTWARE\Wow6432Node\Microsoft.NETFramework\v4.0.30319\AssemblyFoldersEx\odp.net.managed is not used anymore. Usually the installation script should have deleted it. You Registry should look like this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727\AssemblyFoldersEx\ODP.Net]
#="c:\\oracle\\product\\12.2\\odp.net\\bin\\2.x"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\ODP.Net]
#="c:\\oracle\\product\\12.2\\odp.net\\bin\\4"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess]
#="c:\\oracle\\product\\12.2\\odp.net\\managed\\common"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319\AssemblyFoldersEx\Oracle.ManagedDataAccess.EntityFramework6]
#="c:\\oracle\\product\\12.2\\odp.net\\managed\\common\\EF6"
Of course you have to set folders according to your system.

Getting ODP.NET Managed Driver to work with ADO.NET TableAdapters

I've got a WCF service (.NET Framework 4) that uses Table Adapters (xsd) and System.Data.OracleClient as a dependency. I'm trying to switch to the new Oracle.ManagedDataAccess.Client.
I've installed the ODP.NET Managed Driver from NuGet. Everything went fine, it installed correctly as a reference.
I've put the following in the app.config file:
<system.data>
<DbProviderFactories>
<add name="ODP.NET Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</DbProviderFactories>
</system.data>
and changed the providerName attribute for the ConnectionString to providerName="Oracle.ManagedDataAccess.Client"
Then I double click on the Table Adapter (the xsd file) and right click on the Table Adapter I want to change and click on Properties. Then I get this dialog up:
Note: The ConnectionString has been removed from the screenshot
When I change the value of Provider to Oracle.ManagedDataAccess.Client I get the following error:
Do you have any idea how I can achieve this?
If you want to use VS designers and wizards for Tableadapters or Entity Framework, you must install Oracle Developer Tools for Visual Studio (ODT). Note that this does not support VS Express Edition. In your specific case, this install will update the machine config so that ODP.NET is registered as a factory provider.
You can download ODT here:
http://www.oracle.com/technetwork/topics/dotnet/utilsoft-086879.html
As a side note - please note that the Nuget package hosted on nuget.org was not put there by Oracle. If you want an official download you should get it from oracle.com.

SQL Compact 4.0 can't open/read sdf file

I've installed SQL Compact 4.0 CTP 2 via WPI and used NUPack to add SQLCE.EntityFramework in my project.
It compiles and run perfectly but I can't open the SDF file in Visual Studio 2010's Server Explorer.
When I try I always receive the following message:
Microsoft Visual Studio
This is not a valid SQL Server Compact Database file or this file version is not supported by current SQL Server Compact Engine.
OK
I've already tried to uninstall and reinstall everything.
It cannot be opened in SQL Server 2008 R2 Management Studio also.
Please help!!
Installing this (Visual Studio 2010 SP1 Tools for SQL Server Compact 4.0) fixed this exact problem for me perfectly:
http://go.microsoft.com/fwlink/?LinkId=212219
Props to ErikEJ from this thread:
http://forums.asp.net/t/1811963.aspx/1
I met the same problem while trying to follow up the tutorials of MVC3 (MvcMovie) provided by asp.net when I was told to double click the "Movies.sdf" file to check out the tables or other infos.
Acturally the solution is just below the request:
Note If you get an error when you double-click Movies.sdf, make sure
you've installed SQL Server Compact 4.0 (runtime + tools support).
(For links to the software, see the list of prerequisites in part 1 of
this tutorial series.) If you install the release now, you'll have to
close and re-open Visual Web Developer.
After Sql Server Compact 4.0(runtime+tools support) installed, the problem is solved.
This question is a bit old. But I think the answer is that VS2010 SP1 has SQLCE 3.5 and SQLCE 3.5 x64 only, and not SQL Compact 4.0. The SQL products come together with Studio. There is still no SQLCE 4.0 today in 2012 included in distribution of Studio 2010 (I use Express edition).
This version packaging is not direct root cause, but just a clue, that different version will need extra effort.
The fix should involve registration of "Data Provider" in .NET Framework used by Visual Studio.
Look at "DbProviderFactories" inside c:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config. This section describes what data providers can be used by .NET and Studio.
If there is unexpected entries there, try to repair framework or register providers manually. To do so, some low level registration tools will be required. Say for asp.net providers there is aspnet_regsql.exe etc. But for just SQLCE itself there must be something similar.
<system.data>
<DbProviderFactories>
<add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</DbProviderFactories>
</system.data>
The difference between broken Studio and working App is that both use the same Framework but have different providers in config. (Or app uses other technique to pick a DLL and open SDF)
Answer: Since SP1 it is officially possible to use SQLCE4.0 in Studio 2010 SP1 (Thanks to Nathan Fisher for link http://support.microsoft.com/kb/983509 )

Visual Studio 2010 Premium is giving me a "Cannot Create Window" error!

When I first launched the Visual Studio (I just installed it) I choose the default programming layout (Visual C#/Visual Basic.NET/ F#/etc) as Web Development. It gave some error that it couldn't find the layout scheme or something and now it says Cannot Open Window.
Is there some way to reset the selected layout option?
I has the same error when I installs MySql Net Connector mysql-connector-net-6.3.4.msi
I think that this installer corrupt my VS 2010. But NOT.
Previous, I uninstall MySql Connector 6.3.2 and edit machine.config... this was the error!
<system.data>
<DbProviderFactories>
<!-- !!! añadido a mano para poderlo usar en VS2010
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net
Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory,
MySql.Data, Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/> -->
<add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/></DbProviderFactories>
</system.data>
The logic comments not is OK. Then, I erase all commented code and VS2010 come to the live, again!
In my lab the Visual Basic was working fine last semester, but this semester got that "Cannot create the Window" message. After trying reinstalling the VB, Visual Studio, .Net, and other things always got same message. Found a site that mentioned missing windowscodecs.dll file in the windows\system32 directory, but I had the file. Found a different date on file on machines witch the VB was working. Copied the newer windowscodecs.dll file, and that got rid of the problem, but later found I also had to copy the windowscodecsext.dll file as well.
Am now doing a comparison between the two systmes using sigcheck on all the files in system32. Have found a large number that report the Signing date: 12:07 PM 4/14/2008, but the other system has Signing date: 12:13 PM 4/14/2008. Haven't checked the actual contents to see how different the files are. Would be nice if there was a method to check and update to the latest versions.
I've had a similar problem with Visual Studio 2010 Express - restarting the computer solved it.
Similar error message here when starting up a freshly installed VS2010 Premium.
I had copy pasted stuff from old machine.config, but accidentally left out one Section-definition. Fixed by adding the missing definition into configSections-block.
Problem might be due to some issue in machine.config. Try to replace the config with the original and try.
This resolved for me.

Resources