Availability of  DbProviderFactory in ODP

Does anyone know if Oracle or someone has created a DbProviderFactory for ODP. From the page
http://msdn.microsoft.com/en-us/library/cy5kfe3c(v=VS.80).aspx
ADO.NET 2.0 introduces new base classes in the System.Data.Common namespace. The base classes are abstract... They include DbConnection, DbCommand, and DbDataAdapter
The Factory Design Pattern
The programming model for writing provider-independent code is based on the use of the "factory" design pattern, which uses a single API to access databases across multiple providers. This pattern is aptly named, as it calls for the use of a specialized object solely to create other objects, much like a real-world factory.

I may be missing the point here, but what are you looking for? ODP supports factory classes when support for ADO.NET 2.x was introduced in 10.2.0.2.21, and factory class code is generic.
If you click the "Writing Generic Data Access Code in ASP.NET 2.0 and ADO.NET 2.0" link in the URL you've referenced, you'll see sample code. To change that code to use ODP, simply change
DbProviderFactory provider = DbProviderFactories.GetFactory("System.Data.SqlClient");
to
DbProviderFactory provider = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");
and provide an appropriate connect string.
Note however that you won't be able to take advantage of a lot of the functionality built into ODP without introducing ODP specific code, as the common framework is somewhat like ODBC in that it's written to the lowest common functionality.
Corrections/comments welcome, hope it helps.
Greg
    DbProviderFactory provider = DbProviderFactories.GetFactory("Oracle.DataAccess.Client");
    DbConnection con = provider.CreateConnection();
    con.ConnectionString = @"Data Source=mytnsnamesalias; user id=myuid;password=mypwd";
    DbCommand com = provider.CreateCommand();
    com.Connection = con;
    com.CommandText = "Select * From Subscribers";
    com.CommandType = CommandType.Text;
    DataSet ds = new DataSet();
    DbDataAdapter ad = provider.CreateDataAdapter();
    ad.SelectCommand = com;
    con.Open();
    ad.Fill(ds);
    con.Close();
    return ds.Tables[0].DefaultView;Edited by: gdarling on Jun 18, 2010 10:27 AM

