LINQ to Oracle Providers


I'm writing a new vs2008 app and wanted to know if there were any providers out there for LINQ to Oracle.
Posted On: Tuesday 20th of November 2012 04:24:07 AM Total Views:  436
View Complete with Replies

RELATED TOPICS OF Oracle PROGRAMMING LANGUAGE




how to use linq to oracle in asp.net 4.0

helloandtriedto uselinqtooracle10gexpressbut itthrowsan errorasI canmakenoerrorsbecauseIthrow
VIEWS ON THIS POST

253

Posted on:

Saturday 3rd November 2012
View Replies!

Mysql linq issue

I'm using VS Express 2008, and trying to use linq with Mysql.What I have done Created a db with a single table name account(fields : acct_num int, amount int)created a Linqto sql file with same model as db table.A page with gridview and code behind is (on page load event): MySqlConnectioncon=newMySqlConnection(ConfigurationManager.ConnectionStrings["mysqltest"].ConnectionString); \t\t\t\t\t MyLinqDataContextdb=newMyLinqDataContext(con); varq=frompindb.Accounts\tp; \t\t\t\t\t\t GridView1.DataSource=q; GridView1.DataBind(); I'm getting this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[t0].[amount], [t0].[acct_num] FROM [Account] AS [t0]' at line 1
VIEWS ON THIS POST

118

Posted on:

Wednesday 7th November 2012
View Replies!

oracle's local login

I have 2 users: oracle (dba) user and other (staff) user which has permission on Oracle What happens is that when login to local schema as oracle user for sqlplus, for example, do not need to attach SID; e.g. sqlplus user/passw but for the other user I have; e.g. sqlplus user/passw@sid the ENV vars are set up correctly for the staff user, listener is up so what could be the problem
VIEWS ON THIS POST

252

Posted on:

Friday 16th November 2012
View Replies!

oracle streams

