SQL & PL/SQL :: TRUNCATE Can Rollback Data?
Jun 4, 2013
I have found one interview question no.7 @ [URL] According to that it can be rollbackQuote:The truncate command is a DDL operation and just moves the high water mark and produces few rollback data.
But, I read That is not true in the case of oracle but it is true in the case of SQL Server.
View 7 Replies
ADVERTISEMENT
Jan 19, 2012
Is it possible to recover a table which is Truncated
View 13 Replies
View Related
Aug 9, 2013
I couldn't either DROP or TRUNCATE the table partitions that were created. Here are the DDLs and DMLs I'm using.
Create table student(no number(2),name varchar(2)) partition by range(no) (partition
p1 values less than(10), partition p2 values less than(20), partition p3 values less
than(30),partition p4 values less than(40));
Insert into student values(1,'a');
Insert into student values(11,'b');
Insert into student values(21,'c');
Insert into student values(31,'d');
When I do the following query, it returns data.
SELECT * FROM STUDENT PARTITION(p1);
But, when I try to perform any of the following queries, it says invalid partition name.
ALTER TABLE STUDENT DROP PARTITION p4;
ALTER TABLE STUDENT TRUNCATE PARTITION p3;
I am using Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit
View 9 Replies
View Related
Jan 27, 2012
I am very new to oracle and SQL.I am trying to create a store proc that will copy 14 day of data into a table and then truncate the original table. When i compile following code....
CREATE OR REPLACE PROCEDURE STOPROC_TRUNCATE
( dateNum IN NUMBER )
IS
BEGIN
create table AUDIT_14Days as select * from AUDIT where TIMESTAMP >= (SYSDATE - dateNum);
truncate table AUDIT drop storage;
[code]....
View 8 Replies
View Related
May 24, 2012
Our client has this scenario:May 23th 4:00 PM a user truncate a critical table. The customer need to recover the data before truncate.
The recover materials list like this:
1. A cold backup of this database at May 1th.
2. The archive log except May 1th ~ May 15th.
3. Every day exp at 00:30 and 12:00.
Is there any way to recover the data before truncate table with these material?
View 3 Replies
View Related
Nov 20, 2009
Are there redo generate during truncate operation even my primary database is in FORCE LOGGGING mode? How this will effect on physical standby database.
View 6 Replies
View Related
Jul 17, 2010
My requirement is to to truncate the table and load it with the data present in file. In the control file, I used the "TRUNCATE" command as well.In case, if the file has some invalid data and sqlldr fails, my existing data will be lost. Is there any option in which the sqlldr does not TRUNCATE the table in case of a failure.
View 6 Replies
View Related
Mar 26, 2010
, which operator is more costly (Commit or Rollback) in terms of performance?
View 5 Replies
View Related
Apr 18, 2012
i have a problem that i have run a script in a database which is generated after taking diff from another same structured database and exit normally from sql prompt then is there anyway in oracle to rollback this whole script(means want to make database as it was before running script) or not?
View 2 Replies
View Related
Aug 31, 2013
Having PL/SQL procedure and calling sys dba procedure to alter rollback segment to online and after that to set the transaction to this rollback. The rollback altered to online but transaction still running on available rollback and not the one I was meant to. The user have executing grant on the sys dba procedure.
View 21 Replies
View Related
Mar 23, 2013
How to rollback after commit.
View 5 Replies
View Related
Aug 19, 2012
when i enter a sql * plus session an do a rollback; (without performing anything), always a "rollback complete" message appears even if there is nothing to rollback.
View 4 Replies
View Related
Mar 25, 2013
I have an issue that whenever i restart my system, one of my rollback segment goes offline.
View 8 Replies
View Related
May 7, 2011
User got ORA-01555 error , And My database is runnong with rollback segments ?
User got following error ? ORA-01555 'UNABLE TO EXTEND ROLLBACK SEGMENT RBS_O4'
After that I try like this :
prd176> ALTER ROLLBACK SEGMENT RBS_04 STORAGE (MAXEXTENTS 65530);
ALTER ROLLBACK SEGMENT RBS_04 STORAGE (MAXEXTENTS 65530)
ERROR at line 1:
ORA-02221: invalid MAXEXTENTS storage option value
What I have to do? means complete command ?
here I am pasting my db information;
prd176> SELECT SEGMENT_NAME,TABLESPACE_NAME,FILE_ID,MAX_EXTENTS,MIN_EXTENTS
FROM DBA_ROLLBACK_SEGS
2 3 ;
[code]...
View 1 Replies
View Related
Oct 14, 2010
On a huge transaction the buffer cache gets fulled and on that case oracle automatically writes to the data files. And as such when we issue commit statement it does not take more time. It only writes the dirty buffers to the dirty buffers to the datafiles.
When we rollback does the data gets erased from the datafile. What is the mechanism of rolling back ? It should be clearing the dirty buffers for sure.
View 8 Replies
View Related
Nov 3, 2010
While taking backup of schema using Expdp, I got the following error on one of the tables in the schema due to which export for this table could not be done.
Re: ORA-01555: snapshot too old: rollback segment number 2 with name "_SYSSMU2$" too small.
Undo retention time is 14400 sec and Undo Tablespace is Auto Extensible. Table to be exported contains 100 crore rows.
View 1 Replies
View Related
Oct 26, 2011
I need to do the following via the sql plus command prompt :
1. Execute a large ".pls" script file which does various inserts and updates to a table.
2. Spool the output of "select * from updatedtable;" to a text file to see the changes made.
3. Rollback all the updates and inserts in the script.
View 2 Replies
View Related
Jan 19, 2012
One of the users received the error
ora-01555: rollback segment too small
I have read about the error and saw that it is caused by transactions made upon same data, filling to maximum one of the UNDOTBS rollback segments.It happens only once in a while, each time on a different Rollback Segment.
I've read that i should do a few things to enlarge those segments, such as bring a 1. segment offline, 2. drop it and then 3. create it with a bigger size & possibly a bigger extent setting
i've also read that those actions aren't relevant if you have the parameter UNDO_MANAGEMENT set on AUTO, which is actually the case.is that why when i execute ALTER ROLLBACK SEGMENT RB_SEG_NAME_11$ OFFLINE;
1. How do i solve my issue with the Rollback segment being too small to contain the snapshot with the requested SCN?
2. what does the parameter UNDO_MANAGEMENT mean? should i change it, in order to adjust my Rollback Segments attributes, to prevent my error of re-occurring?
View 10 Replies
View Related
Apr 8, 2013
How to check/find the size of current ROLLBACK segment in oracle 10g ?
View 20 Replies
View Related
Oct 25, 2012
I have a active rollback segments. I am not able to drop the undo tablespace of this segment and archive logs are getting created.
View 2 Replies
View Related
Oct 15, 2012
I have a standard workflow process which was started but got completed without performing all the process.The process had to generate two(Comments & Approval) notifications but generated only one & as the user responded to the notification it got completed without invoking the approval process.Now I need the workflow to be rolled back to the initial step to restart the whole process again.
View 1 Replies
View Related
Apr 9, 2010
i have one question that why oracle not set high water mark when we delete data from a table and commit it, on the other hand it set in case of truncate.both of these statement release physical structure(in case of delete after commiting)
View 7 Replies
View Related
May 8, 2013
I have an Oracle Package with a procedure in which
package with a procedure in which there is a truncate partition, ALTER TABLE table_name TRUNCATE partition_name DROP STORAGE and the all is run with an EXECUTE IMMEDIATE 'alter table ...' .
The point is that the procedure in the package is started from another DB via DB Link (schema USER1) and doesn't work because of lack of privileges.
Instead, if the same procedure is started as a procedure, standalone, not in the package but from the same user (USER1) it works perfectly.
Don't understand why and which privileges must give to the user to run the procedure from inside the package.
View 3 Replies
View Related
Dec 3, 2010
I am using oracle11g. I want to truncate subpartition on specific partion.
I have partition on statewise. Each state partion has 7 day sub partition.
For intance,
Partion TX
Sub partition MON, TUE, WED, THU, FRI, SAT, SUN
Partion CA
Sub partition MON, TUE, WED, THU, FRI, SAT, SUN
Partion IA
Sub partition MON, TUE, WED, THU, FRI, SAT, SUN
Now i want to perform following tasks.
1. Need to truncate TUE sub partiion on TX partition.
2. Need to truncate WED sub partiion on CA partition.
3. Need to truncate SUN sub partiion on IA partition.
How do we do this?
The below statment truncate all TUE partition on all the partitions.
ALTER TABLE TRX_TABLE
TRUNCATE SUBPARTITION TUE;
How do i tuncate specfic sub partition on specific partition?
View 4 Replies
View Related
May 17, 2013
The Scenario is that we have Master and detail table (With Foreign key enabled), we want to TRUNCATE Master table.
1) Is there any option which can Truncate the table without disabling the constraints for child tables...we want to Truncate the table forcefully..
2) What will be best method to truncate a Table having Master detail relation (Foreign key enabled) and we need to truncate the table without disabling the constraint ( if there are records in child table)
3) What will be best method to truncate a Table having Master detail relation (Foreign key enabled) and we need to truncate the table without disabling the constraint ( if there are NO records in child table
View 15 Replies
View Related
Mar 10, 2011
I have two tablespace a and a_idx , a is comtaining all tables data and it fixed size is 19000MB and b containing all the index associated with these tables and its size also 19000MB.
but this is am testing database, and we need some space on my unix machine for this i truncate all tables from a tablespace a
and resize the tablespace a with size 1000M with no error.
but as per my understanding after truncating all tables from tablespace a its also release space from tablespace b but its not hapening.
so my questin is how can i reize tablespace B using alter database datafile 'full path of dbf file' resize 1000M.
View 6 Replies
View Related
Jun 8, 2012
i have many user tables in my database and i want to truncate selected tables and how i can overcome this scenario.
i can truncate using truncate table <table_name> but they are 250 tables to truncate, so,i can't write truncate command for every table. if i want to truncate first i have to truncate parent table or child table and how i can find parent table and child table for given tables to truncatein my database.
View 6 Replies
View Related
Jun 15, 2010
currently developing a app for MSM in tromsø, that are going to delete the oldest entrys in the database table and then update all the relative Run history entrys in another table.
And i can't get the coding right to truncate the old entrys.Here are the
DECLARE V_SLETT varchar2(125);
V_NYE varchar2(50);
V_SLETT := :SLETT;
V_NYE := :NYESTE;
truncate DELTAKER ( IDNR in (V_SLETT) );
begin
request := UPDATE_RUN;
end;
View 15 Replies
View Related
May 30, 2013
How to convert/trunc date
Example
source
column name CONFIRMED_DTE
16-APR-09 12.00.00.000000000 AM
target
column name CONFIRMED_DTE
16-APR-09
I want to date like 16-APR-09 from 16-APR-09 12.00.00.000000000 AM. In a columns have null values and 16-APR-09 in source and target
View 8 Replies
View Related
Aug 16, 2012
i need to import into table A. Before that i will do a truncate.
I will disable the constraint.
DO i need to disable any triggers on the table before importing?
View 12 Replies
View Related