PL/SQL :: DDL And DML Commands On Dual Table

Feb 8, 2013

Can we perform DDL & DML Commands on dual table????

If yes then how??

View 11 Replies


ADVERTISEMENT

Add A Column To Dual Table

May 17, 2012

i'v a problem regarding dual table,i logged to oracle as sys as sysdba and i add a column to dual table and then want to delete that added column but oracle gives "ORA-12988: cannot drop column from table owned by SYS"

i'm not able to drop any user oracle gives "ORA-00604: error occurred at recursive SQL level 1" "ORA-01031: insufficient privileges"

another error:: SP2-0575: Use of Oracle SQL feature not in SQL92 Entry Level oracle gives error when i want to switch user all problems starts when i add that column to dual table

View 1 Replies View Related

Dual Table Has Only One Column?

Oct 29, 2010

why the dual table has only column?

View 3 Replies View Related

SQL & PL/SQL :: All DML Operation Can Be Done In DUAL Table?

Apr 29, 2010

What are all the DML operation can be done in DUAL table.?

View 5 Replies View Related

PL/SQL :: DUAL Table In Subquery Of UPDATE

Apr 26, 2013

Should the following code work? I feel like I have done this before, but I'm getting a "must be a subquery" error now.

update TABLE1
set (FIELD1, FIELD2) =
values(select 'blah','blah' from DUAL)
where PK_FIELD=12345;

If this is invalid, is there another way to hardcode a series of values like this?

View 8 Replies View Related

SQL & PL/SQL :: Creating List Of Month From Dual Table?

Nov 3, 2011

creating sql query for producing result as per below from dual table.

SELECT to_char( sysdate,'MON-RRRR')
FROM dual
where sysdate between '01-APR-2011' and '31-MAR-2012'
order by 1 desc

from above query the result is

NOV-2011

but i need the result as per below

APR-2011
MAY-2011
JUN-2011
JUL-2011
AUG-2011
SEP-2011
OCT-2011
NOV-2011 CURRENT MONTH

View 4 Replies View Related

SQL & PL/SQL :: Matching Dates Using Dual?

Jul 7, 2010

What I'm trying to do is make it so that it returns 'MATCH' when I pass a date that matches a date every two weeks starting Jan 01. Like Jan 01, Jan 15, Jan 29, Feb 12, etc. would return as MATCH Jan 02, Jan 03, etc. would return as NO_MATCH

The part in bold is what I'm having trouble figuring out.

select nvl(
(select 'MATCH'
from dual
where 'date' = '2 week intervals starting Jan 01'
), 'NO_MATCH') from dual

View 7 Replies View Related

SQL & PL/SQL :: Select Sysdate From Dual

Aug 30, 2012

when i run this nls qusery i got this error

E:oracleproduct10.2.0db_1BIN>sqlplus

SQL*Plus: Release 10.2.0.4.0 - Production on Thu Aug 30 11:45:59 2012

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select value from v$nls_parameters where parameter= 'NLS_DATE_FORMAT';

VALUE
----------------------------------------------------------------
DD-MON-RR

SQL> select sysdate from dual;

SYSDATE
----------------
30-????? -12

View 11 Replies View Related

SQL & PL/SQL :: UNION While Selecting From Dual?

Sep 19, 2013

I would like to SELECT these 3 hardcoded titles from DUAL, and have a blank line under each, on the output in this order from the SQL. But the result does not end up that way

SQL> set heading off;
1 select '#ENCODING WINDOWS-1252' from dual
2 union
3 select ' ' from dual
4 union
5 select 'Language Section EN-US' from dual
6 union
7 select ' ' from dual
8 union
9* select 'Catalog Section Title Date Source' from dual
SQL> /

#ENCODING WINDOWS-1252
Catalog Section Title Date Source
Language Section EN-US

- - - - - - - - - - - - - - - - -

Desired Output:
#ENCODING WINDOWS-1252
Language Section EN-US
Catalog Section Title Date Source

View 12 Replies View Related

SQL & PL/SQL :: Bundle Commands Sent At One Time?

Jun 8, 2010

I bought Selftestsoftware for 1z0-147 for 9i and 10g. Selftestsoftware is endorsed by Oracle, should be high quality. But its below sample question and answer seem to be wrong, or I could not understand it properly. It says "Network traffic is not decreased by bundling commands. Executing procedures and functions stored in an Oracle Developer application will process each PL/SQL statement and pass each SQL statement across the network to the database to be processed, dramatically increasing network roundtrips."

But PLSQL online reference manual says "However, with PL/SQL, an entire block of statements (bundling commands?) can be sent to Oracle at one time."

Selftestsoftware says pass each sql statement, but PLSQL online manual says send an entire block of statements like below diagram. Now which one is right, or I misunderstood something?

