Solved

Datafile deletion

Posted on 2010-11-18
7
898 Views
Last Modified: 2012-05-10
Hello All,

I am getting "ORA-00060: deadlock detected while waiting for resource" while deleting a datafile.

when i checked in dba_data_files and V$datafile the ONLINE_STATUS/STATUS is in RECOVER mode.

I do not need this datafile so i tried to drop using the following command ..

ALTER TABLESPACE DATAP_LARGE DROP DATAFILE 'D:\ORACLE\ORADATA\DATAP\DATAP_LARGE_12.DBF';

I checked the Trace file geenrated for the deadlock, the Session which is in question is the session where i ran the command (SQLPLUS).

Can anybody throw some light on this.

Thanks

Rahul
0
Comment
Question by:Max4rDBA
  • 4
  • 3
7 Comments
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34164798
Did you issue the offline drop command first?

ALTER DATABASE DATAFILE 'D:\ORACLE\ORADATA\DATAP\DATAP_LARGE_12.DBF' OFFLINE DROP;
0
 

Author Comment

by:Max4rDBA
ID: 34166327
Yes Slightwv , i have executed the offline drop command and then i executed the "ALTER TABLESPACE DATAP_LARGE DROP DATAFILE 'D:\ORACLE\ORADATA\DATAP\DATAP_LARGE_12.DBF'; " where i got the deadlock error.

0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34166556
Check Metalink for some causes:

Unable to Drop a Datafile From the Tablespace Using Alter Tablespace Command [ID 1050261.1]
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:Max4rDBA
ID: 34166626
Thanks Slightvw, I saw the metalink just before migrating the tablespace i wanted to know if i put the database in the MOUNT stage and then execute the command will the drop datafile work.

Thanks

Rahul
0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
ID: 34167097
>> i wanted to know if i put the database in the MOUNT stage and then execute the command will the drop datafile work.

I have no idea.  If you are able to shutdown the database it's worth a try.
0
 

Accepted Solution

by:
Max4rDBA earned 0 total points
ID: 34420978
Deleted datafile after dropping the tablespace
0
 

Author Closing Comment

by:Max4rDBA
ID: 34434243
Found own answer
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to replace '&' and '()' in sql query for oracle using regex 8 74
SQL Developer 6 48
constraint check 2 40
Oracle function to insert records? 15 42
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question