I am trying to setup oracle streams by following the instructions in the link below: DB1 is on a solaris 2.8 machine running oracle 10.2.0.1.0 DB2 is on an AIX 5.2 machine running oracle 10.2.0.1.0 When I get to step number 10 in the documenation below I get the following the error: SQL> declare 2 source_scn number; 3 begin 4 source_scn := dbms_flashback.get_system_change_number(); 5 dbms_apply_adm.set_table_instantiation_scn@DB2 6 ( source_object_name => 'pbh.taj', 7 source_database_name => 'DB1', 8 instantiation_scn => source_scn); 9 end; 10 / declare * ERROR at line 1: ORA-04052: error occurred when looking up remote object STRMADMIN.DBMS_APPLY_ADM@DB2.WORLD.COM ORA-00604: error occurred at recursive SQL level 1 ORA-02085: database link DB2.WORLD.COM connects to AIXSNAP.WORLD.COM Can somebody point me in the right direction and tell me what this error means and how can I fix it. Note: where ever it says the user "scott" I substitued the user "pbh", which is a valid user in both DB's and has DBA privs http://dbataj.blogspot.com/2008/01/o...tween-two.html Set up below parameters on both databases (db1, db2) 1. Enable ARCHIVELOG MODE on both database Reference: http://dbataj.blogspot.com/2007/09/h...elog-mode.html 2. Create Stream administrator User Source Database: DB1 SQL> conn sys@db1 as sysdba Enter password: Connected. SQL> create user strmadmin identified by strmadmin; User created. SQL> grant connect, resource, dba to strmadmin; Grant succeeded. SQL> begin dbms_streams_auth.grant_admin_privilege 2 (grantee => 'strmadmin', 3 grant_privileges => true); 4 end; 5 / PL/SQL procedure successfully completed. SQL> grant select_catalog_role, select any dictionary to strmadmin; Grant succeeded. Target Database: DB2 SQL> conn sys@db2 as sysdba Enter password: Connected. SQL> create user strmadmin identified by strmadmin; User created. SQL> grant connect, resource, dba to strmadmin; Grant succeeded. SQL> begin dbms_streams_auth.grant_admin_privilege 2 (grantee => 'strmadmin', 3 grant_privileges => true); 4 end; 5 / PL/SQL procedure successfully completed. SQL> grant select_catalog_role, select any dictionary to strmadmin; Grant succeeded. 3. Setup INIT parameters Source Database: DB1 SQL> conn sys@db1 as sysdba Enter password: Connected. SQL> alter system set global_names=true; System altered. SQL> alter system set streams_pool_size = 100 m; System altered. Target Database: DB2 SQL> conn sys@db2 as sysdba Enter password: Connected. SQL> alter system set global_names=true; System altered. SQL> alter system set streams_pool_size = 100 m; System altered. 4. Create Database Link Target Database: DB1 SQL> conn strmadmin/strmadmin@db1 Connected. SQL> create database link db2 2 connect to strmadmin 3 identified by strmadmin 4 using 'DB2'; Database link created. Source Database: DB2 SQL> conn strmadmin/strmadmin@db2 Connected. SQL> create database link db1 2 connect to strmadmin 3 identified by strmadmin 4 using 'DB1'; Database link created. 5. Setup Source and Destination queues Source Database: DB1 SQL> conn strmadmin/strmadmin@db1 Connected. SQL> EXEC DBMS_STREAMS_ADM.SET_UP_QUEUE(); PL/SQL procedure successfully completed. Target Database: DB2 SQL> conn strmadmin/strmadmin@db2 Connected. SQL> EXEC DBMS_STREAMS_ADM.SET_UP_QUEUE(); PL/SQL procedure successfully completed. 6. Setup Schema for streams Schema: SCOTT Table: Taj NOTE: Unlock scott schema because in 10g scott schema is locked by default Source Database: DB1 SQL> conn sys@db1 as sysdba Enter password: Connected. SQL> alter user scott account unlock identified by tiger; User altered. SQL> conn scott/tiger@db1 Connected. SQL> create table TAJ ( no number primary key,name varchar2(20),ddate date); Table created. Target Database: DB2 SQL> conn sys@db2 as sysdba Enter password: Connected. SQL> alter user scott account unlock identified by tiger; User altered. SQL> conn scott/tiger@db2 Connected. SQL> create table TAJ ( no number primary key,name varchar2(20),ddate date); Table created. 7. Setup Supplemental logging at the source database Source Database: DB1 SQL> conn scott/tiger@db1 Connected. SQL> alter table taj 2 add supplemental log data (primary key,unique) columns; Table altered. 8. Configure capture process at the source database Source Database: DB1 SQL> conn strmadmin/strmadmin@db1 Connected. SQL> begin dbms_streams_adm.add_table_rules 2 ( table_name => 'scott.taj', 3 streams_type => 'capture', 4 streams_name => 'capture_stream', 5 queue_name=> 'strmadmin.streams_queue', 6 include_dml => true, 7 include_ddl => true, 8 inclusion_rule => true); 9 end; 10 / PL/SQL procedure successfully completed. 9. Configure the propagation process Source Database: DB1 SQL> conn strmadmin/strmadmin@db1 Connected. SQL> begin dbms_streams_adm.add_table_propagation_rules 2 ( table_name => 'scott.taj', 3 streams_name => 'DB1_TO_DB2', 4 source_queue_name => 'strmadmin.streams_queue', 5 destination_queue_name => 'strmadmin.streams_queue@DB2', 6 include_dml => true, 7 include_ddl => true, 8 source_database => 'DB1', 9 inclusion_rule => true); 10 end; 11 / PL/SQL procedure successfully completed. 10. Set the instantiation system change number (SCN) Source Database: DB1 SQL> CONN STRMADMIN/STRMADMIN@DB1 Connected. SQL> declare 2 source_scn number; 3 begin 4 source_scn := dbms_flashback.get_system_change_number(); 5 dbms_apply_adm.set_table_instantiation_scn@DB2 6 ( source_object_name => 'scott.taj', 7 source_database_name => 'DB1', 8 instantiation_scn => source_scn); 9 end; 10 / PL/SQL procedure successfully completed. 11. Configure the apply process at the destination database Target Database: DB2 SQL> conn strmadmin/strmadmin@db2 Connected. SQL> begin dbms_streams_adm.add_table_rules 2 ( table_name => 'scott.taj', 3 streams_type => 'apply', 4 streams_name => 'apply_stream', 5 queue_name => 'strmadmin.streams_queue', 6 include_dml => true, 7 include_ddl => true, 8 source_database => 'DB1', 9 inclusion_rule => true); 10 end; 11 / PL/SQL procedure successfully completed. 12. Start the capture and apply processes Source Database: DB1 SQL> conn strmadmin/strmadmin@db1 Connected. SQL> begin dbms_capture_adm.start_capture 2 ( capture_name => 'capture_stream'); 3 end; 4 / PL/SQL procedure successfully completed. Target Database: DB2 SQL> conn strmadmin/strmadmin@db2 Connected. SQL> begin dbms_apply_adm.set_parameter 2 ( apply_name => 'apply_stream', 3 parameter => 'disable_on_error', 4 value => 'n'); 5 end; 6 / PL/SQL procedure successfully completed. SQL> begin 2 dbms_apply_adm.start_apply 3 ( apply_name => 'apply_stream'); 4 end; 5 / PL/SQL procedure successfully completed. NOTE: Stream replication environment is ready, just needed to test it. SQL> conn scott/tiger@db1 Connected. SQL> --DDL operation SQL> alter table taj add (flag char(1)); Table altered. SQL> --DML operation SQL> begin 2 insert into taj values (1,'first_entry',sysdate,1); 3 commit; 4 end; 5 / PL/SQL procedure successfully completed. SQL> conn scott/tiger@db2 Connected. SQL> --TEST DDL operation SQL> desc taj Name Null Type ----------------------------------------- -------- ---------------------------- NO NOT NULL NUMBER NAME VARCHAR2(20) DDATE DATE FLAG CHAR(1) SQL> --TEST DML operation SQL> select * from taj; NO NAME DDATE F ---------- -------------------- --------- - 1 first_entry 24-JAN-08 1
VIEWS ON THIS POST