(I cant post the diagram from PLSQL online manual because of my quota)

Procedures and functions can be created and stored in the database or in an Oracle Developer application. How is performance improved when storing procedures and functions in the database?

Network roundtrips are reduced.The object code is created during execution.Network traffic is decreased by bundling commands.The source code is stored externally, and the object code is stored internally.

Explanation:Network roundtrips are reduced when storing procedures and functions in the database. The source and object code of database stored procedures and functions are stored like other objects, in physical files assigned to the appropriate tablespace. When executed from a client application, they require only one call. Because the object code is stored on the database side, there is no need to send it across the network.The object code is not created during execution. The object code is created when creating the procedure or function and is stored in the database.Network traffic is not decreased by bundling commands. Executing procedures and functions stored in an Oracle Developer application will process each PL/SQL statement and pass each SQL statement across the network to the database to be processed, dramatically increasing network roundtrips.The source code is not stored externally. The source code and object code are stored in the database.

View 3 Replies View Related

Backup & Recovery :: Difference Between First Set Of Commands And The Second?

Dec 7, 2011

Is there a difference between the first set of commands and the second? Typically, I just use the first set?

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS;
DELETE NOPROMPT OBSOLETE;

and

CROSSCHECK ARCHIVELOG ALL completed before 'sysdate -30';
DELETE NOPROMPT OBSOLETE;

View 2 Replies View Related

Data Guard - Difference Between 2 Commands?

Mar 6, 2012

Before I am going to implement data guard in my company i am experimenting it in a test server. I want to know the difference between these 2 commands mentioned below which i found from various websites.

[ START REDO APPLY ]
SQL> alter database recover managed standby database disconnect;
[ START REDO APPLY USING REAL-TIME APPLY ]
SQL> alter database recover managed standby database using current logfile disconnect;

Which of the two commands should i use in my production database.

View 1 Replies View Related

SQL & PL/SQL :: Select From Dual Versus Equals Operator?

Mar 14, 2011

I have a package function which is wrapped and I cannot see the code.The package function raises an user-defined exception when :

SELECT ABC.*
FROM ABC
WHERE ABC.A = PACK.FUNC(ABC.B,ABC.C)

But it does not raise any exception and the query works absolutely fine generating desired results when :

SELECT ABC.*
FROM ABC
WHERE ABC.A = (SELECT PACK.FUNC(ABC.B,ABC.C) FROM DUAL)

View 6 Replies View Related

PL/SQL :: Query A Remote DUAL Causes ORA-01729 Or ORA-02019

Jul 6, 2012

I have ORACLE XE 11g installed on two machines and have been trying my luck to get my local db to query/insert/update a table from the remote db.

I have created the public database link and querying the dba_db_links shows that the links is successfully created (see the bottom of the post). I have also created synonyms for my remote table and queries like select name from jforum_forums succeed, with jforum_forums being a public synonym referring to user.jforum_forums@corona.magic.ubc.ca.

However when I try to insert a row into the remote table, there is a query to the remote DUAL to fetch the last generated ID for a given table similar to the following: SELECT jforum_forums_seq.currval FROM DUAL. Statements of such fail and they either throw an ORA-02019: connection description for remote database not found or ORA-01729: database link name expected. I tried including the database link with the name of the table making it like SELECT jforum_forums_seq.currval FROM DUAL@corona.magic.ubc.ca but that didn't work either.

PS, I should mention that global_names are set to true in both databases and that my database link has the same name as the global_name of the remote database.

OWNER
------------------------------
DB_LINK
--------------------------------------------------------------------------------
USERNAME
------------------------------
HOST
--------------------------------------------------------------------------------
CREATED

[code]...

View 18 Replies View Related

Backup & Recovery :: Difference Between 2 RMAN Commands

Nov 2, 2012

what could be the reason that following 2 (RMAN) commands return different results?

RMAN> list archivelog all completed before 'sysdate-2';
RMAN> list archivelog until time 'SYSDATE-2';

View 1 Replies View Related

Client Tools :: Repeat Last Series Commands In SQL PLUS

Aug 8, 2007

In SQL plus
<SQL>

i need to repeat last six or seven commands instead of typeing

is there any command to using arrow keys o backward and forward last typing comamnds

i know / to execute last command

how to do that in SQL plus.

View 5 Replies View Related

Forms :: Using Host Command To Run Commands From Linux?

Jul 6, 2010

i was trying to use the host command to run the commands from linux. however, it doesnt work.

PROCEDURE compile_procedure IS
c_success boolean;
c_bare_filename varchar2(50);
command_string varchar2(1000) ;
BEGIN
c_bare_filename := substr(:B_DEV.B_DEV_ITEM_FILENAME,instr(:B_DEV.B_DEV_ITEM_FILENAME,'',-1)+1);

