Oracle Database 11g (not 11g R2). Please also tag oracle for search purposes.

learn more… | top users | synonyms

0
votes
1answer
20 views

Get dates between two months

Can I know why am I getting weird output in my SQL statement whereby my table has two dates of the month May but it only appears for one month, the same things I test for dates range it is working. ...
0
votes
0answers
14 views

network Adapter could not establish the connection in netbeans with oracle11g in linux

I am using fedora 23 64 bit. My system is up to date. I have installed oracle 11g xe. I have downloaded the jdbc driver 'ojdbc6" , now i am trying to connect netbeans with the oracle database but it ...
1
vote
1answer
20 views

Display dates not in ascending for To_Char

can i know why and how i can solve the problem whereby if i use To_Char it does not sort the date in ascending. Below is my code select distinct To_Char (attendance_Date, 'dd/mm/yyyy') from ...
2
votes
2answers
46 views

Select rows where smaller row does not exist

Consider the following table data: ID NAME 1 Kshitiz 2 Aman 5 Aakash 6 Manjeet Here there are records missing between 2 and 5. What query can I use to select row 5 in this table?
0
votes
1answer
13 views

(SQL) User tables are separated into two sections

Using SQL Plus, I create 13 tables via an .sql file, each containing primary and foreign keys. When I execute "select table_name from user_tables;" they are displayed in this partitioned fashion. ...
0
votes
1answer
47 views

Very fast individual queries but when joined super slow

I've got query 1: select department_id from USER_ACCESS where USER_ACCESS.USER_ID = 13170 AND USER_ACCESS.MANAGEMENT = 1 Takes about 0.475 seconds, which is not a lot for the data set I m ...
0
votes
2answers
44 views

Name already been used by an existing constraint after renaming the table and creating a new one

I would like to know why, if I alter a table name to different name and then create a table with the same name, I am getting the error "name already been used by existing constraint". This is the ...
0
votes
1answer
18 views

Is it possible to perform skip N rows and fetch M rows without full scan

Let's say I've got this query: SELECT EMP_ID,LAST_NAME FROM EMPLOYEES WHERE POSITIONID IN (1,3) ORDER BY POSITIONID,LAST_NAME; Now if I want to show only the first ten rows between 50 and 60, ...
0
votes
0answers
20 views

Copying values from one table to another table which the column intended to be copied delared as default

Can i know, the below column late_allowed when creating attendance table i declared as default and with a numbers (such as 3). The problem is that i am not sure how to put and where can i put default ...
0
votes
1answer
43 views

Why does Oracle change my date fields?

I have an Oracle 11g XE set up in Moscow, Russia, and therefore on MSK time zone. When a client in the same timezone stores a DATE variable from Java with, say time set to 12:00, the time is changed ...
0
votes
1answer
14 views

ORA-24033 : No recipient for message has been detected

I am using Oracle E-business Suite R12.1, 11G database version. Error I encountered when trying to create or modify a user or responsibility: ORA-24033 : no recipient for message has been ...
-1
votes
0answers
10 views

getting an error ORA-00923: FROM keyword not found where expected [duplicate]

select top 10 * from employees I am getting an error in the above statement. tried a lot of scenarios in order to resolve it, but couldn't fix it. Please help. Thanks
0
votes
2answers
46 views

Having primary key in both fields but repeated in either fields allowed repeating

Is it possible to have both fields to be primary key but allows repeating For either 1 field in Oracle SQL. Student_ID Date 1001 23/10/2016 // allowed 1002 23/10/2016 // ...
0
votes
1answer
35 views

Help on joining 3 tables Oracle XE 11g

I am trying to return the first name, surname, subject and mark from the following tables: SQL> desc students; Name Null? Type ------------------------ -------- ...
0
votes
0answers
14 views

Prerequisite for learning oracle DBA [duplicate]

i need an advice on the needed skills to start an oracle DBA. Thanks
0
votes
1answer
40 views

Oracle RAC 11g creation

