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
votes
2answers
29 views

In out parameter : how to execute [closed]

Create or replace procedure sma11( a in number ,b1 out varchar2) is begin b1:=mod(&a,2); if b1=0 then dbms_output.put_line('b1'||'is even'); else ...
1
vote
0answers
82 views

Unexpected SYSDATE behavior

I have a SQL trigger which adds the old value ,new value and time of update for column based on update, insert, update or delete. To update the time we used SYSDATEand inserted record from trigger. ...
2
votes
2answers
49 views

how login other account by sysdba in oracle?

I forget hr's password, but I have sysdba role. Can I use su hr like in linux. I don't hope alter hr's password.
0
votes
1answer
40 views

function return data type?

create or replace function Total_sal return varchar2 is Total number; begin select sum(salary)into total from employees; return total; end; / BEGIN DBMS_OUTPUT.PUT_LINE(TOTAL_SAL); END; ...
-1
votes
1answer
36 views

how to execute this basic parameter

how to execute this one in plsql.. create or replace procedure p11(a in number, b out number) is begin b:=a*a; dbms_output.put_line(b); end; variable a number; variable b number; what statement I ...
0
votes
1answer
23 views

How to get capacity specifications for a particular Oracle release?

How to get capacity specifications for new Oracle release(Oracle 11.2.0.4)? ie, information like How much schema we can create?, How much tables a schema can accommodate? How much rows total ...
1
vote
0answers
39 views

Oracle Database Change Notifications only sent every 15 minutes, not immediately

I'm registering a listener for Oracle Database Change Notifications through JDBC (using the EclipseLink implementation of JPA, Oracle 11.2.0.3, Oracle JDBC thin driver 11.2.0.4). I'm getting ...
0
votes
2answers
62 views

Database not able to startup showing an error in reading control file

On Windows Server 2008 R2, when I am trying to startup Oracle 11g database it shows an error: SQL> startup ORACLE instance started. Total System Global Area 3206836224 bytes Fixed Size ...
0
votes
1answer
35 views

Datapump error in log file