[code]....

View 4 Replies View Related

Windows :: Client Logging - See What Commands Are Being Sent By Process?

Nov 4, 2011

I am trying to trouleshoot an issue with Oracle and want to see what commands are being sent by by process. By reading the documentation it appears there is client logging to do this but I can not get it to work. I added the following commands to my SQLNET.ORA file but no log file is created:

tnsping.trace_directory = C:appproduct11.2.0client_4
etwork race
tnsping.trace_level = admin
trace_level_client = user
trace_directory_client = C:log
log_directory_client = C:log
trace_unique_client = on
trace_timestamp_client = on

Ths TNSPING works just fine it logs the information I expect. The client logging, however, never creates a file .

View 2 Replies View Related

SQL & PL/SQL :: Using Sequence.NEXTVAL From DUAL Versus In INSERT Statement?

Apr 8, 2013

I am trying to understand the difference between using sequence.NEXTVAL from DUAL as against using it direclty in an INSERT statment.

--Sequence Creation
CREATE SEQUENCE SEQ_ID START WITH 1 MINVALUE 1 NOCYCLE CACHE 500 NOORDER;
--Table1 Creation
Create table TABLEA (COL1 number, COL2 varchar2(10),
constraint COL1_PL primary key (COL1));
--Table2 Creation
Create table TABLEB(COL3 number);
alter table TABLEB add constraint COL1_FK foreign key(COL3) references TABLEA(COL1);

-- Option1 - Using sequence.NEXTVAL from DUAL

DECLARE
v_seq_num NUMBER;
BEGIN
SELECT SEQ_ID.NEXTVAL INTO v_seq_num FROM DUAL;
INSERT INTO TABLEA (COL1, COL2) VALUES (v_seq_num, 'test');
INSERT INTO TABLEB (COL3) VALUES (v_seq_num);
END;

-- Option2 - Using sequence.NEXTVAL in INSERT USING RETURNING INTO clause

DECLARE
v_seq_num NUMBER;
BEGIN
INSERT INTO TABLEA (COL1, COL2) VALUES (SEQ_ID.NEXTVAL, 'test') RETURNING COL1 INTO v_seq_num;
INSERT INTO TABLEB (COL3) VALUES (v_seq_num);
END;

View 9 Replies View Related

Client Tools :: Spool Without SQL Statement And Commands In PLSQL?

Jan 3, 2011

I have a PLSQL script.

sqlplus
$DB_ACCT << EOSQL
set heading off
set termout off
set pagesize 0

[code]....

My output in FILE.txt looks like this
SQL>
SQL> Select col_with_a||col_with_b||col_with_c from
2 alphabet_table;
abc

[code]....

I tried several options by putting set echo off, etc.What do I include in the sql script to get the output as :
abc
abc
abc

without the SQL prompt and the statement, and the spool off command?

View 2 Replies View Related

Server Administration :: Which Commands Only Can Use In Database Mount Mode

May 3, 2011

which commands only we can use in database mount mode?

View 7 Replies View Related

TimesTen In-Memory :: Execute Statement SELECT CURRENT_DATE FROM DUAL On 11.2.2?

Sep 24, 2013

We are trying to execute a statement SELECT CURRENT_DATE FROM DUAL on Timesten 11.2.2  . It throws error unknown referenced column error. Command> select current_date from dual; 2211:

Referenced column CURRENT_DATE not foundThe command failed. But the following doc shows the support. 

TimesTen PL/SQL Support: Reference Summary CURRENT_DATE function

Returns the current date in the session time zone. YIn TimesTen this returns the current date in UTC (universal time). TimesTen does not support local time zones.

View 4 Replies View Related

OPatch Commands Are Failing With Error Code 255 And Not Able To Find OUI Jars

Aug 21, 2013

I'm trying to apply a patch using opatch but I'm getting this error:

"OPatch was not able to find OUI jars to load them runtime. Please provide valid oui location using 'oui_loc' option. OPatch failed with error code 255". 

Oracle is 11.2.0.3 x64 on Windows Server 2008R2 x64. The PATH variable have

%ORACLE_HOME%OPatch, %ORACLE_HOME%OPatchjlib, %ORACLE_HOME%in in it. 

The only OPatch command that is working and not throwing the error  is the "opatch version" command. 

OPatch Version: 11.2.0.3.5 OPatch succeeded. 

No luck on finding issue resolution or documentation on MOS. I cannot find any documentation about the "oui_loc" option. 

View 10 Replies View Related

SQL Plus Command Line - Arrow Keys Not Giving Previous Commands Back

Mar 28, 2007

