oracle

jboss 5.0 data source configuration in ear file. How can I run oracle 10g and 11g on the same server?

Currently my setup is: in my ear META-INF/jboss-app.xml <jboss-app> <service>datasource-ds.xml</service> </module> and datasource-ds.xml <datasources> <local-tx-datasource> <jndi-name>jdbc/mydeployment</jndi-name> <connection-url>jdbc:oracle:thin:@eir:myport:mydbname</connection-url> <driver-class>oracle.jdbc.dri...

How to correctly set the ORACLE_HOME variable on Ubuntu 9.x?

I have the same problem as listed here: http://stackoverflow.com/questions/52239/oracle-lost-sysdba-password although I did not lose the password, I entered it twice in the configure script originally, and then when I went to login (localhost:8080/apex, password not accepted. I don't have anything in the database, I just want to instal...

UTL_FILE.FOPEN() procedure not accepting path for directory ?

I am trying to write in a file stored in c:\ drive named vin1.txt and getting this error .Please suggest! > ERROR at line 1: ORA-29280: invalid > directory path ORA-06512: at > "SYS.UTL_FILE", line 18 ORA-06512: at > "SYS.UTL_FILE", line 424 ORA-06512: at > "SCOTT.SAL_STATUS", line 12 ORA-06512: > at line 1 HERE is the code create ...

Trying to make a job to be executed after each 1 minute,but its not working?

I have made this job,that should be executed in an interval of 1 minute,but it's not working. When I use execute dbms_job.run(2); it gets executed. printe is a procedure Please suggest! BEGIN DBMS_JOB.SUBMIT ( job =>:job_no, WHAT=>'printe;',--Procedure next_date=>sysdate+1/24*60, ...

ORA-12899 error in CHAR(1) field, but I'm sending only a 'C'

My Oracle database returns the error: ORA-12899 - Value too large for column TIT.ESTADO_CIVIL (actual: 2, maximum: 1) But I'm very sure that the sended value is an unique char 'C'. Anyone knows why this is happening? (I'm using C# with ODP.NET) ...

When SET SCAN ON used after END throws error

Hi, Im trying to use SET SCAN ON after as follows.. SET SCAN OFF; DECLARE -- declared a variable BEGIN --update statement END; SET SCAN ON; The use of SET SCAN ON; is causing the error when i try to run the script. The error captured ORA-06550: line 16, column 1: PLS-00103: Encountered the symbol "SET" 06550. 00000 - "line ...

Which command would replace IDENTITY INSERT ON/OFF from SQLServer in Oracle?

Hello, I have to migrate this query (simplified here) from T-SQL to ORACLE SET IDENTITY_INSERT table ON INSERT INTO table (id, value) VALUES (1, 2) SET IDENTITY_INSERT table OFF id being an Identity field in SQLServer. I have the same table with a sequence in ORACLE, I couldn't find a snippet that shows how to disable the sequence ...

Connecting Error to Remote Oracle XE database using ASP.NET

I have installed Oracle XE on my Development machine and it is working fine. Then I installed Oracle XE client on my Test machine which is also working fine and I can access Development PC database from Browser. Now, I want to create an ASP.Net application which can access that Oracle XE database. I tried it too, but it always shows me...

Oracle Query Optimization: Why is My Second Query Faster?

I was having some performance issues with an Oracle query, so I downloaded a trial of the Quest SQL Optimizer for Oracle, which made some changes that dramatically improved the query's performance. I'm not exactly sure why the recommended query had such an improvement; can anyone provide an explanation? Before: SELECT t1.version_id, ...

How do I insert data into a object relational table with multiple ref in the schema.

I have a table with a schema of Table(number, ref, ref, varchar2, varchar2,...). How would I insert a row of data into this table? When I do: insert into table values (1, select ref(p), ref(d), '239 F.3d 1343', '35 USC § 283', ... from plaintiff p, defendant d where p.name='name1' and d.name='name2'); I get ...

Generating incremental numeric column values during INSERT SELECT statement

I need to copy some data from one table to another in Oracle, while generating incremental values for a numeric column in the new table. This is a once-only exercise with a trivial number of rows (100). I have an adequate solution to this problem but I'm curious to know if there is a more elegant way. I'm doing it with a temporary seq...

How may I see the data in the Oracle view like I see it through the application ?

When I navigate through the Oracle application with my application user and the right responsibility, I see the data. I use the "record history" menu to see which table/view is used by application. So, I got PA_EXPEND_ITEMS_ADJUST2_V. When I'm connected with apps user in a sqlplus session, SELECT * FROM PA_EXPEND_ITEMS_ADJUST2_V gi...

ASP.NET & Oracle Windows Authentication - Is this possible?

I am trying to enable Windows Authentication on my IIS 6.0 Server with some client technology and Oracle DB server. When I load the ASPX page and have unchecked Anonymous Access and checked Integrated Windows Authentication, I can see my LOGON_USER credentials on the server via tracing. I am now trying to see if the same user can read ...

sql query --need some suggestions

I have a table with list of cycle codes.CYCLE_DEFINITION. each and every cycle_code has 12 months entries in another table(PM1_CYCLE_STATE). Each and every month has a cycle_start_date and a cycle_close_date. i will check with a particular date(lets say sysdate) and check what is the current month of every cycle.additionally i will also ...

Oracle 10g express edition import

How can i import a DMP file into my oracle 10g expression edition database? I tried with imp but its showing an error: IMP-00010: not a valid export file, header failed verification IMP-00000: Import terminated unsuccessfully How can i solve this? ...

PHP problem with selecting from Oracle global temporary table

Hello, I have an Oracle global temporary table which is "ON COMMIT DELETE ROWS". I have a loop in which I: Insert to global temporary table Select from global temporary table (post-processing) Commit, so that the table is purged before next iteration of the loop Insertion is done with a call to oci_execute($stmt, OCI_DEFAULT). Retr...

Using 'in' in Join

i have two selects a & b and i join them like: select * from ( select n.id_b || ',' || s.id_b ids, n.name, s.surname from names n, surnames s where n.id_a = s.id_a ) a left join ( select sn.id, sn.second_name ) b on b.id in (a.ids) in this case join doesn't work :( The problem is in b.id in (a.ids). But why if it...

Oracle: Is there a way to get the column data types for a view?

For a table in oracle, I can query "all_tab_columns" and get table column information, like the data type, precision, whether or not the column is nullable. In SQL Developer or TOAD, you can click on a view in the GUI and it will spit out a list of the columns that the view returns and the same set of data (data type, precision, nullabl...

Oracle row change time stamp

Is there a system column - timestamp - in Oracle table to determine when was it changed last time? I would assume there must be one to let mat views pull changes only ... ...

Where is all_nested_table_cols in 9i?

Oracle 9i has nested tables, however it doesn't have the all_nested_table_cols sysview (like 10g and 11g) which lets me see what the columns are for these nested tables. How can I find this information on a 9i database? ...