When I do this: DECLARE hdnl NUMBER; BEGIN hdnl := DBMS_DATAPUMP.open( operation => 'EXPORT', job_mode => 'TABLE', job_name=>null); DBMS_DATAPUMP.ADD_FILE( handle => hdnl, filename => ...
1
vote
1answer
20 views

Data Pump throws an error

I am trying to do datapump. DECLARE hdnl NUMBER; BEGIN hdnl := DBMS_DATAPUMP.open( operation => 'EXPORT', job_mode => 'TABLE', job_name=>null); DBMS_DATAPUMP.ADD_FILE( handle => hdnl, ...
2
votes
2answers
40 views

In Oracle what is the difference between STDEV and STDEV_SAMP functions?

We have a query that should return NULL when doing standard deviations in groups that have only 1 row. The normal STDDEV function returns zero. However I found another function called STDDEV_SAMP ...
-1
votes
3answers
165 views

Incorrect query filter according to the requirement

My requirement wholly depends on the QUERY. I am filtering my gridview on the basis of three parameters. Project_name (Always required) Date (Not always) Vehicle_No (Not always) So, what my ...
1
vote
1answer
60 views

Oracle automatically unmount

I have a weird issue in my Oracle database, after 10 - 15 minutes of not using it (Not performing any query, insert on SQL Developer tool) then it will say ORA-27101: shared memory realm does not ...
0
votes
0answers
35 views

Characterset in SQL Server - Migrating data from Oracle 8i to SQL Server 2012

I'm migrating data from Oracle 8i to a new MS SQL Server instance (2012). My Oracle database has: NLS_CHARACTERSET = US7ASCII I'm completely new to SQL Server - how do I configure the SQL Server ...
0
votes
2answers
66 views

Insufficient Privileges When Connect to SYS and SYSTEM [closed]

I have installed EBS VISION instance on my virtual machine. After installation from my windows machine I am able to connect to schemas such as APPS, HR, however, unable to connect to SYS and SYSTEM ...
0
votes
2answers
48 views

unable to connect to oracle in linux terminal in oracle VM ,TNS listner not connected

i installed oracle VM , new to oracle vm. Can some help me in connecting to oracle in Linux termial and TNS listner is not responding with IO failure on sql developer when pressing test button ...
1
vote
3answers
61 views

Retrieving the top row of data

I have very limited SQL knowledge and need to report on the top most current row of data within a table. The table holds Effective Date, Information and a Renewal Date. select DATA_KEY_ID, ...
0
votes
1answer
41 views

Synchronous data transfer from SQL Server to Oracle

I have a requirement like: The table is present both in a SQL Server Database and an Oracle database with appropriate data types. Whenever a record is inserted into or updated in SQL server ...
0
votes
1answer
40 views

UTL_TCP how to monitor number of connections?

I have a leak somewhere in the number of UTL_SMTP connections being made and closed. There is an underlying limit of 16 from its reliance on UTL_TCP. I'd like to be able to monitor the connection ...
1
vote
2answers
55 views

Checkpoint during Backup

Can database process make automatic checkpoint when I'm in process of copying files during ALTER DATABASE BEGIN BACKUP; and ALTER DATABASE END BACKUP; You can assume that process of copying ...
1
vote
1answer
63 views

How to correct this oracle error?

This query SELECT praogrupos0_.ID_GRUPO_SEDE "ID1_209_", praogrupos0_.ID_EJERCICIO "ID6_209_", praogrupos0_.ID_INSTITUCION_LIQUIDADORA "ID7_209_", praogrupos0_.ID_PERIODO "ID8_209_", ...
0
votes
0answers
81 views

Performance tuning of a SQL query

Problem statement: I have a table which stores the customer, related customer and count of related customers. The related customer can have again further related customers it's like a recursive ...
0
votes
2answers
91 views

Trigger to compare inserted value with value from another table

I have two tables: Stockitem (serialno, qty) serialno is the primary key and Order(serialno,orderno,qty) orderno and serialno are the primary keys. I want to create a trigger in order to ensure ...
0
votes
0answers
29 views

Oracle - compressed subpartitions in uncompressed table

I am working with Oracle 11.2. I have table which on subpartition level has in DBA_Tab_subPartitions column COMPRESSION set to ENABLED for all subpartitions. But on partition level in ...
1
vote
1answer
38 views

DB2 Naming Standards - Similar to OFA

I'm an Oracle DBA getting started on DB2. On Oracle we have a document called Optimal Flexible Architecture that sets a group of naming standards, like what should be the disk name for the database. ...
0
votes
2answers
54 views

Using a query in an update

I have a query which generates a result set (key, a, b). I want to use an update statement where, for each entry in a table with Tkey = key, set ColA = a, ColB = b. How would I do this? Right now ...
2
votes
1answer
58 views

How to find the number of rows changed by an UPDATE statement in Oracle?

Imagine the following table: id | name | family ---+------+-------- 0 | John | Smith 1 | Mary | Winters 2 | John | Doe and now the following statement: UPDATE t SET name = 'John' WHERE id = 0; ...
0
votes
2answers
46 views

How to transpose rows to column in datatabse [duplicate]

I have one table which contain 3 column,Col_ID, Col_Group, Col_Price for this my column is like below Col_ID Col_Group Col_Price 1 AA 0 1 BB 2000 1 ...
1
vote
1answer
70 views

Error at line 1, column 25: ORA-00923: FROM keyword not found where expected

I have some code that works in Access but now I want to forward the code to our IT department to make a view in our SQL database. Could anyone please help me convert it so it is correct for normal ...
0
votes
2answers
55 views

Can Oracle databases start automatically when Windows machine is booted/rebooted?

In one of my client machines every time Windows starts we have to start the Oracle database manually. Is there a solution/ command to start the database automatically when the machine is ...
1
vote
1answer
49 views

Oracle TNS Permission denied when creating database

I hope you can help me. I need to restore an Oracle 9i (9.2.0.6.0) database on a Windows Server 2003 R2 x64 from a cold backup. I managed to get the 9i installer and the version patch (since I was ...
0
votes
1answer
66 views

oracle conversion variable value to sequence name

please can someone help me? I want to call a sequence from a variable (seq_x) as in the code but I cannot. if :op.qt is not null then select BATCH_X_SEQ into seq_x from kbatchseq where ...
0
votes
0answers
51 views

How to optimize this query on oracle?

I have built this query in oracle to get some data i need from the two tables below. At SELECT REGEXP_REPLACE i get the IN_01 as input parameters from the user and it can be much bigger list than ...
4
votes
1answer
85 views

Result on execution of any SQL is number 2

After successful execution of any sql in oracle sql command line it shows 2 like i want to see the table or description of any table it show 2 instead of showing the table. SQL> select * from dual ...
0
votes
1answer
36 views

Grouping a sequence into ranges

I have 50000 students records in different exam centers having different subjects, in oracle table like this: Center_Code Roll_No PaperCode 10050 1 711 10050 2 ...
0
votes
1answer
26 views

How is the password file accessed when it's on an ASM diskgroup and required to connect to ASM?

When a RAC is turned on, it will try to accessing the OCR registry which is located on ASM. ASM also holds the asm password file. However to open ASM, it needs to access the password file. If the ...
0
votes
0answers
30 views

Procedure stuck at a bulk collect

Here's a procedure I'm working on. It's called from another procedure, which uses it in a nested BULK_COLLECT loop on every entry in another table. It gets stuck on "FETCH uniquephysicians BULK ...
0
votes
1answer
23 views

Where is oraenv located in solaris?

I had a problem recently with oraenv and oratab and finding out where oraenv is located was a bit challenging. Since it's a question I ask myself often, I wanted to have it here. It may help others.
0
votes
0answers
24 views

How to find opmnctl status from user other than Oracle user

I just want to use any other user than oracle to check opmnctl status or stop/start the services. I created 1 "test" user with group oinstall and dba group, because oracle belongs to these groups, ...
0
votes
1answer
43 views

Recursive relationship in oracle

I have a table which stores the customer , related customer and count of related customers. The related customer can have again further related customers it's like a recursive relationships. I ...
0
votes
0answers
30 views

Turn on multi-threading in Oracle for ETL purposes

As you can see from this question, I was able to configure multi-threading in SQL Server and build a workflow in Informatica to multi-thread a job to move data faster into SQL Server. Multi-thread ...
3
votes
0answers
26 views

UTL_MATCH.JARO_WINKLER_SIMILARITY - how can I set the prefix scale?

I'm using UTL_MATCH's Jaro Winkler similarity function and it seems to be performing well. However, I would like to adjust the prefix scale according to the situation. Is this possible? Is it possible ...
0
votes
0answers
32 views

How to concatenate using cast(collect()) in Oracle DB?

My current query: select distinct mb.BP_TYPE,mb.ABS,mb.BLD_SEQ_CODE, mb.BPCODE||'~'||(select LISTAGG(mbp.PROCEDURE,' ') within group(order by mbp.LINE,mbp.SLN1,mbp.SLN2) from MIS_BS_BB_PROC mbp ...
6
votes
2answers
152 views

Precision of NVARCHAR2 column is 1.5 times lower than displayed by desc command

I wanted to update precision of an nvarchar2 column and came across an interesting case. I have tried to replicate it below: create table test_table1 (col1 nvarchar2(100)); table TEST_TABLE1 ...
1
vote
1answer
49 views

PL/SQL block fails in job but succeeds in SQL*Plus

I created a PL/SQL block which gathers certain data from tables in my Oracle 12c database and writes them into a .csv file. I cannot share the whole PL/SQL block but can outline the code --create ...
0
votes
2answers
31 views

IP Change in Oracle database Query

I have a two node RAC database running in OEL 7 server. Now if there is a need to change the IP addresses of the already running server to a new one, will it hamper my functioning of database? What ...
0
votes
1answer
26 views

Oracle home is missing

I have an Oracle 12c database running in OEL 6.. yesterday due to some OS related issues, my Oracle home software mount-point got erased completely. The only thing that is left is the pfile and data ...
2
votes
1answer
45 views

Backing up database with missing datafile

Is there a way to backup a Oracle 12c database which has a missing datafile? I dont have backups. Database is running in archive log mode. One of the data files is physically missing from the disk. ...
1
vote
3answers
111 views

Restart of rownumber based on count in other table in oracle sql

I have two tables which do not have a common key. I want to do a join on these two tables without a cartesian join. Table 1 has around 40,000 rows (the count varies from day to day in production) ...
0
votes
1answer
39 views

Execute immediate call causes 'variable not in select list' error

Execute immediate call causes 'variable not in select list' error hi there, i'm practicing with collections and execute immediate by combining them in plsql and have the following code: set ...