I would like to play with RAC configuration. Using virtual area (VMware or VirtualBox): RAC1 (Windows 2003 Server) RAC2 (Windows 2003 Server) Shared storage (Openfiler) DNS server (for using SCAN ...
2
votes
1answer
63 views

Problem using pivot to display data

I currently have a table called sample, the structure of my attendance table is: create table sample ( Student_ID VARCHAR2 (10), Late_Attendance number (10) Default 3, Attendance_Date Date, ...
0
votes
1answer
43 views

Multiple counts in a SQL statement

Is it possible to have more than one count in a SQL statement such as: SELECT student_id, ( COUNT (ATTENDANCE_ID) from attendance where attendance_id IN ('ABSENT') ...
0
votes
1answer
28 views

Updating data from subpartition when the subpartition name is unknown

Thanks to JSapkota who helped me pull the subpartition name as per below query select subobject_name from user_objects where data_object_id IN (select dbms_rowid.rowid_object(rowid) from TABLE ...
1
vote
1answer
32 views

Is there a way to find the partition or subpartition name where my ID belongs

I know if I need to select from any partition I need to provide partition name SELECT * FROM TABLE PARTITION(P1); What if I need to know which partition a particular value belongs using a sql query ...
0
votes
1answer
51 views

Help interpreting Oracle RMAN results

I am extremely new to Oracle and had to take a backup on an 11g database that is in NOARCHIVELOG mode. Below is the output. It claims that the backup failed but I have a file of appropriate size where ...
-3
votes
1answer
34 views

Converting SQL Syntax: Oracle to MySQL [closed]

I have the following SQL code written in Oracle SQL developer: CREATE TABLE students ( student_id INT NOT NULL, username VARCHAR2(30), email VARCHAR2(80), password VARCHAR2(30), f_name VARCHAR2(30), ...
0
votes
1answer
48 views

Not exists in sql query

I'm using oracle database I need to display customer id and customer name of those customers who have not purchased at all from any retail outlet using not exists My query: select ...
0
votes
1answer
46 views

Oracle: How can I create a where clause programmatically?

Good day Suppose I have a table like such: TBL_CONDITIONS: | ID | WHERE_CLAUSE | |----|---------------------------------------| | 1 | fruit = 'apple' ...
0
votes
1answer
74 views

Can we expdp using JOINS in QUERY clause

I have a task to export data from database using data pump. I have successfully exported database using subquery in QUERY clause. But I want to know can we expdp using joins in QUERY clause?
1
vote
1answer
56 views

How to add Subpartition to all partitions

I believe adding sub-partition in Oracle 11g is easy ALTER TABLE PART_TEST modify partition OCT19 add subpartition OCT19AXCS values ('AXCS'); I have close to 250 partitions..namely jan07 feb07 ... ...
0
votes
1answer
103 views

Can we export Selected Row with Subquery using data pump

I am trying to export selected rowS from my database using SUBQUERY but I got error. expdp directory=exp_data dumpfile=selected_row.dmp logfile=rows.log tables=sample,super query="where name IN ...
1
vote
1answer
91 views

permissions for yet another “ORA-06512: table or view does not exist” scenario

See the code below. I'm running the code with user x in schema y. The exact same code works if I run it by user x in schema x, but not with user x in schema y. I get the error ORA-06512: table or ...
3
votes
2answers
100 views

How to find foreign keys that don't have corresponding indexes?

I have installed Oracle database 11g R2 with a customized application. In my environment we are experiencing locking on tables. I want to check if there are foreign keys in my database without the ...
0
votes
0answers
61 views

TNS Time out Error ORA-12170

I am trying to connect to a remote Oracle 12c database from a client machine that has 11g oracle drivers for ODBC. I can reach to remote machine through ping but can not Telnet the remote machine on ...
2
votes
1answer
117 views

LGWR is switching frequently in every 3,4,7 minutes. what should i do

I am running Oracle 11g R2 single instance on Linux 6.7. Data guard is also configured. In a database I have 4 groups of redologs, each group has 2 members and each logfile size is 200mb. The ...
1
vote
1answer
41 views

special setup to create views in Oracle in default schema

When creating views in Oracle, do you need special setup for a given user if the view and table in which the view is reading from are in two different schemas? The user creating the view has dba ...
2
votes
1answer
79 views

Why Does Oracle kill a session at the specific time? [closed]

Oracle kills sessions remotely open at the specific time. It means if I open a session at local machine, it is ok. In my case, at every 58 minute. For example, at 13:58, 14:58, 15:58 and so on. It ...
1
vote
1answer
57 views

Oracle 11.2.0.3 Service Name Mismatch issue

My Environment During Installation SID lab3 Service_Name lab3.domain.com Changes Some time ago I changed my service_name to just lab3 to match my SID Select instance_name from v$instance; ...
0
votes
1answer
30 views

SQL command not properly ended

Do you see why is appearing this error "SQL command not properly ended" in the select statement below? Select command in oracle: select l_orderkey, sum(l_extendedprice * (1 - ...
0
votes
1answer
44 views

Changing own user permissions with Oracle SQL not being the DBA

I have been making changes to a couple of schemas of different environments (they belong to the same application). Sometimes I'll want to copy data from one environment to the other, and sometimes ...
0
votes
0answers
74 views

How do I open Data Pump Import Wizard in SQL Developer 4.1?

How do I find and open the Data Pump Import Wizard in SQL Developer 4.1? I opened the Help search tool in SQL Developer 4.1 and searched for Data Pump, and found directions that include: 1.) ...
0
votes
1answer
29 views

Creating report based on the sql statement

I would like my report to display something image like as below so can i know is it how my sql for table has to be when creating it create table attendance ( Student_ID VARCHAR2 (15) ...
1
vote
3answers
196 views

ORA-02270: no matching unique or primary key for this column-list

I getting an error report of: Error report - SQL Error: ORA-02270: no matching unique or primary key for this column-list 02270. 00000 - "no matching unique or primary key for this column-list" ...
3
votes
1answer
92 views

Global command to destroy all disconnected data files in Oracle 11g

Is there a global command to delete/purge all disconnected .bdf files in an Oracle 11g R2 database? Here is the scenario: Every user-defined user and user-defined tablespace was deleted from an ...
0
votes
1answer
79 views

How can I launch SQL Developer?

I recently installed Oracle 11g R2 on a Windows 8.1 machine, but for some reason SQL Developer does not seem to launch easily. What specific steps do I need to take in order to launch a working SQL ...
2
votes
1answer
66 views

Can I use an RMAN Backup of DB1 to replace DB2

I have a backup of an Oracle 11g database on Linux, that is a version that is 'prescrub' needed by other users. This is for an ACTIVE database that is now scrubbed, so I do not want to use it as the ...
1
vote
1answer
194 views

How do I import data into oracle 11g r2 using a `.dmp` file and a `.par` file?

How do I import data into a new installation of oracle 11g r2 using a .dmp file and a .par file? Here is what I have done so far, on a Windows 8.1 devbox: 1.) Open command line as administrator ...
1
vote
0answers
78 views

Sync oracle DBs using archive log when not connected to each other

I'm trying to synchronize 2 dbs which are not connected to each other, and located in a separated networks. The 'copy db' (aka: standby) can be read only, but still should be active. My intuition ...
0
votes
1answer
36 views

Using exception with raise_application_error

I'm developing with Oracle 11g. How can I use a named exception in RAISE_APPLICATION_ERROR like this: DECLARE my_fault EXCEPTION; PRAGMA EXCEPTION_INIT (my_fault, -20000); BEGIN ...
2
votes
1answer
77 views

aggregate column of nvarchar2 and obtain result in nvarchar2 too

I need to create a view with an aggregate column of nvarchar2(4000) in Oracle 11g. What I have: Table1 with every column of type nvarchar2(4000): Col_Name txt_value X a X ...
1
vote
1answer
32 views

Strategy To Remove Old Records

We are running Oracle 11.2.0.4.0. It is a transactional database that has been online since 2011. We have been tasked to clean up old records. The table structure is (parent->child): A->B-C->D->E ...
0
votes
1answer
92 views

ORA-00904 error while querying the Oracle database table

I am newbie with oracle DB and I need to List the Number of departments per region in the region table. This is my SQL statement: select r.region_id, count(d.department_id) "Number of ...
2
votes
1answer
61 views

Oracle - Connect Via SqlPlus

I have a local installation of Oracle. I want to add the XMLDB package to it. As step 1, I need to connect to it via sqlplus. And I am not able to. The installation has a database called Pm. Here ...
1
vote
1answer
47 views

Nested, inline pivot table (oracle)

I'm trying to go from a table like this: ID | NAME | METADATA ------------------------------- 1 | test | '{"a":"x","b":"y"}' where the metadata column is a JSON string. What I'd like to end up ...