How to recover a 'Z' table
Moderator message - please do not use expressions like "Help!!!"
Hi
How can I do for recover a 'Z' table on AIX??
Thanks in advance.
Edited by: Rob Burbank on Apr 3, 2009 6:25 PM
Thanks to all for answering...
Rob in fact, I've had to make a program to restore all data.
Is there a way to make backup for 'Z' tables?
Regards
Similar Messages
-
How to recover a perged table?----
How to recover a perged table?----No.139
For some reason I thought I saw dropped the first time through the thread. Flashback table is only used to restore dropped tables from the recycling bin.
-
How can recover the dropped table on oracle 9i and 10g ?
This is the scnario...
user dropped one table on his schema...
oracle 10g DB
flashback not enabled so no flashback drop possible
but any way to recover it from recyclebin on 10g ? becuase this is not sysdba table ...if yes how about on 9i...if yes then will there be any limit on recycle bin like space pressure ??
Scnario 2:
we have two online redo log group with 2 member each..
my currnet online redolog group currupted (including members)...we need the data's of that currnet group so we should'nt use the clear log command
how to recover it ?
Do we need to go for any block level revcovery ?
thanks
Moorthy
Edited by: user13014926 on Jan 18, 2011 6:55 AMIf you have no backup your only option is to perform incomplete recovery (point-in-time recovery) to the time just before the drop, export the table and then restore the database (for example, from a cold backup taken just before the incomplete recovery,) and import the table. This obviously requires a full backup
taken before the drop which you don't seem to have, so the answer is "regrettably no."
If you have a backup;
Take backup of ur current db, apply previous day backup, do point in time recovery to get table back,export table, shutdown and apply latest backup, import table back
Regards, -
How to recover corrupted partition table?
I have a disk that somehow got the partition table corrupted. I am getting lots of "Bad Geometry" errors that state the label says one size while the drive says something different.
I have tried running the TestDisk (http://www.cgsecurity.org) application, and it seems to find the partitions just fine and I believe that my data is in tact. I just need to correct the partition table and access the UFS file system. The TestDisk reports that "write_part_sun" is not implemented, so it cannot correct the problem. I have checked the source code for the current and beta versions of the program and the function still has not been written.
Is there another application that I can use to rescue my corrupted partition table? I am not finding much support for Solaris out on the net.
Thanks.Is there another application that I can use to rescue my corrupted partition table? I am not finding much support for Solaris out on the net.Hi
There is some, but you have to look hard.
I wrote a partition table editor:
http://paulf.free.fr/pfdisk.html
If your LBA values are good, you should be able to restore the CHS values from them. If both the LBA and CHS values are corrupt, and you have a good idea of the sizes of the partitions, then with a calculator you should be able to work out what the values should have been.
Paul -
How to recover the data from a dropped table in production/archive mode
How to recover the data/change on a table that was dropped by accident.
The database is on archive mode.Oracle Version. ? If 10g.
Try this Way
SQL> create table taj as select * from all_objects where rownum <= 100;
Table created.
SQL> drop table taj ;
Table dropped.
SQL> show recyclebin
ORIGINAL NAME RECYCLEBIN NAME OBJECT TYPE DROP TIME
TAJ BIN$b3MmS7kYS9ClMvKm0bu8Vw==$0 TABLE 2006-09-10:16:02:58
SQL> flashback table taj to before drop;
Flashback complete.
SQL> show recyclebin;
SQL> desc taj;
Name Null? Type
OWNER VARCHAR2(30)
OBJECT_NAME VARCHAR2(30)
SUBOBJECT_NAME VARCHAR2(30)
OBJECT_ID NUMBER
DATA_OBJECT_ID NUMBER
OBJECT_TYPE VARCHAR2(19)
CREATED DATE
LAST_DDL_TIME DATE
TIMESTAMP VARCHAR2(19)
STATUS VARCHAR2(7)
TEMPORARY VARCHAR2(1)
GENERATED VARCHAR2(1)
SECONDARY VARCHAR2(1)
SQL>M.S.Taj -
How to recover a table from a coldback?
Hi:
I was asked in an interview. if a user deleted a table, how to recover it from a coldback? Please give me the steps.
Thank you and regards.1. Take a cold backup of the current database.
2. Restore the full old backup from tape/disk etc.
3. Oracle Export the table that needs recovering.
4. Shutdown the database.
5. Restore the database from the first step.
6. Start the database.
7. Oracle Import the table from the third step.
Hope this helps.
Best regards,
Mark. -
How to recover from Large Volume Table Insert
We are inserting 1 Million rows into table using ODI IKM Append. If half the way thru the job fails because of tablespace or other issue, how to recover? Does 50% rows are commited to db? What is the best way to handle this type of situation?
You can have different options for this.. You can commit them in every 1000 rows in the KM.You can also set the dml operation into one transaction and commit the same at the end of step.
Try to follow load plan for better restart options. If you cann't provide more undo table space then try loading less amount of records lets say 1 to 100,000 and then 100,001 to 200,000 like this which is little bit complex but you have to sacrifice something to overcome the issue.
I believe you must have data in C$ and I$ step. Hence you process these data instead of loading again from original source. So it depends on you, how you are going to design the total process. You can better judge it. Talk with your dba about this issues as well.
Thanks
http://bhabaniranjan.com/ -
Corrupted innodb table crashing mysql instance how to recover table?
Hello,
Running a simple query against corrupted innodb table is crashing mysql instance .
table test.xyz got corrupt during crash and truncate table command was in progressing when mysql crash , now
running a simple select * query is also crashing db .
mysql> use test;
Database changed
mysql> select * from xyz;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
mysql>
mysql> select * from xzy;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
ERROR:
Can't connect to the serverTry to start mysql with innodb_force_recovery = 6
Or to try to restore by means of the tool:
MySql Recovery Toolbox and find out how you can use the corrupt MySQL recovery tool for damaged database restoration and easily repair known issues or already known problems, occurred in MySql files. This MySql repair utility offers many benefits
like:
Supports all MySql file versions and parses even very large documents on older PC computers;
Supports primary and external keys, tables, views, indexes and other objects;
Allows previewing recovered data in freeware mode so you can get results without purchasing MySql Recovery Toolbox
For more information: http://www.mysqlrecoverytoolbox.com/
As you can look for the answer here:
http://www.filerepairforum.com/forum/databases/databases-aa/mysql/197-corrupted-innodb-table-crashing-mysql-instance-how-to-recover-table -
Sysjobhistory table corrupted how to recover on sql 2008 r2
sysjobhistory table corrupted how to recover ron sql 2008 r2
Is it anything related to Master Data Services or just a generic question for SQL Server Agent?
I guess its generic question and must be moved to database engine forum
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My Technet Wiki Article
MVP -
Table Truncated, Flashback is enabled ... How to recover.
Hi,
There is a table which was truncated, as we have flashback enabled. Even we have previously enabled row movement of the particular table.
How to recover ????
Thanks.hi,
There are three options available:
1. Restore and recover the primary database to a point in time before the drop.
This is an extreme measure for one table as the entire database goes back in
time.
2. Restore and recover the tablespace to a point in time before the drop.
This is a better option, but again, it takes the entire tablespace back in time.
3. Restore and recover a subset of the database as a DUMMY database to export
the table data and import it into the primary database. This is the best option
as only the dropped table goes back in time to before the drop.
For the first, see information on performing incomplete recovery on a database.
The second and third options are virtually the same, it depends if the entire
tablespace data should be taken back in time, or just recovering the one table.
The tablespace point in time recovery (TSPITR) may be useful if there are
dependencies between the dropped/truncated table and other tables in the
database. For the second option, see RMAN documentation on TSPITR and/or Note 180436.1 RMAN Tablespace Point in Time Recovery Example. Both procedures
for the second and third options are very much the same. The differences are
that the TABLE PITR has to be exported/imported manually while the TABLESPACE
PITR is fully automated by RMAN.
This article will deal with the third option.
General overview of procedure to recover from a DROP or TRUNCATE table by using RMAN.
To recover from a dropped or truncated table, a dummy database (copy of primary)
will be restored and recovered to point in time so the table can be exported.
Once the table export is complete, the table can be imported into the primary
database. This dummy database can be a subset of the primary database. However,
the 'dummy' database must include the SYSTEM, UNDO (or ROLLBACK), and the
tablespace(s) where the dropped/truncated table resides.
The simpliest method to create this 'dummy' database is to use the RMAN
duplicate command. See:Note 228257.1 RMAN Duplicate Database in Oracle9iNote 73912.1 RMAN Creating a Duplicate Database -- Oracle8i
The difference between the two versions is that Oracle9i duplicate command
allows for a 'SKIP TABLESPACE' option. Thus Oracle9i allows for a duplication
of a subset of the database.
In Oracle8i, you cannot 'skip' tablespaces when using duplicate, so you must
duplicate the entire database. If this is not a desired option, or you must
restore the original database and thus cannot use
the rman DUPLICATE.
NOTE: The remainder of this information is for users who cannot use the
DUPLICATE command in Oracle8i. I.e., you want to restore only a subset
of the Oracle8i database.
Requirements :
a) RMAN backup of the primary database should be available to the
host where it has to be restored on.
b) Use of an RMAN-catalog database
c) Auxiliary instance created and started in NOMOUNT
(See Note 180436.1 step I. Create the auxiliary initSID.ora.)
Create this from the init.ora of the primary database and:
!!!!! IMPORTANT !!!!!!!!
If using the same host as the primary, be VERY careful as you do not want to
restore on top of existing files being used by the primary (production database).
Doing so can corrupt and crash the production database!!!!!!
- be sure all paths for this AUX instance are different than primary.
- be sure CONTROL_FILES parameter has different location but more importantly DIFFERENT NAME.
- add LOCK_NAME_SPACE to any value other than the primary database name.
- change/add SERVICE_NAME=AUX1.
- use the SAME DB_NAME as for the production database
- BE SURE you include the 'alter database rename file' command at the end
of the script. This changes the location and/or name of the online
redo log files.
d) Set ORACLE_HOME and ORACLE_SID set to the auxiliary instance
e.q set ORACLE_SID=AUX1
set ORACLE_HOME=<....>
!!!!! IMPORTANT !!!!!!!!
1: Restore and recover the tablespace
The restore and recovery is done by RMAN. Create a file
of the script below (e.q table_pitr.cmd) and execute the following
command :
$ rman cmdfile=table_pitr.cmd
NOTE: ORACLE_HOME and ORACLE_SID set to the auxiliary instance
NOTE: The Auxiliary instance IS the target to rman at this point.
The RMAN-script :
connect catalog rman/rman@v920_nlsu31
connect target /
run
allocate channel t1 type sbt_tape
parms='SBT_LIBRARY=/home/usupport/liblsm.so';
set until time "to_date( '09-10-2005 06:00', 'DD-MM-RRRR HH24:MI')";
restore controlfile;
sql "alter database mount clone database";
set newname for datafile 1 to '/fs01/oradata/tspitr/system01.dbf';
set newname for datafile 2 to '/fs01/oradata/tspitr/undotbs01.dbf';
set newname for datafile 4 to '/fs01/oradata/tspitr/tools01.dbf';
restore tablespace system, undotbs1, tools;
switch datafile all;
sql "alter database datafile 1,2,4 online";
recover database skip forever tablespace TEMP,INDX,USERS,OLTS_ATTRSTORE,
OLTS_CT_DN,OLTS_CT_CN, OLTS_CT_OBJCL,OLTS_CT_STORE,OLTS_DEFAULT,
OLTS_TEMP,OLTS_IND_ATTRSTORE,
OLTS_IND_CT_DN,OLTS_IND_CT_CN,
OLTS_IND_CT_OBJCL,OLTS_IND_CT_STORE,
P1TS_ATTRSTORE,P1TS_IND_STORE;
sql "alter database rename file ''/fs01/oradata/primary/REDO01.LOG'' to ''/fs01/oradata/tspitr/REDO01.LOG''";
sql "alter database rename file ''/fs01/oradata/primary/REDO02.LOG'' to ''/fs01/oradata/tspitr/REDO02.LOG''";
sql "alter database rename file ''/fs01/oradata/primary/REDO03.LOG'' to ''/fs01/oradata/tspitr/REDO03.LOG''";
/* NOTE: Syntax within rman is two single quotes around each name, this may be operating system specific. */
release channel t1;
Explanation :
- Tape channel allocated, but could also be a disk channel, depending
on where the backups are.
- SET UNTIL TIME
User specified time, just before the DROP/TRUNACTE table
- MOUNT CLONE DATABASE.
This forces all datafiles to be put OFFLINE. Just for safety reasons.
- SET NEWNAME
New path for the datafile to be restored. Keep in mind that this is
done on the auxiliary instance and should NOT interfere/overwrite the
prodution database.
- ALTER DATABASE RENAME FILE
This is required to change the location of the online log files. When the
'resetlogs' is issued, Oracle will create online logs based on specification
in the controlfile. This command changes the location and/or name. If
this is being performed on the SAME server, not issuing a rename will
cause Oracle to reset the production online log files. This will corrupt
and crash the production database!!!!!!
- RESTORE TABLESPACE ...;
Restore the tablespaces which need to be recoverd.
This includes always the SYSTEM, rollback/undo tablespace and
the tablespace(s)where the dropped/truncated table resides.
The SYSTEM tablespace is always included as it containts most / all of
the objects owned by SYS and SYSTEM. Some other tablespaces might be
included as well when they contain objects owned by SYS and SYSTEM.
SQL> select distinct tablespace_name
from dba_segments where owner in ('SYS', 'SYSTEM');
- SWITCH DATAFILE ALL;
Make the changes in the pathname (set by SET NEWNAME) active in the
controlfile.
- ALTER DATABASE DATAFILE ... ONLINE
Online the datafiles which are restored and have to be recovered.
- RECOVER DATABASE SKIP FOREVER TABLESPACE ......;
You need to specify the complete list of tablespaces which will not be
recovered. Else the recovery fails, that it cannot dentify/file the
tablespace datafile. The SKIP FOREVER clause causes RMAN to take the
datafiles offline using the DROP option. Only use skip forever when the
specified tablespaces will be dropped after opening the database. I.e.,
all tablespaces except the one which contains your data.
The recovery of RMAN, checks the datafileheaders, to get a starting point
for the recovery.
2: Open auxiliary database with RESETLOGS
$ sqlplus /
SQL> alter database open resetlogs;
This step should ALWAYS be executed outside RMAN via SQL*Plus. If the open
is executed in RMAN it may effect the primary database's entry in the RMAN
catalog. Backups will fail with messages like:
RMAN-20011 "target database incarnation is not current in recovery catalog"
3: Export the table
The database is recovered and open, so it can be used by export.
Example:
$ exp userid=system/<password> file=table.dmp
tables=(<owner>.<tablename>, ...) rows=Y
4: Import the export-dump
Import the data of the dropped table back into the primary/production database.
Example:
$ imp userid=system/<password> file=table.dmp ignore=Y
5: Remove this AUX/DUMMY database
Shutdown and remove all files associated with this database. It has satisfied
your purpose. I.e., to give you an export of this table. -
Table is been dropped and i want o recover it.
Database is running in archive log mode and i had valid full database rman backup too.
flashback is disabled.
database version -10g
Please let me know the steps i can follow to recover the dropped table.Hello,
If your RECYCLEBIN is activated you may Flashback Drop your Table.
So you may check your RECYCLEBIN by using the following query:
select object_name, original_name from user_recyclebin;If you can see your Table (original_name) so you may execute the statement below:
flashback table <table_name> to before drop;Else, you'll need a Backup or a dump to restore your Table.
For instance, by duplicating your database elsewhere and get back the Table by DataPump (expdp/impdp).
Hope this help.
Best regards,
Jean-Valentin
Edited by: Lubiez Jean-Valentin on Feb 3, 2010 10:13 PM -
Recover a single table using RMAN
Hi,
I'm working on an Oracle Database 11g Release 11.1.0.6.0 - 64bit Production With the Real Application Clusters option.
I did a bad update on a table.
I have a full backup level 0 before the update
Is it possibile to recover the single table in an instant before the update using RMAN?
Thanks in advance.
SamuelHi Samuel,
How long ago was the update committed? What's the value of undo_retention?
If the undo has not yet expired, the easiest way to recovery is through flashback query. (Note that flashback database does not have to be enabled for flashback query to work.)
See MOS Doc ID 238674.1.
If that's not a possibility, and flashback database is not enabled, the only other option is to do an out-of-place restore, of SYSTEM, UNDO, and tablespace containing the table you want to recover, and recover to point in time before the update. Then, export table, drop the database, and import table into your primary database.
Hope that helps,
-Mark -
User Tip: MBPr + USB issue and how to recover hard drives.
I did want to share this in case someone runs into this problem:
Since I bought this MPBr in June it has "destroyed" my external USB drives on at least 7 ocassions. By "destroyed" I mean this: Either during a "Wake up failure" or ususally after reboot the drives suddenly were not "recognized" and I would get that dreaded "Initialize, Eject or Ignore" screen we all fear. When it happened and I tried all the standard repair tools (TechTool Pro, Disk Warrior, Data Rescue, etc) most often I ended up wiping the drives since they didn't hold much data, the important stuff safely away inside firewire drives not connected to the MPRr.
That was until last week.
A fact checklist:
All the drives were from different makers and different ages (some brand new, some 1-2 years old). Made no difference.
The drives were both powered and unpowered. Made no difference.
The "destruction" would happen either when the computer went to sleep or simply when trying to use a USB hub.
I tried 5 different USB hub models. All of them did the same thing.
To avoid issues, I was reduced to NOT using USB hubs (or even trying) and unplugging EVERYTHING at the end of the day.
An assistant who was not aware of these problems made the horrible mistake of getting a USB hub and pluging these drives which now held VERY IMPORTANT information, some backed up, some which it had not been backed up yet. Almost INSTANTLY all the drives went bad: Unrecognized. Now, I really couldn't get mad at her because - let's be honest- using a USB hub is not "up there" in the scale of "dangeorus activities" in the computing the world, but it left me 3 dead large size USB drives..And they all had the same problem:
When plugged in, the system would simply not recognize them.
Pluging them into an older mac or another mac had the same response.
In a few occassions the drives would actually appear briefly and disappear again. We are talking seconds here.
NONE of the repair tools could fix them: TechTool Pro, Disk Warrior and fdsk were helpless.
Data Rescue could actually see the partitions greyed out but could not access them
After some digging around it seems whatever is happening with MBPr's USB/Mac OSX/Firmaware is destroying the PARTITION TABLES of USB drives. The data is still there, the system simply cannot access it.
Eventually I came up with the solution which involves recovering the partition tables via Terminal using an open source program TestDisk. The name of "Stellar Phoenix Recovery" software also popped into from time to time (which I do remember from the old days), but I could not find an actual example of a succesful recovery.
What you will need:
This program runs in the Terminal with a very basic interface that uses arrow keys, enter and a few letters. That said, if you have never used Terminal or are not familiar with the terminology I suggest you find someone who does.
Get the software here: TestDisk - http://www.cgsecurity.org/wiki/TestDisk If everything goes well, this will be the one time you will truly be motivated to donate some cash. The euphory alone will do it. I know it for me, that's for sure.
For my recovery I followed this step-by-step tutorial by Perro Hunter, but BE AWARE that it was written at an earlier date as apparently some of the features that the tutorial mentions as "not working yet" are now.
http://perrohunter.com/repair-a-mac-os-x-hfs-partition-table/
In my case I did not need to go past step 7, which is good because the warning it gives is pretty bone-chilling. In my case the software was able to write the recovered partition tables by itself and then when I restarted....the drives were there. DO NOT IGNORE THE BACK UP AND LOG INSTRUCTIONS. EVER.
Keep in mind that my drives were formatted as Mac OS X HFS+ / GUID partitions. I have no idea how it will work with other types of formatting. The process itself is very fast. if IN DOUBT, just quit terminal and start over (I did twice until I finally figure out what I was doing). Also, take screen shots as you move along the steps it helps.
Needless to say, after recovery use Disk Utility, Disk Warrior or TechTool Pro to get the drives back in shape, and if possible, back up everything and wipe them clean which is what I did just to be sure.
I hope that helps somebody and good luck to you in the process.Someone tried to follow this information and perro hunter's blog was not loading.
3rdLOF made a version on pastedbin here:
http://pastebin.com/Jb9NfxZf
In case anyone needs it
I tried posting this as a User Tip, won't let me. -
How to recover a missing program
Hi guys
Im facing an issue on our SLM system where one of the Z programs is missing. I've checked on SE38 and the program is not listed. I have tried to check on Version Management but there are no previous versions.
The only activity was a EHP 1 Upgrade, but there are no indications where this program was modified or deleted.
I've checked the table TADIR and is present. Also checked table TSTC for the transaction name ZPWC and is also in there.
Since i dont have the original transport since its was brought from an external system, I'd like to check with you guys any idea on how to recover this program. I dont have any clue on how is missing since its not a developement system.
Any recommendation on how to restore/find this program, would be highly appreciated.
Martin
PS: Also Checked in table VRSD if there is an entry with OBJTYPE = u2018REPSu2019 and OBJNAME = name of the deleted program and no luck.
Edited by: Martin Simois on Jan 5, 2011 7:06 PMI think you will have to go back to the original development system. The versions will be there.
Rob -
How to recover to keep tablespaces working after datafile deleted on OS
hi,
given situation like this :
1. OS HPUX 11i
2. Oracle 9.2 or 10g
3. tablespace AAA have a datafile AAA.dbf
4. AAA.dbf has been deleted by a guy on OS by accident
5. it's a production database , i have other copy of product running elsewhere
6. we can forget about the data on this tablespace , just wanna make sure new data will still be inserted
I know there is a magic way involving file descritpor to recovery the file on OS if it was still opened by the process
seems it only works on linux or solaris , since HPUX don't have /proc
here is what i had done ,
1. offline drop the tablespace
2. export tablespace AAA from other DB without data but everything else
3. import them into DB without AAA now
only problem seems application couldn't insert into the tables ,Object priveledge not granted
i'd checked the export file , those object grant SQL are right there , i just don't know why import hasn't worked
so my question is
if it were you ,
1.do you have any better idea of how to recover
2.if you any dirty and fast way of recovery File on HP box , appreciate that too
3.can you image why import doesn't seems getting priveledge imported ? my DB version 9.2.0.4
many thanks
br/rickythanks , aman ,lenord and you all
looks like i'm the sinful :)
to clear it up ... it's not me who did it , one of our guys , same thing ,hum ~~
he deleted the backup , cause it's full and auto backup is not ongoing , and he's trying to make things right
he deleted the datafile , cause i told him to rename the file to another space , coz vgdb is full , screw up that too ..
yeah , it'a real production database ~~ , so ,if anybody learn somethings on this , credit on me , :)
the version is 9.2.0.4 , but gonna move to 10g soonor or later , so put it there , to see if in 10g , we can do better ..
tablespace created like five years ago , so , apply all archive since would be crazy ~
this database have 500 Tablespaces , and thoudsands of tables , and the one lost is a important one ,
but data in it , we can bear loss
what i do , is offline drop the tablespace , and import the tablespace without data from other production DB ...
only it didn't work out so well with object grant , and application still not inserting ...
why i post it here , is i wanna learn better ways in this kind of situations ...
i thought my way is not good enough
anway , i'll look at all your suggestions
thanks
br/ricky
Edited by: zs_hzh on Sep 15, 2008 10:12 PM
Maybe you are looking for
-
PwdMustChange attribute does not seem to work
Hi, In order to force new users to change their password the pwdMustChange attribute was set to TRUE by our OID admin. (in dc=<removed> / cn=OracleContext / cn=Products / cn=Common/ cn=pwdPolicies / cn=default ) as outlined in http://download.oracle.
-
hi, we are getting an below mentioned error in MM02 when we go to addition data--> unit of measure. "Internal unit CFT, language EN is not maintained".I need to maintain eht same in JA,DE languages also kindly suggest what i have to do.Do i need to p
-
Hai Respected Friend , I have one doubt regarding Object Class. for what purpose the Object class has some methods like Notify(),Notify All(),wait() though we are not using those methods except with Thread class. why they are defined these methods in
-
Hi Gurus How to call pivot table data in ticker in Business Intelligence? When i tried using ticker it is getting table data Thanks in Advance
-
Hello! I have to bild an Application witch works with different Spectrumanalysers from diffrent Vendors. So lets use IVI! But the Problem is, that one Vendor uses IVI-COM and the other IVI-C. Is there an easy solution I don't see. Lg Bernhard