210

Posted on:

Friday 16th November 2012
View Replies!

oracle processes check ?

Hi Any one could help me how to findout only database related process(oracle proceses) on solaris platform. Gangu
VIEWS ON THIS POST

379

Posted on:

Friday 16th November 2012
View Replies!

assign variable in a sql - oracle

I have declared many variable in package's stored procedure. how can i assign many variables in a sql like belows: variable_1 varchar2(100); variable_2 varhcar2(100); select sum(col_a) into variable_1 , sum(col_b) into variable_b from table_A group by col_c,; or i need to assign value to 1 variable in a sql. if i have 2 variable. i need to write 2 sql\t any other methods
VIEWS ON THIS POST

240

Posted on:

Tuesday 20th November 2012
View Replies!

How to take backup of database in oracle sql developer?

Hi all, Hope doing well, i was using my sql database for my application the same database i want in oracle so for that i installed oracle 11g and i have done migration successfully. now i want how to take back up and restore database in oracle sql developer so that i can use this database to my application. please help me. it's urgent waiting for reply.
VIEWS ON THIS POST

239

Posted on:

Tuesday 20th November 2012
View Replies!

connecting to oracle using UDL file

Hi , I want to test the connection to Oracle database using UDL file. How can I do that. below is my connection string that I am using to connect to Oracle database in asp.net application. How can I acheive the connection testing using the UDL file.
VIEWS ON THIS POST

336

Posted on:

Tuesday 20th November 2012
View Replies!

c# code to access oracle refcursor and get data

Hi I have a oracle function that returns refcursor. This was given by third party to consume data. How can I code to get this data
VIEWS ON THIS POST

249

Posted on:

Tuesday 20th November 2012
View Replies!

Connect to a oracle timesTen database using .net

, how do I connect to a Oracle times ten database and run queries using .net , I an coding in c# . I need to connect to database ten timesand get details from tables. any idea
VIEWS ON THIS POST

383

Posted on:

Tuesday 20th November 2012
View Replies!

copy strucure and data from oracle

How to copy structure and data of table from one database to another database. ex: i have prod db contains of 100's of tables pointing to service name and hosted in a server. I have a test db where i want to copy some tables of prod. this test db is pointing to different service name and hosted in different server. which is the simplest and quickest way to do that
VIEWS ON THIS POST

193

Posted on:

Tuesday 20th November 2012
View Replies!

How to clear oracle parameter collection?

Hi , I am getting this exception: The OracleParameter is already contained by another OracleParameterCollection. How to remove previous parameter Please help me.
VIEWS ON THIS POST

234

Posted on:

Tuesday 20th November 2012
View Replies!

Can not connect to oracle db when using 64 bit client (microsoft ole db provider for oracle)

