Questions tagged [oracle11gr2]

Oracle 11gR2, an RDBMS product, is the second and terminal release of the Oracle 11g database.

Oracle 11gR2, an RDBMS product, is the second and terminal release of the Oracle 11g database.

See for more information.

435 questions
27
votes
4 answers

Selecting both MIN and MAX From the Table is slower than expected

I have a table MYTABLE with a date column SDATE which is the primary key of the table and has a unique index on it. When I run this query: SELECT MIN(SDATE) FROM MYTABLE it gives answer instantly. The same happens for: SELECT MAX(SDATE) FROM…
RGO
  • 4,586
  • 3
  • 26
  • 40
20
votes
3 answers

How to eliminate subtype dependency?

In the example below I have written one to_str() function and one set() procedure for every pls_integer subtype. The functions and procedures are almost identical except the type. How I can eliminate the need to write yet another to_str() and set()…
user272735
  • 10,473
  • 9
  • 65
  • 96
18
votes
6 answers

How to change schema name?

I have created a user: CREATE USER gds_map IDENTIFIED BY gds_map; And now I need to change a name. I tried to update or find other way but have not found nothing yet. I will be glad of any hint.
adelak
  • 647
  • 4
  • 11
  • 25
17
votes
1 answer

Adding columns to existing index in Oracle

I have a relatively large table (81M rows) and an index on it. I want to add a column to the existing index. I searched for it on Google, but I couldn't find a way for it. I've read somewhere that the only way to add a column to an index is to drop…
bonsvr
  • 2,262
  • 5
  • 22
  • 33
17
votes
4 answers

Finding the longest streak of wins

I have data in following format. match_id team_id won_ind ---------------------------- 37 Team1 N 67 Team1 Y 98 Team1 N 109 Team1 N 158 Team1 Y 162 Team1 Y 177 Team1 …
Noel
  • 10,152
  • 30
  • 45
  • 67
14
votes
2 answers

Configure ASP.NET MVC 4 Application with Oracle Database

I am currently working on ASP.NET MVC 4 project with Oracle database. I have successfully add the connection string in my Web.config file like here:
Mark
  • 8,046
  • 15
  • 48
  • 78
13
votes
2 answers

Calculate the percentage of the root owned by its parents

In simplified terms, I'm trying to calculate the percentage of the root of a tree owned by its parents, further up the tree. How can I do this in SQL alone? Here's my (sample) schema. Please note that though the hierarchy itself is quite simple…
Ben
  • 51,770
  • 36
  • 127
  • 149
12
votes
2 answers

Is this a PL/SQL bug?

Here's an excerpt from some PL/SQL code that I believe demonstrates a PL/SQL bug: if guid_ is null then dbms_output.put_line('guid_ is null: ' || guid_); end if; When these lines are executed, it prints guid_ is null:…
René Nyffenegger
  • 39,402
  • 33
  • 158
  • 293
12
votes
1 answer

PLSQL: VARBIABLE := SEQUENCE.NEXTVAL or SELECT SEQUENCE.NEXTVAL into VARIABLE from dual?

What is difference in PL/SQL from: CREATE OR REPLACE FUNCTION WBAR_TEST_1 RETURN NUMBER IS LN_TMP NUMBER; BEGIN LN_TMP := SOME_SEQUENCE.NEXTVAL; RETURN LN_TMP; END WBAR_TEST_1; and CREATE OR REPLACE FUNCTION WBAR_TEST_2 RETURN NUMBER IS …
WBAR
  • 4,924
  • 7
  • 47
  • 81
11
votes
3 answers

Oracle 11GR2 TKPROF - How to capture the recursive call-tree

Objective Find out a way to visually capture the recursive call trees in the TKPROF output (SYS=YES specified). Environment Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production Windows 7 64 bit on DELL Latitude core i7 2.8GHz…
mon
  • 18,789
  • 22
  • 112
  • 205
11
votes
3 answers

How big is an Oracle XMLType when stored as BINARY XML

The Oracle documentation claims that it stores XMLType more compact as BINARY XML than as CLOB. But how do I find out how much space is taken by the binary xml? CREATE TABLE t (x XMLTYPE) XMLTYPE x STORE AS BINARY XML; SELECT vsize(x),…
wolφi
  • 8,091
  • 2
  • 35
  • 64
10
votes
2 answers

Export from Oracle 10g database with 11g client

Database Version : 10g Enterprise Edition Release 10.2.0.4.0 Client Version: 11g Enterprise Edition Release 11.2.0.1.0 (windows 7 64bit) When I try to export (exp) a table from database: exp usr/pass@remote_db file=f.dmp tables=table I get the…
bonsvr
  • 2,262
  • 5
  • 22
  • 33
10
votes
4 answers

DBMS_DATA_MINING.CREATE_MODEL causes "ORA-40103: invalid case-id column: TID" on 11.2.0.1.0 64b, but on 10g OK

I have a problem with DBMS_DATA_MINING.CREATE_MODEL on version 11.2. On 10g this code below works OK, and I'm quite sure that on 11.1 it works too. CREATE OR REPLACE VIEW "SH"."ITEMS" AS SELECT PROD_ID AS item FROM SALES GROUP BY PROD_ID; CREATE OR…
zacheusz
  • 8,750
  • 3
  • 36
  • 60
10
votes
4 answers

truncated LISTAGG string

I'm using Oracle 11g r2 and I need to concatenate strings (VARCHAR2, 300) from multiple rows. I'm using LISTAGG which works great until the concatenated string reaches the limit. At that point I receive a ORA-01489: result of string concatenation is…
Howie
  • 2,760
  • 6
  • 32
  • 60
9
votes
2 answers

How to tell System.Data.OracleClient to use the 64 bit Oracle Driver

I am trying to run a .NET application which uses System.Data.OracleClient on a Win7 x64 workstation. The workstation has a 32bit Oracle client installed, which leads to the following error message: Attempt to load Oracle client libraries threw…
chiccodoro
  • 14,407
  • 19
  • 87
  • 130
1
2 3
28 29