I am using Oracle 10g Express Edition on Fedora core 5 32+ bit os. The problem is when I use the SQL Plus command line to make SQL statements I can not get the previously typed command back at the prompt when I use the up and down arrow keys on my keyboard. This is quite easy when I am using a shell, but here with this Oracle command line interface it is not working at all. Here is the example as what actually is happening whe I press the up or down arrow keys.

SQL> drop table mailorders;

Table dropped.

SQL> ^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A

View 2 Replies View Related

Backup & Recovery :: Running RMAN Commands In RUN File To Duplicate A Database

Dec 17, 2012

I have a RUN file within a script to duplicate a database. As part of this RUN file I also run the command configure controlfile autobackup off; as part of this RUN file. However, this command has turned off backup of the control file on the AUXILLARY database (i.e. production) as well as the TARGET database (test). Is this supposed to happen?

My run file is:

rman TARGET sys/XXXX@${DB}-SOURCE AUXILIARY /
RUN {
allocate AUXILIARY channel a1 type disk;
allocate AUXILIARY channel a2 type disk;
allocate AUXILIARY channel a3 type disk;
allocate AUXILIARY channel a4 type disk;

[Code]....

View 7 Replies View Related

Recovery Manager (RMAN) :: Script / Daily Incremental Backups With Configure Commands For Oracle 11g Database

Aug 29, 2012

the rman backup script for weekly full backup and daily incremental backups with configure commands for oracle 11g database.

View 10 Replies View Related

Forms :: Dual Monitor Forms With Alerts / Messages

Apr 18, 2013

We have forms 11gr2 on win xp 32bit , weblogic linux server 64bit. We are converting 6i to 11g. Our system has many forms that span on 2 monitors. 1280x768 monitors, so some forms are 2560x768.

When alerts/messages pop up on the screen , they are positioned in the middle of both screens (guessing Oracle by default calculates width =2560/2, height =768/2).

Possible options:

1- is there a way to tell oracle to open alerts/messages a X Y coordinates? Maybe a config file on the server? Already file a Sr with Oracle tech support.
2- tried creating a form to do our messages. but this is flawed since when you call the new form to display the message, then the focus on current form is lost. when the message form is closed (then trigger when_window_activate fires)...this would be hell to try and control all our messages (we may have 20-30 on each big form. We have a total of 118 forms. Lots of messages with Y/N/Cancel options.
3- Maybe create a place holder for messages on all forms (bottom of screen)...thats the best idea we have so far.
4- Is there a way to do something with a java beans? We already have some knowledge with beans since we use image beans and pdf beans.

View 1 Replies View Related

Report Obsolete And Delete Obsolete Commands In RMAN

Sep 9, 2012

I am getting the below error while executing "report obsolete" and "delete obsolete " commands in RMAN. except these two all the RMAN commands are working fine like "list backup summary" "list backup" .....

Error:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of delete command at 08/28/2012 11:03:04
RMAN-06004: ORACLE error from recovery catalog database: ORA-01403: no data found
OS: IBM AIX
Oracle Version: 9.2.0.8

View 14 Replies View Related

Server Administration :: Move Partitioned Table Between Table Spaces Of Different Block Size?

Apr 4, 2011

I was about to move some tables from one table space to another but it seems it is not possible to move partitioned tables between table spaces of different block sizes.

So far the only option I have is to export and then import back the data.

know if there is any way to move a partitioned table between table spaces of different block size?

View 14 Replies View Related

Server Utilities :: Geometric Data From Text To Table And Wrong CTL Upload Into Table

Jul 11, 2013

I have a requirement to import text files which are generated from 3d modelling software xsteel where it records all geometric information and i want to import this information into oracle table.

CREATE TABLE dstv_head ( wo_no VARCHAR2(12),struct VARCHAR2(12),rev_no NUMBER,
mark VARCHAR2(12),pos VARCHAR2(12),grade VARCHAR2(12),qty NUMBER,PROFILE VARCHAR2(24),TYPE VARCHAR2(12),
len NUMBER,width_web NUMBER,width_bottom NUMBER,flange_thk NUMBER,web_thk NUMBER,radius NUMBER,kgm NUMBER,
kgm1 NUMBER,kgm2 NUMBER,bevel_plus NUMBER,bevel_minus NUMBER,holes_yn VARCHAR2(1),holes_v_yn VARCHAR2(1),
hole_x_dim NUMBER,hole_y_dim NUMBER,hole_dia NUMBER,no_of_holes NUMBER)

-- All the data which has to go under specific field for example **9005.nc1 will go into wo_no field, 1239401A will go under struct.

ST
** 9005.nc1 --WO_NO
1239401A - STRUCT
1 -REV_NO
9005 -MARK
9005 --POS
S275JR --GRADE
2 --QTY
[code]....

View 24 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved