oracle

CLEAR SCREEN - Oracle SQL Developer shortcut?

With the aim of reducing mouse activity i was wondering if there was such a command shortcut (eg CLS or Ctrl+L) to provide the SQL*Plus (?) "CLEAR SCREEN" command functionality found by clicking the rubber-on-end-of-pencil icon in Oracle SQL Developer to clear the lower "Results" sub-tab (...incorrect terminology i'm sure). ...

When does a role get enabled for a user in Oracle 10g?

I use ADO.NET from C# 4 in order to set up a test context for a component. I execute the following SQL as sysdba: new[] { "create user \"{0}\" identified externally default tablespace USER_DATA temporary tablespace TEMP profile DEFAULT" .FormatWith( Config.QualifiedUserName ), "create role {0}" .FormatWith( Config.RoleN...

How to select the first continous group of rows using Oracle SQL

Hi All, I have the following data: Date             GroupID     Value 1/01/2000    1                 44 2/01/2000    1                 55 3/01/2000    1                 66 4/01/2000    2                 77 5/01/2000    2                 88 6/01/2000    1                 99 7/01/2000    1                 22 I am looking for a query cap...

Spring commits when it should not ? (related to Oracle autocommit)

I have an interface like below public interface FooDAO { public void callA(String x); } and an implementation as below deliberately making readonly true and not supported public class FooDAOImpl implements FooDAO { //for testing @Transactional(readOnly = true, propagation = Propagation.NOT_SUPPORTED) public void callA(Strin...

Have Oracle automatically roll back abandoned sessions?

Is there any way to guarantee that an application won't fail to release row locks in Oracle? If I make sure to put commit statements in finally blocks, that handles the case of unexpected errors, but what if the app process just suddenly dies before it commits (or someone kicks the power cord / lan cable out). Is there a way to have Ora...

What is the easiest way to transfer Oracle database from one PC to another?

i want to transfer my oracle database to another PC. What is the easiest way to do it? Are there any GUI tools to do it? ...

Creating migration scripts from the legacy model to the current one (being under development)

Originally, the model (including tables, views, packages, etc.) was built from the DML scripts (generated by TOAD). The scripts look like: DROP TABLE TABLESPACE.TABLENAME CASCADE CONSTRAINTS; CREATE TABLE TABLESPACE.TABLENAME ... Over time the model has changed - I've added new columns to the tables, altered some vews, added new metho...

Is this lookup (association) table correct? (many to many relationship)

CREATE TABLE jokecategory ( jokeid INT NOT NULL, categoryid INT NOT NULL, PRIMARY KEY (jokeid, categoryid) ) DEFAULT CHARACTER SET utf8; especially PRIMARY KEY (jokeid, categoryid)? or is there a better way to write this? Thank you in advance;-) ...

How to combine data from different columns from different databases from different vendors into one table?

Hello, Say i have a table named tbl1 in mysql :- bookid int name varchar(20) price int categoryid int And then i have a 2nd table, tbl2 in Oracle :- pubid int name varchar(20) addr varchar(50) I want to combine these two into MS Sql Server 2008 named tbl3 whose structure should be :- bookid int name varchar(20) price int pubid in...

use insert statement into a procedure !

Can i use insert into tables in a procedure (on oracle) ? example: procedure my_procedure (aa1 number ,aa2 number ) is begin insert into lam_table values(aa1,aa2,null) ;(*ofcourse depending on the tables ) ... ... end ; ** note i tried it and it worked but there were a message in the bottom that said (successfully compiled n...

PL/SQL: SQL Statement ignored

I have the following small function that does not compile: function f_query_01 Return interval Day to second is start_time timestamp(3); end_time timestamp(3); time_diff interval Day to second; c_query_number number; begin start_time := systimestamp; select count(*) into c_query_number from wg; <--This is the line th...

Java JDBC Oracle 9i upgrade to 10g issues...

We have just upgrade from oracle 9i to 10g and a database query I have works with the 9i client but not the 10g. Nothing in the query has changed. I get the following error: java.sql.SQLException: ORA-01036: illegal variable name/number Not really sure what is going on. Why wouldn't it run anymore. It's just a select statement which j...

How can I speed up queries against huge data warehouse tables with effective-dated data?

So I am querying some extremely large tables. The reason they are so large is because PeopleSoft inserts new records every time a change is made to some data, rather than updating existing records. In effect, its transactional tables are also a data warehouse. This necessitates queries that have nested selects in them, to get the most...

Using OpenRowset to connecto to Oracle from SQL Server

Hi guys, has anyone used OpenRowset to access an Oracle Database? I'm using the below statement to access Oracle: select * from openrowset('msdaora','Data Source=bidprod.boeingdb;User Id=;Password=;',' SELECT * FROM TABLE ') but I keep getting the below error. I think my problem is somewhere in my driver spec or data source spec. OLE...

Composite Index

There are fields in a table a, b, c; to a, b, c build into a composite index; find the condition that a> 10, b = 3, c <1; terms of how to find the best arrangement to make performance ...

Can I set up materialised views on oracle for a SQL Server table over sqllink?

Hi, I have a table in a SQL Server database that needs to be visible to an oracle database. We have tried using a normal view over sqllink, but we are not able to create an onUpdate triggers on that view. I have read that we can create the trigger if it is a materialised view, but is unable to find any information on whether it can be ...

How to get around 4000 characters limitation of text_query in Oracle's CONTAINS operator?

In Oracle, the full text search syntax of Contains operator is: CONTAINS( [schema.]column, text_query VARCHAR2 [,label NUMBER]) RETURN NUMBER; which means the text_query can not be more than 4000 characters long or an error will occur. I repeatedly have text_query longer than 4000 characters lon...

What is the best way to retrieve data from an oracle table using odp.net and pl/sql stored procedures?

I need to retrieve data from an oracle table using a pl/sql stored procedure and odp.net. What is the standard way of doing this? ...

Creating JDBC Connection with Oracle 10g using jsp.

I am able to connect to Oracle 10g (using ojdbc14.jar driver) with java. But when I use the same code in a servlet or file with .jsp extension, I am getting class not found exception. I am not able to understand why this is happening. Do we have different connection strings for JDBC in java and jsp? This is what I use to connect to oracl...

Tomcat 6, hibernate, oracle 11 logon denied

Project on eclipse 3.5, wicket, spring, hibernate, oracle 11 database and Tomcat 6 (Its a sample from book "wicket in action"). In this project I can not connect to database. Can anybody help to fix it? That is log: 25.06.2010 13:58:32 org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library w...