My application is windows app built up in visual studio 2008, vb.net (X86 mode).The machine have windows 7 64 bit OS. The application is using Oracle as database (seperate server m/c). The application is working fine when I useoracle client 10g 32 bit version. When I uninstall oracle client 10g 32 bit andinstall the oracle client 10g 64 bit,the application starts throwing the following error. Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. Provider is unable to function until these components are installed. The application was originally on vb6. It was converted into vb.net. So I am using the following connection string (microsoft ole db provider for oracle). StrConn = "Provider=MSDAORA.1; Data Source=ABC;User Id=XYZ;Password=XYZ123;" Is there any ole db provider for oracle64 bit version available
VIEWS ON THIS POST

278

Posted on:

Tuesday 20th November 2012
View Replies!

want execute sql server query in oracle

Hi ... im new to oracle and i want small query need to exicutee in oracle. this is working query in ms sql server. i want this to execute in oracle also.. select TotalPages, to_date(uploadedDate, 'dd/MM/yyyy') as uploadedDate,PagesNo from ( (select ROW_NUMBER() OVER (ORDER BY to_date(uploadedDate, 'dd/MM/yyyy') DESC )as ROW_NUM,* FROM ( select ScannedDate as UploadedDate,SUM(PagesNum) as PagesNo ,(select sum(pagesNum) from Scanned_Files_Table where IndexFlag=1 and DeleteFlag=0 and to_date(ScannedDate, 'dd/MM/yyyy') >= to_date('16/08/2011 12:00:00 AM', 'dd/MM/yyyy') and to_date(ScannedDate, 'dd/MM/yyyy') = to_date('16/08/2011 12:00:00 AM', 'dd/MM/yyyy')and to_date(ScannedDate, 'dd/MM/yyyy') 0 --------- and getting error like ORA-00936: missing expression00936. 00000 - "missing expression"
VIEWS ON THIS POST

307

Posted on:

Tuesday 20th November 2012
View Replies!

how to write oledb connection string for oracle8i(in a remote machine)

This is a cross post at : http://stackoverflow.com/questions/5726025/how-to-write-oledb-connection-string-for-oracle8iin-a-remote-machine Since I can not get the answer so post it here: Hi: How to write oledb connection string for oracle8i(in a remote machine) I mean the iis is setup in my machine(the win7 platform),but the oracle8i is installed in another win xp system,how to write the connection string
VIEWS ON THIS POST

284

Posted on:

Tuesday 20th November 2012
View Replies!

Problem in connecting to oracle database,which is using Provider=MSDAORA.1

Hi I am Naveen, I am upgrading a internal website from .Net 1.1 to .Net2.0 in Vb. The database is deployed in the server, but i could not connect to that database. i have to connect database to few drop down lists, my manager has given connection string to me... i have placed it in web.config and given that link properly in the code.. but the database is not connecting.. the list is showing empty.. my conn string is \t \t can anyone help me,,,
VIEWS ON THIS POST

215

Posted on:

Tuesday 20th November 2012
View Replies!

How to execute a oracle stored proc?

plz help me... DECLARE CUR_EMP_BIR REF CURSOR; BEGIN dbname.EMPLOYEE_P.EMPLOYEEBIRTHDAYSEL ( CUR_EMP_BIR ); END; when i try to executeaoracle sp i got the bellow error msg.am usin oracle10g ORA-06550: line 2, column 19: PLS-00201: identifier 'CURSOR' must be declared ORA-06550: line 2, column 15: PL/SQL: Item ignored ORA-06550: line 5, column 45: PLS-00320: the declaration of the type of this expression is incomplete or malformed ORA-06550: line 5, column 3: PL/SQL: Statement ignored 1. DECLARE 2. CUR_EMP_BIR REF CURSOR; 3. 4. BEGIN
VIEWS ON THIS POST

383

Posted on:

Tuesday 20th November 2012
View Replies!

oracle clob datatype length more 32000

Hi Friends \t\t i am using a microsoft enterprise library for oracle data base. we return an output value of clob datatype in oracle of character lengthmore thant 32000.How to handle this type problems in C#.net.if the passing a varible of string ,it chara cter limit is 32000.if than 32000 ,how to handle this in enterprise library.
VIEWS ON THIS POST

215

Posted on:

Tuesday 20th November 2012
View Replies!

Customizing a gridview with data from an oracle DATABASE

hey , i have dates stored in an Oracle DB , each date is related to an ID DATE IDENTIFIER 12/3/2010 34 11/3/2010 32 .... i have a grid view that contains all the identifiers ( with other informations) but now i'm stucked because , i need to hilight each row that contains and id having an occurence in the first table (with the condition that the referenced date should be in a specific interval (first and last day of the previous month )) !!!! for example ID INFO1 INFO 2 ..... 34 III IIII ..... this row has to be highlited! can you please help me\t\t thanks i've done this protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) \t { \t string connectionString = "DATA SOURCE=;PERSIST SECURITY INFO=True;USER ID=scott;PASSWORD=mimo0205"; \t OracleConnection oracleConnection = new OracleConnection(connectionString); \t oracleConnection.Open( ); \t \t \t DateTime deb = Convert.ToDateTime(DateTime.UtcNow.AddDays(-DateTime.UtcNow.Day).AddMonths(-1)); \t DateTime fin = Convert.ToDateTime(DateTime.UtcNow.AddDays(-DateTime.UtcNow.Day+1).ToShortDateString()+" 00:00:00"); \t \t Label8.Text = deb.ToString(); \t Label9.Text = fin.ToString(); \t \t \t OracleCommand oracleCommand5 = new OracleCommand(); \t oracleCommand5.CommandText = String.Format("SELECT DATEENVOI from validationRPV where code_ag='" + e.Row.Cells[1].Text + "'"); \t oracleCommand5.Connection = oracleConnection; \t \t \t int i = 0; \t \t OracleDataReader oracleDataReader4 = oracleCommand5.ExecuteReader(); \t //i = oracleDataReader4. \t ////affichage des entretiens individuels \t while (oracleDataReader4.Read()) \t { \t \t \t DateTime dateRecup = Convert.ToDateTime(oracleDataReader4["DATEENVOI"]); \t if ( (dateRecup >= deb) & (dateRecup = deb) & (dateRecup
VIEWS ON THIS POST

229

Posted on:

Tuesday 20th November 2012
View Replies!

Error coming in insert the date from asp net.2.0 to oracle database

Sir, As per our knowledge i use the code in asp .net 2.0 with c#, but in this code i got the error. So that way i need your help for solve the error, and my code. MY CODE IS:-- protected void Btn_submit_Click(object sender, EventArgs e) \t { \t\t\t int year = Int32.Parse(DDLYear.SelectedValue);\t\t\t \t\t\t int month = Int32.Parse(DDLMonth.SelectedValue);\t\t\t \t\t\t int day = Int32.Parse(DDLDay.SelectedValue); \t\t\t DateTime date = new DateTime(day, month, year); \t\t\t string dt = Convert.ToDateTime(date).ToString("dd-MMM-yyyy"); \t\t\t \t\t\t string connectionString = WebConfigurationManager.ConnectionStrings["inside1"].ConnectionString; \t\t\t OracleConnection con = new OracleConnection(connectionString); \t\t\t OracleCommand cmd = new OracleCommand("INSERT INTO ADMIN_FORM(FULL_NAME, USER_NAME, PASSWORD, E_MAIL, DATE_OF_BIRTH, GENDER, COUNTRY) VALUES (:FULL_NAME, :USER_NAME, :PASSWORD, :E_MAIL, :DATE_OF_BIRTH, :GENDER, :COUNTRY)",con); \t\t \t\t\t cmd.Parameters.AddWithValue(":FULL_NAME",TXTBX1.Text); \t\t\t cmd.Parameters.AddWithValue(":USER_NAME",TXTBX2.Text); \t\t\t cmd.Parameters.AddWithValue(":PASSWORD",TXTBX3.Text); \t\t\t cmd.Parameters.AddWithValue(":E_MAIL",TXTBX5.Text); \t\t\t cmd.Parameters.AddWithValue(":DATE_OF_BIRTH", dt.ToString()); \t\t\t cmd.Parameters.AddWithValue(":GENDER",RadioButtonList1.SelectedValue.ToString()); \t\t\t cmd.Parameters.AddWithValue(":COUNTRY",DDLCountry.SelectedItem.ToString()); \t\t\t try \t\t\t { ---------------------- ---------------------- } MY PROBLEM IS:-- I use the oracle databasae and in which I want to enter the date-of-birth from dropdownlist over the default.aspx page. In the Oracle database "DATE_OF_BIRTH Date;" On the time of run my pages this error has comeout Error:\t Year, Month, and Day parameters describe an un-representable DateTime. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime. Please help me for solve this error:
VIEWS ON THIS POST

333

Posted on:

Tuesday 20th November 2012
View Replies!