Similar Messages

  • TNS-12560 error when running as Windows Service

    Hello,
    I created a VB.NET application that connects to a Oracle database using DbProviderFactory and ODP.NET for .Net Framework 2.0. This application runs on XP, I need it to run as Windows Service, but every time it try to connect to the database throw the Oracle exception TNS-12560: TNS:protocol adapter error, the weird thing is the same application running as a Console Application it works (Same code, same connection string, same query). It was using ODP.NET 10 I updated the provider to 11 still got the same error. The service is running user Local System account, and it has the same problem running under other adm account.
    Following is error in the sqlnet.log (PS: The file was under the system32 folder, probably because was running as a service):
    Fatal NI connect error 12560, connecting to:
    +(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=XX.XX.XX.XX)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XXX)(CID=(PROGRAM=C:\Program Files\MyApp\MyApp.exe)(HOST=MYCOMPUTER)(USER=MYUSER))))+
    VERSION INFORMATION:
    +     TNS for 32-bit Windows: Version 10.2.0.1.0 - Production+
    +     Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 10.2.0.1.0 - Production+
    Time: 28-AUG-2009 02:20:19
    Tracing not turned on.
    Tns error struct:
    ns main err code: 12560
    TNS-12560: TNS:protocol adapter error
    ns secondary err code: 0
    nt main err code: 530
    TNS-00530: Protocol adapter error
    nt secondary err code: 56
    nt OS err code: 0
    Does anyone have any thoughts as to why I'm getting this error ??
    Thanks

    I don't know :^(
    There could be many reasons: differences in the environment, missing permissions, virus scanners, you name it.
    Is it running under the same user as on the console?
    I suspect that the error code will give a hint where the problem is, but I could not find any documentation what this code means.
    You could try to run an Orace Net trace - maybe you get an idea if you see where in the connection process the problem occurs.
    Yours,
    Laurenz Albe

  • Oracle Not Available Error Message

    My application has been running fine until today. I have not changed any code in a while, but now I'm suddently getting the error message:
    Oracle.DataAccess.Client.OracleException: ORA-1034: ORACLE not available
    The database is not shutdown and I can run a query on the database server just fine. I have tried shutting down and re-starting the database, but I still get the same error.
    I'm running ODP.NET 9.2.0.401.
    Any suggestions? Thanks!

    Hi Jimmy,
    Can you run a query (e.g. using SQL*Plus) from the Client?
    If so, check the Data Source=<tns_name_alias> if it matches with the alias entry in Client side tnsnames.ora.
    S.H.

  • How to bundle ODP with my app?

    I wrote a utility in .NET with ODP for a customer. The packages works on my development machine because I have OADC and ODP here. But the customer doesn't have that, and if he wants to install it he needs to go through some arduous process to get approval. Is there anyways I can just bundle the necessary dlls with the utility?
    I did find an xcopy of ODP on Oracle's download site, but it's only available in 11g. The customer's Oracle database is version 10.2g.
    How can I bundle ODAC and ODP for 10.2?

    The Oracle 11.2 Client is interoperable with the 10.2 DB server. There is no need to use the 10.2 client with the 10.2 DB server.
    Chapter 2 in the ODP.NET documentation says that Oracle 11.2 Client is certified with Oracle DB 9.2 and higher.

  • Import odp to keynote

    I make a ppt file with openoffice 3.30 (export odp to ppt).
    I can't open this file with keynote 09 (5.3).
    The error message  is : "erreur d'importation : mémoire saturée" " import error out of memory"
    Is there a solution ?
    ppt files by office are OK

    Unfortunately, no, at least, not in any elegant, or quick-and-easy way. (This is soooooo disappointing, because 25 years ago AppleWorks, also essentially an Apple product, was a truly integrated suite, in which this kind of thing was a snap.) The available options are all sloppy and tedious (cut-and-paste point by point is the most obvious) It's somewhat easier to do from WORD to PowerPoint (<http://mac2.microsoft.com/help/office/14/en-us/word/item/97009a21-e672-46cb-8 460-5c7d5e8e1f74>) - not exactly easy, but eas ier. To do this, within Pages export your Pages doc to WORD; then open the export with WORD, format it correctly, and follow the instructions on the MS site to send it to PP. Once you have that as you want it, open it in KN. Don't spend a lot of time with animations and builds in the PP doc, because they may not translate well into KN; do that stuff on the final KN.
    Obviously, this is a case where I would without regret simply dispense with the Apple software altogether, and compose and present with the Microsoft apps.

  • ODP 9.2.0.7 and Database 10g (10.2.0.5)

    Hello everybody.
    I wanted to know if it is possible to use ODP 9.2.0.7 against a 10g (10.2.0.5) database. Up to this moment, one of our customers has an application with a 9.2.0.7 database that uses the 9.2.0.7 ODP. Some years ago, the development team tried to use newer ODP versions, but since the newer versions have different behaviour (I cannot explain what were those differences right now, the person who made the testing is not available and I cannot find any documentation about the issues) the decided to keep the 9.2.0.7 ODP. The only thing I can add is that the system was designed using .Net framework 1.1 many years ago, using the native Microsoft Oracle provider, and then they moved to ODP due to many ORA-00600 errors generated by the MS connector.
    Nowadays, due to corporate decision, they are planing to upgrade to Oracle 10.2.0.5 (yes, I know that there is a 11g, but it's corporate decision :-( ) and the do not want to upgrade the ODP until they are able to test it throughly. Since the database upgrade to 10g is already planified, I wanted to know if ODP 9.2.0.7 can connect to a 10g database without problems.
    According to ODP 9.2.0.7 readme file:
    IMPORTANT INSTALLATION INFORMATION
    ==================================
    ODP.NET 9.2.0.7.00 depends on Oracle Client 9.2.0.7.0 that is installed on top
    of Oracle Client 9.2.0.1.0 or higher. Oracle Client 9.2.0.7.0 can be downloaded
    from Metalink under patches as patchset # 4163445.
    That would mean that they need to have the 9i client, and as long as I understand a 9i client should not connect with a 1g database.
    But, the followng page (http://www.oracle.com/technetwork/database/windows/install9207-086815.html) says:
    System Requirements
    ============================
    The following items are required on a system to use this software:
    - Access to an Oracle Database Server (Oracle8 or later)
    Since at the moment of the 9.2.0.7 release the 10g database was available, it may be possible that the 9.2 ODP can connect to a 10g database.
    Thanks in advance,
    Lisandro

    Hello everybody.
    I wanted to know if it is possible to use ODP 9.2.0.7 against a 10g (10.2.0.5) database. Up to this moment, one of our customers has an application with a 9.2.0.7 database that uses the 9.2.0.7 ODP. Some years ago, the development team tried to use newer ODP versions, but since the newer versions have different behaviour (I cannot explain what were those differences right now, the person who made the testing is not available and I cannot find any documentation about the issues) the decided to keep the 9.2.0.7 ODP. The only thing I can add is that the system was designed using .Net framework 1.1 many years ago, using the native Microsoft Oracle provider, and then they moved to ODP due to many ORA-00600 errors generated by the MS connector.
    Nowadays, due to corporate decision, they are planing to upgrade to Oracle 10.2.0.5 (yes, I know that there is a 11g, but it's corporate decision :-( ) and the do not want to upgrade the ODP until they are able to test it throughly. Since the database upgrade to 10g is already planified, I wanted to know if ODP 9.2.0.7 can connect to a 10g database without problems.
    According to ODP 9.2.0.7 readme file:
    IMPORTANT INSTALLATION INFORMATION
    ==================================
    ODP.NET 9.2.0.7.00 depends on Oracle Client 9.2.0.7.0 that is installed on top
    of Oracle Client 9.2.0.1.0 or higher. Oracle Client 9.2.0.7.0 can be downloaded
    from Metalink under patches as patchset # 4163445.
    That would mean that they need to have the 9i client, and as long as I understand a 9i client should not connect with a 1g database.
    But, the followng page (http://www.oracle.com/technetwork/database/windows/install9207-086815.html) says:
    System Requirements
    ============================
    The following items are required on a system to use this software:
    - Access to an Oracle Database Server (Oracle8 or later)
    Since at the moment of the 9.2.0.7 release the 10g database was available, it may be possible that the 9.2 ODP can connect to a 10g database.
    Thanks in advance,
    Lisandro

  • Cannot retrieve table metadata - Table does not exist: ODP source 0WRKCNT_CATG_TEXT does not exist

    Hi, when i able to import the 0WRKCNT_CATG_TEXT extractor into source system i am getting the above bug Cannot retrieve table metadata - Table does not exist: ODP source <0WRKCNT_CATG_TEXT> does not exist, i have been checked in RSA5 T code to check the object is active or not, its active and its available in ROOSATTR table with enabled mode,but still its showing the error, can anyone help on this ..

    Hi Airings,
    'ORA-00942: table or view does not exist'
    According to the error message, it seems that the migrating table or view does not exist in the database, or SSMA does not have access to it. To troubleshoot the issue, please check the following things.
     1. Verify that if the spelling of the table or view name is correct.
     2. If the table or view exists but is in a different schema from the current schema where the SQL is executing (in other word, the table doesn’t own by you, but owned by other user), the ORA-00942 error will return too. Resolve this by
    explicitly reference the table or view by specifying the schema name (schema_name.table_name).
    3. SSMA queries some additional catalog tables that you may not have permission to, please make sure that you grant the account permission to
     read sys.mlog$. For more details, please review this similar thread:
    Bug in SSMA For Oracle 6.0 for non-dba Oracle user.
    Reference:
    ORA-00942 Table or View Does Not Exist Oracle Error
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • ODP Silent installation.....   TOPLEVEL_COMPONENT????

    Hello everybody,
    I'm performing a silent installation of ODP.NET 10.2.0.2.20. I've generated the response file using the -Record flag.
    The problem is that an entry in the response file is missing:
    the value for TOPLEVEL_COMPONENT.
    I tried this:
    TOPLEVEL_COMPONENT={"oracle.odac","10.2.0.2.20"}
    And it seemed to work, but the ODP wasn't actually installed. My application is not able to connect to the database because the dll oracle.dataaccess.dll is not available. This doesn't happen if I install it using the interactive mode of the OUI.
    Does anybody know which value should I specify for the TOPLEVEL_COMPONENT variable?
    Thanks in advance.
    Regards,
    Gonzalo

    AFAIK, there are no smaller ODAC distribution and there are many developers waiting for instant client to support ODP.NET.
    There are two options:
    <ol>
    <li>Try deleting soe component folders, and give us some report if your experiment succeed.</li>
    <li>If your application does not need "advance" feature and performance of ODP.NET, you can use MS Oracle provider supplied with .NET framework because it can be deployed using instant client</li>
    </ol>
    Cheers, <br>
    Nur Hidayat

  • Does ODP have this functionality?

    Hi;
    I don't care which Oracle drivers the below functionality is in. But is it available? My guess was this was the best place to ask as both the SqlServer and MySql ADO.NET drivers provide this functionality:
    1) How can I connect to an Oracle server without loading the Oracle client on the user's workstation.
    2) How can I enumerate all Oracle databases on the network.
    3) For a given Oracle database/server, how can I enumerate the schemas available on that server?
    3b) And is there a third step where I enumerate machines, databases on that machine, schemas on that database?
    Please, please, please tell me there is a way to do this as it lets us write our software so users do not need to know how to connect to Oracle. And that is a giant increase in usability.
    thanks - dave

    1) How can I connect to an Oracle server without loading the
    Oracle client on the user's workstation.You can easily connect to SQL Server without installing SQL Server Client is because Microsoft is kind enough to include SQL Server client software in their Windows installation (which is MDAC), so you don't have to install it separately.
    Unfortunately Oracle Client is not included in Windows installation, so you have to install it separetely. Fortunately Traditional Oracle Client is only needed when you want to use ODP.NET, you can deploy your application using Oracle Instant Client if you are using MS Oracle Provider.
    3) For a given Oracle database/server, how can I enumerate
    the schemas available on that server?connect as system, then run this query
    select * from all_userswell, 2 & 3b, i don't know the answer, because when we want to connect to Oracle Server we usually have to configure tnsnames.ora.
    Regards,
    NH

  • Oracle ODP Support and ODP vs DEVART

    Hello,
    I work with some vendor software that uses the ODP driver for it's .net application to talk to oracle. In there next release they are discontinuing ODP support claiming that oracle has chosen to no longer support this driver. The vendor is instead pushing us to use this [ devart|http://www.devart.com/dotconnect/oracle/] as a work around and they claim this should give us equal or better performance.
    My questions are:
    1. Is oracle really not supporting the ODP driver in the future (I couldn't find any indication of this on the web)
    2. What is the trade of between using the ODP driver or the direct DEVart connection? I would appreciate if you could share your similar experiences with me.
    Thanks,
    Daxter

    I'm an Oracle .NET product manager, so I am coming from a biased perspective.
    With that said, ODP.NET has a number of performance/availability features that DevArt doesn't have: RAC connection pooling (i.e. load balancing, Fast Connection Failover), statement caching, self-tuning, and promotable transactions. DevArt has features that ODP.NET doesn't have as well.
    Which provider one chooses often depends on how important each unique feature is to the customer. ODP.NET is by far the most popular Oracle .NET provider, not just due to its wide feature support, but due to a number of business reasons customers find important:
    1) ODP.NET licenses and support costs are already included in the price of the Oracle DB. There is no extra charge.
    2) There is one support organization to deal with. Thus, the logistics of resolving and coordinating complex service requests is easier.
    3) Oracle is large multinational company. Oracle is going to be around a long time to continue to develop and support ODP.NET. DevArt is small privately-held company based in the Ukraine. Not much information is available about the company's financials. What happens if the company goes bankrupt or is sold and the new owners discontinue the Oracle provider?
    4) ODP.NET is very popular. Thus, Oracle will support and improve it for a long time. It's not known how popular or financially viable DevArt's Oracle provider is for them.
    5) If you need to work closely with Oracle, you can call, visit a branch office around the world, or even have Oracle come on-site. DevArt's support is email only. They do not list a single phone number or office address on their website.
    6) As the most popular Oracle .NET provider available, ODP.NET is very stable, as it is being used a in wide variety of applications.

  • ODP Proxy Authentication

    I am trying to use Proxy authentication through the latest version of ODP. I am able to connect but I cannot gain access to the roles available on the Proxy user. Please help determine how this is supposed to work.
    I have a schema owner, owner1, that has a table, test_table, created and access is granted through a role, owner1_crud.
    I have a generic user, gen_user, that has access to the role owner1_crud. gen_user does not have any problem accessing data in owner1.test_table.
    Now I want to create a specific user, user1, that connects through gen_user and has the same access to owner1.test_table that gen_user has, but only when user1 connects via the proxy user.
    CREATE USER user1 IDENTIFIED BY user1_password;
    GRANT CREATE SESSION TO user1;
    ALTER USER user1 GRANT CONNECT THROUGH gen_user WITH ROLES owner1_crud;
    Then with ODP.NET I try the following:
    try
    OracleConnection cn = new OracleConnection("Data Source=db;User Id=user1;Proxy User Id=gen_user;Proxy Password=gen_user_password";Pooling=true);
    cn.Open();
    Console.WriteLine("Connected");
    OracleCommand cmd = new OracleCommand("select user, sys_context('USERENV','PROXY_USER') proxy_user from dual", cn);
    OracleDataReader dr = cmd.ExecuteReader();
    dr.Read();
    Console.WriteLine(dr["USER"].ToString() + " " + dr["PROXY_USER"].ToString());
    // Up to this point, everything seems to work fine.
    cmd = new OracleCommand("select count(0) cnt from owner1.test_table", cn);
    dr = cmd.ExecuteReader();
    dr.Read();
    Console.WriteLine(dr["CNT"].ToString());
    catch (OracleException ex)
    Console.WriteLine(ex.Message);
    Console.Read();
    OUTPUT
    =================================
    Connected
    USER1 GEN_USER
    ORA-00942: table or view does not exist
    I want to leave user1 only with CREATE SESSION privilege to make sure user1 can only get meaningful access through the proxy connection. Is there something I need to do to ACTIVATE owner1_crud for user1 when I connect? I have tried SET ROLE ALL, SET ROLE owner1_crud, and DBMS_SESSION.SET_ROLE('OWNER1_CRUD') and nothing works. Is my only alternative to add the owner1_crud role to user1 and keep the password private to prevent user1 from "backdoor" access.
    Thank you in advance.

    If owner1_crud has to be on user1 already, what does the WITH ROLES portion of this statement really do,
    ALTER USER user1 GRANT CONNECT THROUGH gen_user WITH ROLES owner1_crud;
    I am guessing it does the following:
    Assuming user1 has roles owner1_crud and owner2_crud and made a normal connection to the database, user1 would have access to all that owner1_crud and owner2_crud granted.
    Assuming user1 has roles owner1_crud and owner2_crud and made a proxy connection as gen_user to the database, user1 would only have access to all that owner1_crud granted, since that is the only role specified in the above WITH ROLES portion.
    Is that how it works?

  • Oracle.DataAccess support for DBProviderFactory

    I have a .NET solution that requires connection to several different database backends. We are abstracting our database code to use the DBProviderFactory, which allows us to change providers without having to write specific code to each of the .NET providers. Code for SQLClient would work the same as OLEDB or Microsoft native Oracle Driver.
    I want to be able to use the new Oracle.DataAccess component in the ODP but it does not seem to comply to the System.Data.Common.DBProviderFactory interfaces.
    I have not seen any reference to this from Oracle they are stating that the ODP provider is compliant.
    How can I use the Oracle.DataAccess objects through the DBProviderFactory?

    Hi,
    Support for ADO.NET 2.0 will be in beta in the next couple weeks, and is due out sometime in May.
    Cheers,
    Greg

  • How to recover from scenario in ECC- SLT- BW (ODP/ODQ scenario)

    SLT Scenario in question: ECC --> SLT --> BW (ODP/ODQ scenario)
    Issue : I need a scenario where we need to recover the data in a table in case of any failure occurs (where point in time recovery is not possible) or there is mismatch in Target database (HANA) when compared to ECC source system.
    For e.g. when we are replicating table A having high throughput (1,00,000 records/hr) from ECC to SLT. We find during reconciliation that records are not matching. We want to recover the data from ODQ for last 2 days (data retention set to 10 days).
    The following are key constraints:
    ·       1. Re-Replicate the table by stopping the replication and starting  again is not an option.
    ·        2. Data from BW is being replicated on real time and customer has mission critical reporting which does not allow downtime.
         (in case of re-conciliation issue 1 hr downtime may be allowed as exception)
    I have reviewed the documentation available on SLT (operation manual) but did not find any clear solution / recommendations (steps) for recovery from ODP/ODQ scenario.
    How can we recover in the case of above scenario where replicating the tables again  (stop and start replication) is not an option?
    Please provide your viewpoint as this will be helpful.

    Hi,
    Please fallow that link: http://en.wikipedia.org/wiki/RTFM
    /wg

  • ODP API documentation and sample code

    I am looking to write a custom program as a part of my client requirement to find the delta changes from an extractor. I heard that latest SAP NetWeaver EhP contains it. I beleive this ODP API is some Java interface and would be useful for me to use in my custom program.
    How can I make use of this ODP API? Is there any documentation and code samples available.

    I was able to find some API called Data Federator Facade with in the ABAP Code. Is this what it is?

  • My mac's software is only available under my profile on MacBook pro. How can other family members get to the optional SW logged in under their own profile

    Is there a way to share purchased SW under mote than one profile on the MacBook pro?
    Thanks

    If the software is in the HD>Applications folder it's available to everyone. If for some reason you put software into User>Applications folder it will be available only to that user.

Maybe you are looking for