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
1answer
32 views

ORACLE: Changing the grouping of a data to be based on month breakdowns

To keep this short and to the point, I am looking at modifying the grouping for this SQL query to go from NAME to Month/yy Here is a example of the script, and screenshots of the output file This is ...
0
votes
3answers
85 views

Get current time, on commit, with oracle database

When inserting a row I want to make a column, equal to the current time on commit. If I use default value sysdatetime on the column, it uses the current time at insert (which could be significantly ...
1
vote
0answers
42 views

How to recover LogMiner after its tablespace had been deleted?

Here is my story: I created separate table space for Log Miner, create tablespace logminer_ts datafile '/path/to/logminer.dbf' size 50M AUTOEXTEND ON And moved Log Miner to the created table ...
0
votes
2answers
50 views

Oracle ASM : Alter asm_diskstring when ASM Instance is Down,

I am beginner for Oracle ASM I know we can alter asm_diskstring with following ways SqlPlus ASMCA but these requires +ASM to be UP and running. Is there way to set asm_diskstring when +ASM ...
0
votes
2answers
55 views

Is is posible to sample a database

Is it possible to sample any SQL database? By sampling I means the database table should remain and retaining the foreign key constraints. But the actual rows from the table should be reduced.If I ...
1
vote
1answer
33 views

Reset schema oracle

I'm running systemtest that updates a oracle schema. I need to reset the whole scheme between runs. Is there an easy way to do this in oracle 12. I have looked at flashback but it doesn't seem to be ...
1
vote
1answer
61 views

Connecting Oracle 11g to Postgres via dblink

I have administrator access to our Oracle database , but was wondering if its possible to connect an Oracle 11g database to Postgres database and if so, what steps would I need to follow. I've seen ...
0
votes
2answers
59 views

INSERT OR REPLACE INTO + SELECT as source in Oracle

I have two tables A and B. I want to insert B's content into table A. The issue is there's a row in B that already exists in A. I've searched and I found some answers talking about MERGE, but no ...
1
vote
2answers
104 views

Need advice on database normalization

I am working on a basic blood bank database on Oracle. I would like to create a completely basic normalized table and then I will add more details to it. I have done it to the 2NF and I will further ...
0
votes
0answers
35 views

jdbc Datasource error BEA-001131 Closed Connection

I have Installed weblogic 10.3.5. On database side I have RAC environment with Two instance. I have created GRIDLINK DataSource with XA DRIVERS. NAME: test JNDI: jdbc/testDS NOTE: I ...
1
vote
0answers
55 views

Getting email notification when jobs are created under user_schema rather than sys?

I log in as sys and set the smtp for scheduler: BEGIN DBMS_SCHEDULER.set_scheduler_attribute('email_server', '10.1.1.15'); DBMS_SCHEDULER.set_scheduler_attribute('email_sender', 'user@compny.com')...
1
vote
1answer
36 views

Copy a single record to a replica table before update using trigger (Oracle 12c)

I want to insert a complete record (before updating original record) to a replica table using trigger. Following are the sample tables: create table customer ( cID number, cName varchar2(30)...
0
votes
1answer
35 views

Configure Oracle EM to Send Emails

We are using Oracle 11gr2 installed on Linux. Tried to use Enterprise Manager to send email alerts in case of tablespace is near to full. Alerts are generated on EM but no emails are received when ...
6
votes
2answers
164 views

ANALYZE TABLE..VALIDATE STRUCTURE runs forever

So, as I've mentioned before, I am a SQL Server DBA/Consultant who is helping out a customer with their Oracle databases. Mostly, I've been able to figure out what I need to and work through things ...
0
votes
2answers
65 views

oracle rman connecting to a database in not mount state

When connected to oracle database through rman directly from the terminal, everything works fine, but when the same connection string is executed through a shell script rman connects to the database ...
1
vote
2answers
94 views

Find percentage of NULL storage in Oracle table

I have a table in Oracle 11g Standard One Edition: table1 col1 col2 col3 col4 col5 col6 col7 col8 col9 col10 col11 1 NULL 2 3 4 5 NULL NULL 19 21 22 1 NULL 2 3 ...
1
vote
0answers
78 views

Oracle Forms 11g R2 connect to Oracle 11g

Thank in advance! I have 64bit Windows 7 with installed Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit. I installed Oracle WebLogic 10.3.6 how it described here. But it's install ...
0
votes
1answer
65 views

ORA-02049 Timeout: Distributed Transaction Waiting for Lock Solution needed

We are cleaning up the last year's transactions from our primary database. We use public database link to delete the records a day by day from another database. Each days records are around 30-40k, ...
2
votes
1answer
29 views

Return only one row from table with similar values in column that match a criteria

I want to run a query from a table with similar values in the same column that match a certain criteria, but only return 1 row per similar value. Let's say I have this simplified table: Column1 ...
2
votes
1answer
28 views

SQLPLUS Default Column Widths

For almost all my databases, when I run a SELECT statement, the length of the column displayed is sized to the width of the data being queried. However, I have two databases (Dev and Prod for the ...
1
vote
2answers
31 views

Oracle DATE column - How to convert to UTC

I have an oracle 10g table with a DATE column type. I need to compare it in a where clause to a value generated by a script that looks like this: TIMESTAMP '2016-05-12 08:00:00.258000 +00:00'. I ...
0
votes
1answer
22 views

not a single-group group function when trying to add two sum() function [closed]

I have two tables: create table a ( index_ numeric(1), value_ numeric(2) ); create table b ( index_ numeric(1), value_ numeric(2) ); Now I want to get the number of these two tables sum,I ...
0
votes
1answer
15 views

Oracle drop database - Can images stored in RMAN catalog be retained?

It seems the default behavior when an Oracle database is dropped / deleted (entire server retired) that any RMAN entries for that system are also dropped. Is it possible for RMAN to retain records ...
1
vote
1answer
93 views

Oracle Triggers - before any UPDATE or DELETE or INSERT

I am trying to create a database trigger in Oracle SQL Developer that would fire before any UPDATE, DELETE, or INSERT statement occurs on the sessions table. My sessions table: CREATE TABLE sessions ...
4
votes
2answers
106 views

Query “last” records in a table with non-sequential key fields

My goal is to clone a table from an Oracle database to a SQL Server database every midnight. I am using Talend Data Integration for this task. The problem is that this table has around 70 million ...
-1
votes
1answer
30 views

Generate and fetch table statistics [closed]

I am trying to generate statistics for my tables. I am doing it with the following command: exec dbms_stats.gather_table_stats(USER, 'tab_name', cascade => TRUE); Then I am trying to fetch these ...
2
votes
1answer
47 views

Getting ORA-01017: invalid username/password in non-CDB database

I have installed Oracle 12c (software only in Linux) and created a non-CDB database (single tenant) database. Following is my listener.ora. LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (...
1
vote
2answers
74 views

How to get the DDL for Oracle object without extra characters

When using Oracle's dbms_metadata.get_ddl for getting DDL I see some extra characters, especially there are whitespace characters at very beginning of DDL script. For example, if I create this sample ...
0
votes
1answer
56 views

Oracle log miner permission: which permission authorize user to use logMiner as scheduled JOB?

I'm trying to config user to run logMiner from scheduled job periodly. my user called admin I've grant the admin user the following: grant select on v_$database to admin grant execute on ...
0
votes
2answers
96 views

Query against history table not using index (Oracle 12c)

I have a history table which has an 'ID' and 'TIMESTAMP' column as such CREATE TABLE hist ( HIST_ID INTEGER, HIST_TIMESTAMP TIMESTAMP, ID INTEGER, -- this is the id of the table that is being ...
1
vote
0answers
35 views

Oracle Monitoring RMAN: report need backup

Hello Oracle Database Admins! In the last few months I came across that it would be a good idea to monitor rman backups and check if any file needs backup. RMAN> report need backup; --> Report ...
0
votes
1answer
31 views

Return output of Oracle query

How to change below query to see results of my_sql (now I see only query, not it results) in SQL Developer? DECLARE my_sql VARCHAR(1000); BEGIN FOR t IN (SELECT t.table_name, t.owner FROM ...
2
votes
3answers
91 views

using tnsnames.ora and sqlplus client without installing oracle 11g server on linux client [closed]

I want to create a connection to remote Oracle server using SQLplus client and tnsnames.ora without installing Oracle 11g server on the Linux client. I used debian and bash script to generate reports ...
0
votes
1answer
23 views

Procedures In Oracle [closed]

--Procedures Exercise: create or replace procedure Display is cursor ABC is select empno, ename, sal from emp where deptno=10; emp_rec ABC%rowtype; Begin Open ABC; Loop fetch ABC into emp_rec; exit ...
1
vote
2answers
57 views

How could I get the value as Y or N in one table if value is exists on another that meets certain condition?

I have to generate simple report from three tables named customer, product, and order. My report should have a column that shows whether the customer ordered that product or not. How could I get the Y ...
0
votes
1answer
44 views

how to get multiple rows from multiple tables concatenated into a single string in a stored procedure in Oracle

I have a table A that has 7 different 1-N relationships. Given an A id, now I am running 7 simple queries to get the N side rows. I suspect this could be sped up. Is it possible to: create a stored ...
4
votes
1answer
31 views

Oracle SQL 12c How to correctly use compound foreign keys in compound primary keys?

DISCLAIMER: I am a student. I do not work for an airline. I do not pretend to be a professional programmer. Greetings, I want understand what I need to correct in order for these tables to work ...
1
vote
2answers
66 views

ORA-01017 connecting to example schemas on Oracle VM appliance from Windows host

I'm a software developer and am working on getting an Oracle VM Appliance running for testing purposes (the Database App Development VM with Oracle 12c - http://www.oracle.com/technetwork/community/...
1
vote
1answer
62 views

Explain plan gives different results depending on schema

I have a query that joins a multi million row table to one containing hundreds of thousands of rows. Schema owner 'ABC' owns the smaller table and schema owner 'DEF' owns the larger table. They both ...
0
votes
1answer
39 views

Shared memory error while connecting to Oracle

I get this error message each time I try to connect to my Oracle XE local database under Ubuntu 15.10 : user@user-X220:/u01/app/oracle/product/11.2.0/xe/network/admin$ sqlplus SQL*Plus: Release 11.2....
0
votes
0answers
32 views

Changing database parameters after removing a node from RAC oracle

Oracle 11.2.0.3 on SunOS 5.1 i have a client who is running a 2 node RAC environment but has shutdown the instance on one of the nodes. I was wondering whether after doing this they should change the ...
0
votes
1answer
49 views

How to make a query on multiple columns without writting all possible permutations?

I'm at my first question on stackexchange, as i have a few days since I struggle on this matter: I want to make a complex query(PLSQL) on a table that has col1,col2,col3,col4,col5 having values like (...
1
vote
1answer
49 views

Importing .dmp file into SQL developer: Do I need to import seperately for each table?

I have a large .dmp file which I would like to import into SQL developer. This contains all the data I want to import across several Schemas. Do I need to split this up into each separate table in ...
0
votes
0answers
71 views

'OraOLEDB.Oracle' provider is not registered on the local machine - Oracle Database Client 12C

I have some problem with connect to the Oracle Database by Oracle Client. I installed on laptop oracle client - version 32 bit. I can connect to the database from laptop when i use 64 bit applications,...
0
votes
1answer
31 views

ORA-00932 on subquery join from subquery join

The only guess I have is that perhaps the size of the subquery is considered a CLOB? I have no null values for the fields selected AFAIK. SELECT DISTINCT kbq_ent.qid AS kbq_ent_qid, kbq_ent....
1
vote
0answers
34 views

How can I “buffered” mine Oracle logs using LogMiner with 'committed data only' option properly?

Using Oracle LogMiner with committed data only flag, According to the Oracle documentation, all the committed records with the same commit scn, will be joined together and will appear in a sequence. ...
0
votes
1answer
48 views

How to declare reserved words as variables in Oracle PL/SQL?

What is the best way to bypass the Oracle SQL reserved-word constraint for PL/SQL value declaration? I realize bind and substitution may be acceptable alternatives for an actual query, but what about ...
1
vote
1answer
23 views

multi-tenant data related to multiple customer? [closed]

tenant type design on the database schema tables. We have about 20 customers data and single web application is serving it. Question, how do we improve query performance or what type of database ...
0
votes
0answers
15 views

Oracle E-Business Suite Installation

What should i do to download latest Oracle EBS ? I mean, There are lots options on eDelivery and i confused a lot. Oracle E-Business Suite 12.2.5.0.0 for Linux x86-64, 113 files Select Alternate ...
1
vote
1answer
44 views

how do I change regexp_substr(to_char(bar), '^.*?$', 1, 1, 'm') to only read 132 characters each time

how do I change the query below so it only reads and displays 132 characters each line with w(id, line#, line, rest) as ( select id, 1, regexp_substr(to_char(bar), '^.*?$', 1, 1, 'm'), ...