All versions of Oracle. Also add a version-specific tag like oracle-11g-r2 if that context is important in the question.

learn more… | top users | synonyms

1
vote
0answers
404 views

Oracle TOAD and Team Coding with TFS: Unable to get revisions from TFS

My company is currently exploring the option of using TOAD as a means to seamlessly allow developers to check-in/check-out code in TFS. This would be seeded by our packages, stored procedures, etc. ...
1
vote
2answers
33k views

Simple query with date type requires explicit conversion to_date of date

My question is, I have a table which contains a column called myDateColumn (for example) which is of the type date: I can confirm desc myTable contains this line: myDateColumn NOT NULL DATE ...
2
votes
1answer
208 views

PLSQL Package - Catching Errors in procedure (Oracle)

I have a problem with my package (and procedure) not catching exceptions. I have the below code: CREATE OR REPLACE PACKAGE process_orders IS PROCEDURE add_order ( order_num NUMBER, ...
0
votes
2answers
864 views

Oracle dump import

After a system failure I bought a new server and now I'm trying to recreate the Oracle database I had. I have a dump file which was made with the command exp and full=y. Can I restore the full ...
1
vote
2answers
144 views

How can I append a column to an inner SQL statement?

I have two tables that have the same structure except one has an additional column that should be auto-incremented. Sequence and trigger are defined. I want to copy all data from one table to ...
0
votes
1answer
83 views

Problems with generating Audit SQL

Im currently working on a project that uses Oracle 10g where every action from the user is recorded in a auditlog table. The current table holds the following values: AuditID AuditDate Username Page ...
1
vote
2answers
5k views

Why should pupbld.sql be run as SYSTEM (and not as SYS)?

pupbld.sql -- -- DESCRIPTION -- Script to install the SQL*Plus PRODUCT_USER_PROFILE tables. These -- tables allow SQL*Plus to disable commands per user. The tables -- are used only by SQL*Plus ...
1
vote
1answer
5k views

How do Savepoints work in Oracle?

I'm doing pretty serious operations on my DB and I would like to keep my data safe. Unfortunately something is going wrong, look: SAVEPOINT before_foo_update; CREATE TABLE AUX_FOO as SELECT * ...
1
vote
1answer
2k views

What are the pros and cons of using CLIENT_RESULT_CACHE_SIZE and RESULT_CACHE_MODE

I have multiple questions For Oracle Database 11g Release 11.2.0.1.0 what are the benefits of using CLIENT_RESULT_CACHE_SIZE and RESULT_CACHE_MODE. How will the CLIENT side cache be kept sync if ...
8
votes
1answer
28k views

What happens when you modify (reduce) a column's length?

Lets say I have two columns of type NUMBER (without precision, and scale) and VARCHAR(300). I saw that these columns are way too large for my data, so I want to modify them to NUMBER(11) and VARCHAR(...
1
vote
1answer
389 views

Imports & exports under storage constraints and preallocations

I have a 5GB oracle database that I want to export and then import on my own local database. Easy right? The point is, I use oracle XE 10g which allows me to use up to 4GB. I then decided to make the ...
5
votes
3answers
6k views

Using the same sequence twice in a PL/SQL statement

I wrote the snippet of PL/SQL today: declare first_id number; second_id number; begin insert into table (sort_nr, text_id, unit_id) values(..., table_seq.nextval, table_seq.nextval) returning ...
1
vote
1answer
234 views

Node and Instance Relationship on Oracle RAC

I'd like to ask about the process of Node and Instance on Oracle RAC functionality. I know that RAC provides Failover, a RAC feature that keeps an application running even if the node that was ...
1
vote
1answer
135 views

Oracle SQL, how to access latest queries and their data

I have SQL Developer, + Oracle client 11g. I wrote a program (MFC Visual C++) that read and writes data to a certain table. usually i put logs in the project so I could see what I insert/Update/...
4
votes
1answer
2k views

Network design considerations for Oracle Database Appliance

With the introduction of Oracle Engineered Systems the DBA is moved somewhat closer to infrastructure design decisions, and expected to at least have some opinions of the network design requirements ...
3
votes
1answer
7k views

Add an additional listener to Oracle Database Appliance

After deployment of Oracle Database Appliance with OAK 2.3.0 the standard listeners are configured for the public network on bond0. That includes SCAN listeners and one VIP listener per node. This ...
7
votes
4answers
22k views

Why use explicit cursors instead of regular loops?

I've been writing basic web apps for a year (for an Oracle db), and since the functions are pretty simple, most of us stick with regular FOR loops to get our data: for i in (select * from STUDENTS) ...
3
votes
1answer
986 views

Where can I find a syntax reference for Oracle SQL Developer's “Generate DB Doc” function?

Oracle SQL Developer (I'm using v3.2) has a feature called "DB Doc", which generates documentation for database objects. I mostly want to use it to generate documentation for my stored procedures, ...
0
votes
1answer
4k views

ORA-39083: Object type INDEX_STATISTICS failed to create with error

I am trying to restore Oracle DB from a backup taken recently. While restoring I got the following error: Failing sql is: DECLARE I_N VARCHAR2(60); I_O VARCHAR2(60); NV VARCHAR2(1); c ...
1
vote
1answer
182 views

Getting the page name from a web URL in Oracle

I have a list of page URL's in my database table under the column heading URL. There are many different prefixes on each page name for example: Test1/Admin/Page7.asp Test1/One/Page3.asp Test1/Another/...
1
vote
2answers
13k views

Trigger to automatically add values to a table in Oracle

I am new to Oracle. I am looking for a trigger which helps to automatically insert values into a table when data is entered into another table in the same database. I have tried a lot and didn't ...
2
votes
2answers
15k views

Why an object became invalid in oracle databse.

There are some invalid views and functions in my database. I am not sure what changes caused these objects to became invalid since many people are working on the same database. How can I see which ...
2
votes
1answer
816 views

Oracle 10 to 11: charset issue

I was redirected from SE's root site to this one. I'm not a DBA, so I shouldn't be doing this, but I have to, so I apologize beforehand to all of you DBAs that will read this post: I'm migrating an ...
2
votes
2answers
1k views

Tablespace and userid info

I have to create some scripts to create a new and empty DB ready for a new install of our apps on a new server. I am easily getting the tables, views etc info from SQL Developers Export facility (...
8
votes
1answer
34k views

Importing schema to new or different tablespace

Is there a convenient way to import a schema into Oracle 11gR2 using a single new or different tablespace than where the data originated? As an example, I have exported BLOG_DATA from OLDDB, where ...
0
votes
3answers
3k views

ORA-01562: failed to extend rollback segment number 11

I´m trying to execute this query into a SP DELETE FROM table SC WHERE SC.evaluationMonth= 'Some month'; COMMIT; But for this month there are something like 10 million records. So I get the ...
1
vote
1answer
21k views

Oracle: Output not shown even if SERVEROUTPUT variable set to ON [closed]

I was wondering why the output is not being shown even if I set the SERVEROUPUT variable to ON. I have the following annonymous block code: DECLARE v_rec_count number:=0; BEGIN for rec in (...
5
votes
1answer
6k views

how to use dual foreign key in oracle 10g

I have created two tables create table ref1(id varchar2(3) primary key); create table ref2(id varchar2(3) primary key); Now I want to create a third table with a single column as foreign key for ...
1
vote
1answer
201 views

Why create an “oracle” user for installing Oracle 10g or 11g?

What is the specific reason for creating the oracle user to install Oracle 10g or 11g, even though root exists and can be used? Is it possible to install as root by adding root to the oinstall group? ...
0
votes
1answer
63 views

How to add the aliases to the group by clause

In the below query how to add the aliases assignedTOiti, assignedTOasstAdm, assignedTOhlp, closedDate to the group by clause. I am struggling for the past few hours. SELECT ieor.aper07_req_k ...
1
vote
1answer
729 views

Restoring Oracle prod backup to test server with new database name

I need to restore an Oracle production database (aaprod) to a test server that already is home to a test database (aatest) under a new name (bbtest). I have a cold backup of the production database ...
-1
votes
0answers
450 views

Synchronising SQL tables in two locations [closed]

We have a bit of a conundrum at the moment. ANSI SQL solutions please. We have two databases located at two different geographic locations and will be using the web for all traffic between the two ...
1
vote
0answers
788 views

How can one reliably update a LOB column with data from another LOB column in Oracle?

I have tried: UPDATE "SCHEMA".TABLE SET LOB_COLUMN = (SELECT LOB_COLUMN FROM "SCHEMA".TABLE) I have tried: CREATE OR REPLACE PROCEDURE COPY_LOB_DATA IS OLD_BLOB BLOB; NEW_BLOB BLOB; ...
2
votes
1answer
49 views

Convert Log table days in a state

This is simplified but represents the problem I am trying to solve. We have a table containing 5-10 million rows in a format similar to the following... Input Table Date Item Moved to Box Oct-1 ...
1
vote
1answer
1k views

Oracle 11g: Part Copy of Production data to Development Environment

I have a Production database with the current size involving two principale schemas: SQL> SELECT SUM(bytes)/1024/1024/1025 "Size in GB" FROM dba_segments where owner in ('SCHEMA1','SCHEMA2'); ...
6
votes
2answers
5k views

How do I query to pull all data in row based MIN and MAX service date?

I'm very new to Oracle SQL especially in the Pentaho report builder. It lets you do some things and block others. PL/SQL is not available so I must do this in a query. I need to be able to pull ...
5
votes
1answer
6k views

Export table without BLOB column

I have a big table with BLOB objects and some references from other tables to this one. I prepare dev and test schema for my app by making expdp (data pump) from production, then anonymizing data on ...
12
votes
1answer
3k views

Commit vs Fast Commit vs Commit Cleanout in Oracle Database

I was wondering whether someone could verify my understanding regarding the differences between those 3 terms as pertaining to Oracle Databases. Many sources confuse these terms and do not explain ...
0
votes
1answer
2k views

Getting error when using Oracle imp command to import dmp file

I am importing a dmp file using the following command: imp user/pass file=file.dmp log=logfile.log full=y ignore=y destroy=y I get the following errors: . . importing table "...
1
vote
1answer
65 views

Supporting Multiple Oracle Clients

I have an application where the data repository is moving to Oracle 11g. This means we need the new Oracle 11g client on the application server to support the retrieval of their data. Is it ...
7
votes
1answer
164 views

Cardinality is so far off from reality

I've got a table where the cardinality for plans just seems waaaaaay too high - despite updating stats and even trying dynamic sampling for Oracle 11gR2. select count(*) from table1 where col1 = ...
2
votes
1answer
4k views

How do I export data from Oracle 11.1 to 10.1?

I have a 11.1 oracle server and I need to export a dump file for a client who has a 10.1 server. While reading the documentation, I figured out I needed the 10.1 Export Utility. I searched the ...
3
votes
3answers
916 views

Why does the query cost change so much and how to prevent it

The query causing me the issue is too big, but the piece that seems to be the core is quite simple, I will try to go with that: The query has an structure like: SELECT ... a lot of stuff ... ...
15
votes
2answers
92k views

How is the default tablespace determined when creating a table?

The Tablespace parameter is optional when creating tables. Upon execution of a CREATE TABLE statement, Oracle assigns the default one if it was not defined. In the default database there is a "...
3
votes
2answers
850 views

Pivoting data for stacked charts (grouping and creating new columns for each distinct value)?

I have something that looks like this (SQL Fiddle here): Date Location Value 1/1/2012 Baltimore 36 1/1/2012 Houston 36 1/1/2012 Chicago 55 2/1/2012 Baltimore 49 2/1/...
1
vote
1answer
98 views

What is the best relationship model for high performance?

I want to model a relationship between Customer and Transaction. However, because Customer is only described by a unique string and no extra info, I have two possibilities to implement it in the ...
1
vote
1answer
811 views

What are the things need to be considered while creating tablespace?

I am creating temporary/permanent tablespace on Oracle. As I am going to create an application that is transactional there will be traffic. I bumped into concept called tablespace in oracle. What kind ...
8
votes
2answers
366 views

How to modify an update in Oracle so it performs faster?

I have this query: UPDATE ( SELECT h.valid_through_dt, h.LAST_UPDATE_TMSTMP FROM ETL_FEE_SCH_TMP d, FEE_SCHEDULE_HISTORICAL h WHERE h.FUND_ID = d.FUND_ID AND h....
1
vote
0answers
349 views

Oracle server session terminated by fatal error

I have an Oracle server running on Windows Server. When an INSERT statement runs I receive an Oracle Ora-00603 error. The insert statement just tries to insert a BLOB into a table. I searched the ...
5
votes
1answer
1k views

Trying to copy a schema using impdp

I'm trying to copy a SCHEMA in its entirity using oracle's IMPDP tool. I've setup a database link back to itself and the link works fine. Then I'm running this: impdp username/password@instancename ...