Datafiles Dropped at OS level.
Hi Team,
Please help I have dropped the datafiles at OS level. The db in not in archive log mode and we dont have backup.
Its a UAT daatabase. ..
Is it possible to take export and recreate and import the db if we drop the datafile..?
Or is there any other way..?
Thanks in advance
Madhav
If you don't have any backup then you can't restore.
If you take the export then you can't get data from the dropped datafiles. So, make the datafiles offline and start up the database.
Regards
Asif Kabir
Similar Messages
-
Hi all,
How i drop a datafile when tablespace is online ?
thks.jiana wrote:
Hi all,
How i drop a datafile when tablespace is online ?
thks.Its not possible before 11.1. If you would be using the command alter...datafile drop , it wont drop the datafile even if the message would be a success. Only from 11.1, if the datafile is empty, the above command would be able to drop the datafile.
HTH
Aman....
Edited by: Aman.... on Sep 22, 2010 2:10 PM modified 11.2 to 11.1 after seeing the link from Saubhik. -
Hi all,
Oracle Version: 10.2.0.1
Os: Windows Server 2003
Scenario: I mistakenly add datafile in a tablespace and now i want to drop that datafile but getting error
ORA-02142: missing or invalid ALTER TABLESPACE option
But when i try the same scenario on another machine i am able to do that
The other machine specifications are also same.
Command is
SQL> ALTER TABLESPACE TABLESPACE_NAME DROP DATAFILE 'DATAFILE_NAME'
Can anyone suggest me the reason.
Regards,
Vikas KohliI hope that you verify that the datafile really does not contain extents.
Else, you might find that the command drops the datafiles even with extents present, resulting in incomplete data !!
See Oracle Support Article Bug 7022905 - Alter tablespace drop datafile drops can corrupt the database [7022905.8] and Bug 7022905.
Hemant K Chitale -
NOARCHIVE mode and datafile DROP OFFLINE
I have a 10gR2 database on linux that I use for testing. The db is in NOARCHIVE mode.
I had created test tablespaces on a NAS (as opposed to the system tables on the local machine). The NAS crashed, losing the drive mapping on the db machine. Of course, I couldn't start the database due to the missing datafiles. I did an 'alter database datafile 'xxxx' drop offline', which put the datafiles in RECOVERY mode in the datafiles view.
Amazingly, I was able to recover the NAS several days later, and the datafiles.
Is there any way to restore them after a drop offline? When I try to online them, I get recovery needed, when I try to recover, none of the redo logs have the right checkpoint. (The checkpoint needed is less than what are in the redo logs)
I don't care about any data that might have been lost. The data was static for months.
Any suggestions?
Edited by: user10822921 on Nov 4, 2009 5:03 AMIf the database is asking for recovery when you online the files, and you don't have those transactions in the redo logs, you can't recover to a consistent point in time to online the files.
# Note that the following is not supported by Oracle Support. You may want to ask them for a second opionion.
You could try taking a copy of all files to another location, recreate the controlfile, and use parameter "_allow_resetlogs_corruption=TRUE" to allow "open resetlogs" to ignore the inconsistent SCN. If it works, you should be able to export the data in the copy database, drop the objects in PROD, and re-import. -
version 817/ os Solaris 8
There is request from user to take tablespace offline, and then drop this and its datafile...will i be able to startup db without issue after that?
Edited by: DBA2011 on Mar 27, 2012 2:11 PMHi,
@Aman
The answer is yes but how about doing it on your laptop or somewhere , shouldn't take more than 5 minutes right?:) I agree
@Poster
PS:Please dont forget to change thread status to answered if it possible when u belive your thread has been answered, it pretend to lose time of other forums user while they are searching open question which is not answered,thanks for understanding
Regard
Helios -
hi friends,
I droped a datafile with following command
alter database datafile '/abc/user1.dbf' offline drop;
after that i deleted file from oprating system .
I shutdown the database and restarted
But still it is showing in datadictionary table like sysfiles,v$datafile.
Because of this problem when i am trying to import from other database showing error
IMP -00058 and ORA -00060 on two tables
I saw the trace file after import ,always
looking for '/abc/user1.dbf' which is not there in database only there in datadictionary .
please help me out
rajas far as I know, this is a know problem in oracle in some platforms ( at least pre 8.1.5 and include it, I think). The only way to drop a data file is to rebuild the tablespace that contains the data file. Otherwise, the datafile can not be dropped completely and you will (maybe) encounter some problems.
null -
Hello,
I had to offline and drop a datafile that was corrupted. The database can now be open. So, the database is currently open.
How do I check to see which objects that was on the datafile that I had to drop? Because a datafile was drop, which data dictionary do I check to test if an object was dependent on the datafile that I dropped? Thank you.Clarification:
I have a test database which is not backed up and also not in archive log mode. There was an issue with a physical disk. The database crashed because of issue with on of the disks. The database was mounted with a couple of corrupted datafiles. The database was open only after 'alter datafile datafile_name offline drop. Now the database is able to OPEN status. But now I like to know which objects in the database might have dependent on the datafiles that were dropped. For example, if a table XY was in tablespace A which has 5 datafiles and one of the datafiles was dropped, would the 'status' from dba_tables say 'corrupted' for that table XY? Thank you. -
Renaming oracle datafiles at the unix level
I have noticed that some of the datafile under /oracle/DV1/sapdata2/ have some strange characters in them
Grrr - DBAs that don't know brtools.....
for example:
drwxr-xr-x 2 oradv1 dba 256 Nov 02 23:22 sr3\177_2
and it shows as sr3_2 unless you use ls -lb which shows the above:
Now can I simply stop the DB and cp -rp sr3\177_2 to sr3_2?
I can actually cp -rp sr3\177_2 to sr3_X and then copy sr3_X to sr3_2 or an mv.
So can I do this without screwing up Oracle and SAP?
What should I do as the \177 characters should not be there?
Thanks MikieHello Mike,
at first... the naming of the folder is no problem in running SAP ... it is only a "cosmetic" failure.
But to your question.....
1) Shutdown SAP and Oracle (shutdown immediate)
2) Copy (and remove) or move your data files
3) Publish the new file names to oracle the following way:
> startup mount;
> alter database rename file '<OLD_FILENAME>' to '<NEW_FILENAME>';
> shutdown immediate;
> startup ;
After this the database should start "normally" with the new data file names / directory structure. After these steps i would make a backup of the database.
I have done this many times (not only in SAP environment).
For more information of the rename command:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_1004.htm#i2079942
Regards
Stefan -
Drop Down 3rd Level Not Working
Using DW CS5 I have a menu (from the newest widget "YUI Menu Horizontal Bar") that is allowing third level (language selections) on the "United States" for the various menu options (which you click on one of the three languages it takes you to that page).
But third level (language options) for any other country, when you click on the language, nothing happens.
I'd be grateful for help.
Site: www.aloe-vera.org/test.htm
Thanks, DavidJust figured it out. Had to give my div's unique names for each 3rd leve.
-
No drop in inventory level for 161 return item
HI Gurus,
During a return of item with PO with return indicator ticked, 161 movement is generated.
Inventory stock for Class A items will be reduced however, inventory stock for consumables does not changed.
Is there any settings in material master which is affecting such change for 161 movement?
Thanks
Regards,
Clarice.Class A and consumables are not having the same material type
Class A : Qty updating by valuation area
value updating in no valuation area
Qty structure not checked
Consumables :Qty updating by valuation area
value updating by valuation area
Qty structure checked
Other than the views, the rest are the same -
Dropping UNDO did not free space at OS level
Hi,
As my UNDO tablespace grew very large, i had to drop it by creating a second UNDO tablespace and switching the database to use it. After i successfully dropped the first UNDO, the file systems, which hosted the datafiles of the first UNDO still shows that they are 100% full. I have checked the alert log and everthing looks perfectly fine with the following message
drop tablespace undotbs1 including contents and datafiles
delted file '/u04/oradata/sunshine/undotbs1.dbf'
deleted file '/u06/oradata/sunshine/undotbs1_1.dbf'
Completed: drop tablespace undotbs1 including contents and datafiles
Even the two datafiles 'undotbs1.dbf' and 'undotbs1_1.dbf' were deleted with the "drop tablespace ........" command itself.
Is it required to bounce the database for the changes to be reflected at the OS level?
Any insight?
THanks,
Harris.Hi,
My Oracle version is 9.2.0.5 and i am running on Solaris 9. I have created a new UNDO tablespace UNDOTBS2 and dropped the old UNDO tablespace UNDOTBS1. After i issued the "drop tablespace UNDOTBS1 including contents and datafiles" it deleted the physical datafiles at the OS level too. I do not see any datafiles of the first dropped undo tablespace UNDOTBS1 in the directories specified i.e.,
'/u04/oradata/sunshine/undotbs1.dbf'
'/u06/oradata/sunshine/undotbs1_1.dbf'
So, the tablespace along with datafiles has been dropped (at the OS level too) with the "drop tablespace........" command itself. But, the file system still does not show the freed up space. I have altered the system to use the second undo tablespace UNDOTBS2 before dropping the first.
The second undo UNDOTBS2 has auto extend off, so there is no issue of this increasing to this much of size. The first undo tablespace that i dropped was around 15G of size and it has autoextend ON.
Any suggestions?
Thanks,
Harris. -
Possible to show datafiles that require level 0 backup?
We have some large databases with many datafiles. Is there a command to list / report which datafiles dont have a level 0 backup?
From what I am seeing report need backup - ignores reporting datafiles that may just have a level 1 backup - even if there is no level 0 to base it from.
Is this correct?
Finding this out the hard way when creating a duplicate and finding out that the duplicate fails as it cant find the level 0 for some datafiles
(Linux 11gr1 100tb db Exadata)
Thanks for helping me make sense of this..
DarylI tried that .. it doesnt list any issues but I know there is..
RMAN> report need backup
2> ;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 89 days
Report of files that must be backed up to satisfy 89 days recovery window
File Days Name
Nothing..
but look at this.. there is no level 0 backup .. it fell off .. ie over 89 days old.
RMAN> list backup of datafile 71;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
93363024 Incr 1 793.18G SBT_TAPE 10:39:55 14-OCT-12
BP Key: 93363042 Status: AVAILABLE Compressed: NO Tag: TAG20121013T210225
Handle: bk_PCINF_69501_1_796597627 Media: JW0536
List of Datafiles in backup set 93363024
File LV Type Ckp SCN Ckp Time Name
71 1 Incr 984352498996 09-OCT-12
BS Key Type LV Size Device Type Elapsed Time Completion Time
93551429 Incr 1 10.60G SBT_TAPE 00:04:28 20-OCT-12
BP Key: 93551451 Status: AVAILABLE Compressed: NO Tag: TAG20121020T210951
Handle: bk_PCINF_72018_1_797202927 Media: JW5859
List of Datafiles in backup set 93551429
File LV Type Ckp SCN Ckp Time Name
71 1 Incr 984352498996 09-OCT-12
BS Key Type LV Size Device Type Elapsed Time Completion Time
93978586 Incr 1 10.60G SBT_TAPE 00:07:03 27-OCT-12
BP Key: 93978613 Status: AVAILABLE Compressed: NO Tag: TAG20121027T211433
Handle: bk_PCINF_74209_1_797807878 Media: JW4007
List of Datafiles in backup set 93978586
File LV Type Ckp SCN Ckp Time Name
71 1 Incr 984352498996 09-OCT-12
BS Key Type LV Size Device Type Elapsed Time Completion Time
94415892 Incr 1 10.60G SBT_TAPE 00:05:55 03-NOV-12
BP Key: 94415905 Status: AVAILABLE Compressed: NO Tag: TAG20121103T211332
Handle: bk_PCINF_76973_1_798412667 Media: JW5871
List of Datafiles in backup set 94415892
File LV Type Ckp SCN Ckp Time Name
71 1 Incr 984352498996 09-OCT-12
BS Key Type LV Size Device Type Elapsed Time Completion Time
94725007 Incr 1 10.60G SBT_TAPE 00:06:13 11-NOV-12
BP Key: 94725015 Status: AVAILABLE Compressed: NO Tag: TAG20121111T000027
Handle: bk_PCINF_80432_1_799027731 Media: JF0177
List of Datafiles in backup set 94725007
File LV Type Ckp SCN Ckp Time Name
71 1 Incr 984352498996 09-OCT-12
BS Key Type LV Size Device Type Elapsed Time Completion Time
95026253 Incr 1 973.96G SBT_TAPE 06:48:17 18-NOV-12
BP Key: 95026315 Status: AVAILABLE Compressed: NO Tag: TAG20121117T220628
Handle: bk_PCINF_83850_1_799626027 Media: JW4286
List of Datafiles in backup set 95026253
File LV Type Ckp SCN Ckp Time Name
71 1 Incr 984352498996 09-OCT-12
BS Key Type LV Size Device Type Elapsed Time Completion Time
95819737 Incr 1 448.65G SBT_TAPE 07:56:00 02-DEC-12
BP Key: 95819747 Status: AVAILABLE Compressed: NO Tag: TAG20121201T221733
Handle: bk_PCINF_92173_1_800922570 Media: JW3707
List of Datafiles in backup set 95819737
File LV Type Ckp SCN Ckp Time Name
71 1 Incr 1016584342670 01-DEC-12
RMAN> -
Droping datafiles in oracle 10g r2
Hi guys.
I have a 56 GB size tablespace of which on 15GB if data is being used now. (due to DDL).
I will like to reduce the size of the tablespace by deleting its datafiles. I know that I can resize the datafiles, but there are upto 28 of them and dont want to end up having database of 200M each.
So my question is deleting a datafile will pushed data (if it contains) to another datafile?
Is there a down side doing this?
Thanks for the explanation.
DIDRestrictions on Dropping Files To drop a datafile or tempfile, the datafile or tempfile:That was meant for dropping a datafile complete (from data dictionary as well).
Can you try the following and let me know, whether it works for you or not:
alter database datafile '/datafilename.dbf' offline drop;
and drop the datafile from the OS level.
(What the command really means is that you are offlining the datafile with the intention of dropping the tablespace.)
I agree that its not technically dropped or deleted, but, logicall, Oracle thinks that the datafile is no more accessable to the database.
I was just trying to tell you that you can force to delete the data file using the above command.
Jaffar -
Reusing OMF datafiles in another Oracle
Hi,
I have OMF data files from another oracle (a hard-copy of database), including all SPFILE, LOG, CONTROL AND DBF files. Because the data size is huge and it is impossible to ask for dump formats. My goal is to set up my oracle to use these OMF files so that it can access data in them. My oracle is not configured for OMF yet. Both servers are oracle 10g with matching version.
Could somebody tell me some hints or tricks? The fewer long-duration processes, the better.
thank you very much,
ChenRestrictions on Dropping Files To drop a datafile or tempfile, the datafile or tempfile:That was meant for dropping a datafile complete (from data dictionary as well).
Can you try the following and let me know, whether it works for you or not:
alter database datafile '/datafilename.dbf' offline drop;
and drop the datafile from the OS level.
(What the command really means is that you are offlining the datafile with the intention of dropping the tablespace.)
I agree that its not technically dropped or deleted, but, logicall, Oracle thinks that the datafile is no more accessable to the database.
I was just trying to tell you that you can force to delete the data file using the above command.
Jaffar -
Droping a datafile from a tablespace
I want to drop a datafile from a tablespace by using the query
SQL> alter tablespace TS1 drop datafile 'OS path\df1';
This query drops the datafile. But physically the datafile is present in the OS path. how to delete the datafile completely from the disk.Version:-
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL>
Although it's dropped on database level, I can't delete.If dropped data file from ORACLE, it deletes from OS level too. By any other processes being locked like antivirus and so on?
SQL> select file_name from dba_data_files where tablespace_name='USERS';
FILE_NAME
C:\ORACLE\ORADATA\ORCL\USERS01.DBF
C:\ORACLE\ORADATA\ORCL\USERS02.DBF
SQL> alter tablespace users add datafile 'c:\oracle\oradata\orcl\users03.dbf' size 10m;
Tablespace altered.
SQL> host
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\bn2676>cd c:\Oracle\oradata\orcl
c:\Oracle\oradata\orcl>dir users*
Volume in drive C is System
Volume Serial Number is 1853-3E21
Directory of c:\Oracle\oradata\orcl
02/15/2012 11:25 PM 5,251,072 USERS01.DBF
02/16/2012 09:04 PM 10,493,952 USERS02.DBF
02/16/2012 09:05 PM 10,493,952 USERS03.DBF
3 File(s) 26,238,976 bytes
0 Dir(s) 177,196,707,840 bytes free
c:\Oracle\oradata\orcl>exit
SQL> alter tablespace users drop datafile 'c:\oracle\oradata\orcl\users03.dbf';
Tablespace altered.
SQL> select file_name from dba_data_files where tablespace_name='USERS';
FILE_NAME
C:\ORACLE\ORADATA\ORCL\USERS01.DBF
C:\ORACLE\ORADATA\ORCL\USERS02.DBF
SQL> host
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\bn2676>cd c:\Oracle\oradata\orcl\
c:\Oracle\oradata\orcl>dir user*
Volume in drive C is System
Volume Serial Number is 1853-3E21
Directory of c:\Oracle\oradata\orcl
02/15/2012 11:25 PM 5,251,072 USERS01.DBF
02/16/2012 09:04 PM 10,493,952 USERS02.DBF
2 File(s) 15,745,024 bytes
0 Dir(s) 177,207,398,400 bytes free
c:\Oracle\oradata\orcl>
Maybe you are looking for
-
How to create a group using photoshop scripting?
Hey guys, I can create a layer easily by the below code. but how can i create a group that contain more than one layer. var docRef = app.documents.add(); var myLayer = docRef.artLayers.add();
-
Issue with AS2 Adapter monitoring
Hi All, I am using Seeburger AS2 Adapter in our XI project we are able to post and retrieve messages through AS2 communication,but we are facing the problem of monitoring the messages if any incoming messages failed in the AS2 adapter only due to so
-
Select Expert - Formula : Some clarifications
Hi, Can anyone explain the below formula in Select Expert: IF {?param} = "AAA" THEN {Command.CD} = "ALL" ELSE IF {?param} = "BBB" THEN NOT({Command.CD} = "BALL") ELSE true My doubts are: 1) This formula will be executed after the query in the 'Comman
-
After waking from sleep restart screen comes on...everytime!!!
After updating to Tiger I have had sleep issues and had to restart hard everytime. G4 sonnet 1ghz and 2 gigs of ram.... I have repaired permissions everday...no help with that... thanks Tony B.
-
XL reporter not being started from terminal user
Dear Experts, The excel reporter add-on is not getting started from the terminal client. It says, "add-on connection timed out" and says displays another message, " an attempt was made to reference a token that does not exist." Please share your idea