Automatic deleting of datafiles after DROP TABLESPACE
Lazy junior dba question. How can i order oracle to delete files automaticly after deleting them from control file (like drop tablespace command)?
What technology/approach should I use? Can ASM help me?
Thnaks.
Well, ideally after issuing
DROP TABLESPACE <TBS_NAME> INCLUDING CONTENTS AND DATAFILES; the datafiles corresponding to that tablespace should get deleted automatically. Although, in my case, sometimes it gets deleted automatically, but sometimes it doesn't(Windows Server).
Comments from others will be useful.
Regards,
Anand
Similar Messages
-
Unable to drop datafile after dropping tablespace
Hi All,
Trying to Drop tablespace with Datafile, command used is as below
drop tablespace tims_db including contents and datafiles;
this was executed successfully, but still the datafile exists... tried dropping from OS, but unable to delete the file... associated trace alert logs are as below
Dump file c:\oracle\admin\ocprd\udump\ocprd_ora_4236.trc
Mon Feb 06 03:40:58 2012
ORACLE V9.2.0.6.0 - Production vsnsta=0
vsnsql=12 vsnxtr=3
Windows 2000 Version 5.0 Service Pack 4, CPU type 586
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
Windows 2000 Version 5.0 Service Pack 4, CPU type 586
Redo thread mounted by this instance: 1
Oracle process number: 14
Windows thread id: 4236, image: ORACLE.EXE
*** 2012-02-06 03:40:58.562
*** SESSION ID:(52.7127) 2012-02-06 03:40:58.500
ORA-01259: unable to delete datafile E:\ORACLE\ORADATA\OCPRD\TIMSDB01.DBF
ORA-27056: skgfrdel: could not delete file
OSD-04024: Unable to delete file.
O/S-Error: (OS 32) The process cannot access the file because it is being used by another process.
OS : Windows 2000
DB : Oracle 9i
Please help
Thanksuser1687821 wrote:
As this is a production instance, we need approval to bounce it, If you are sure this file isn't needed - unlock with unlocker and move to some place for a while. Then kill it or kill it immediatly.
Secondly will the database ask for missing datafile when restarted the database even if it is not listed in dba_data_files...?If your tbs drop was successfull - everything will be fine -
Deleted undo datafile before dropping the tablespace.
i had accidently deleted a undo datafile which was no more needed before dropping the tablespace.
i started up the database in mount stage by making that datafile offline.
now while dropping the database it is giving an error.
SQL> drop tablespace UNDOTBS1 ;
drop tablespace UNDOTBS1
ERROR at line 1:
ORA-01548: active rollback segment '_SYSSMU1$' found, terminate dropping tablespace
Do someone have a resolution. I dnt need this tablespace anymore.http://www.my-whiteboard.com/oracle-dba/how-to-drop-and-recreate-oracle-undo-tablespace-and-its-data-files.html may be helpful to you.
-
Incomplete Recovery After Drop Tablespace.
Hi...some technical help required.
I was trying a hands-on for incomplete recovery. That is drop a tablespace and then retrieve back until 1 second before drop statement.
The Steps were like this...
1) Shutdown Immediate;
2) Copy all *.ctl, *.dbf, logfiles into a different folder <nis_back>
3) Startup;
4) Enter 3-4 Records and Commit. Table is in <USER> Tablespace.
5) 3 times "alter system switch logfile;"
5) drop tablespace users;
6) shutdown;
7) Check the Alter Log and find the time when tablespace dropped.
Suppose time when dropped is -> 21-Aug 10:30:45 AM. (HH:MM:SS)
7) copy back only *.dbf, *.ctl files from backup folder <nis_back>
8) startup mount;
9) alter database recover automatic until time '2002-08-21:10:30:40';
10) <<Statement Process>> Message Comes.
11) alter database open resetlogs;
When I open the table into which I inserted records just before dropping the tablespace I dont see the records (Inseretd in Step - 4) but the tablespace is back.
Now My Concern -> Why did the 3-4 record which I inserted in step 4 did not get restored from the archieve log ?
Hope to hear from you all soon.
Thanks in advance.
Regards
NishitAfter step 5, try ALTER SYSTEM ARCHIVELOG ALL
Naveen
Hi...some technical help required.
I was trying a hands-on for incomplete recovery. That is drop a tablespace and then retrieve back until 1 second before drop statement.
The Steps were like this...
1) Shutdown Immediate;
2) Copy all *.ctl, *.dbf, logfiles into a different folder <nis_back>
3) Startup;
4) Enter 3-4 Records and Commit. Table is in <USER> Tablespace.
5) 3 times "alter system switch logfile;"
5) drop tablespace users;
6) shutdown;
7) Check the Alter Log and find the time when tablespace dropped.
Suppose time when dropped is -> 21-Aug 10:30:45 AM. (HH:MM:SS)
7) copy back only *.dbf, *.ctl files from backup folder <nis_back>
8) startup mount;
9) alter database recover automatic until time '2002-08-21:10:30:40';
10) <<Statement Process>> Message Comes.
11) alter database open resetlogs;
When I open the table into which I inserted records just before dropping the tablespace I dont see the records (Inseretd in Step - 4) but the tablespace is back.
Now My Concern -> Why did the 3-4 record which I inserted in step 4 did not get restored from the archieve log ?
Hope to hear from you all soon.
Thanks in advance.
Regards
Nishit -
I work at a school where we have multiple Mac Carts that have 30 MacBooks per cart. We image the macs every summer to delete the older user profiles but we are looking for way to possible have this done automatically through out the year to help with HDD space. What is the best way to delete user profiles after...say 180 days.... of inactivity automatically? I am open to login hooks, bash scripts, etc. Anything to get the job done. Thanks for any help or advice.
A search here turned up this post Deleting inactive users
It appears that the script posted will do as advertised though I would test it out on your systems and under your conditions to see if it does do what you need.
regards
Message was edited by: Frank Caggiano - That script looks for users over 21 days. To look for ones over 180 days change the 21 to 180 in the find command. -
Help automatic delete of request after update
Hi all,
i need to configure an InfoPackage so it automatically delete a previus request on this condition:
- The previous request is on the same month or..
- The new request is into the five days of the next month.
So if an old request is from 23/12/2006 and new request is form 04/01/2007 the old request must be deleted.
But if the new request is from 06/01/2007 or beyond, the old request must not be deleted.
How can i solve this ?
thx in advanceI dont have a sample code, but I can give you the logic which can help you program. Copy the infopackage id which will be something like...ZPAK_3V1PWX599NZE5NR5W2XD5BEU9. Now go to the table RSREQDONE, give this infopackage id for the field logdpid and it will show you all the requests that are loaded using this infopackage. Now sort the entries in the table in a descending order using TDATUM and TUZEIT fields (first by TDATUM and then by TUZEIT). Once this is done, select the first entry (which will be the latest load) and write the routine based on the TDATUM field. If TDATUM lies in the same month, then delete the request whose Request ID number is the same as the RNR number in the record you selected from RSREQDONE (the request id will be like...REQU_449W4IE405ZSI25W9WLXAB3FH). Else do not delete.
Hope this helps. Also, please paste the code here for future reference incase you were successful deleting the requests according to your selections. -
How can i drop datafile when drop tablespace?
I use oo4o.
nullXiaoer (guest) wrote:
: I use oo4o.
As far as Oracle is concerned, a datafile is no longer
accessible if it's no longer assigned to a tablespace. To
physically remove the datafile, you should use your OS. Just
make sure you:
1) Really have dropped the tablespace
2) You delete the correct datafile - anything with 'SYS' in
the title is probably a bad idea!
null -
Lobby Ambassador - Automatic deletion from WCS after Expiry or Account
Hi Guys,
When I create a guest account and the account time expires, the account still remains on the WCS (but not on the controller).
Is this a feature of the WCS or a bug?
If so, can I ask the WCS to automatically remove all guest users accounts from the WCS lobby ambassador either directly after expiry, or say at 00:00 hours every day?
Many thx
KenHi there,
Many thx.
The way I understand it, is that yes the user expires, but you still have to clear down the username off the WCS periodically.
Just thought the WCS may be able to do this as the timer expires but had a chat with a few guys at Cisco and is not possible currently.
Cheers
Ken -
Automatical deleting of content after time
Hello,
I'd like to make a cleanup of wasted data on Adobe Acrobat
Connect Professional - Server. My issue is to create a script in
Java, that integrate following points:
- material which was uploaded in a Meeting only reaches a
lifetime of 30 days
- material which was uploaded as meratial in the material
database only reaches a lifetime of 60 days
Is it possible to make this true, by using the web-API?
Or are there other ways to get rid of that issue?I work with publisher for a long time now, and I don’t think that there is an automatic process that dose that, you have to manually delete it when it is expired.
-Lilach -
Ipad 2 automaticly deletes e-mails after reading
Recently my ipad2 started deliting e-mails right after I open and read them. It deleted all past e-mails also. Dose anyone know why this happens and how to fix it. I have deleted and set up my e-mail account couple of time...unfortunately did not work.
Doubtful your iPad is doing this especially since there is no setting for this.
What type of account - Exchange, IMAP, or POP? -
Dropping tablespace for a partitionned table
Hi all,
I have a table partitionned and I want to drop the tablespace for a specific partition. So what happen in the table if I drop one tablespace with a commande drop tablespace tbs including contents and datafiles;
Does the index unusable in this table?
RegardsNo, you can not drop a tablespace which contains tables whose partitions are not completely contained in this tablespace.
db9i :SQL> create tablespace users2 datafile '/u02/oradata/db9i/users201.dbf' size 10M;
Tablespace created.
db9i :SQL> CREATE TABLE sales_by_region (item# INTEGER, qty INTEGER,
2 store_name VARCHAR(30), state_code VARCHAR(2),
3 sale_date DATE)
4 STORAGE(INITIAL 10K NEXT 20K) TABLESPACE test
5 PARTITION BY LIST (state_code)
6 (
7 PARTITION region_east
8 VALUES ('MA','NY','CT','NH','ME','MD','VA','PA','NJ')
9 STORAGE (INITIAL 20K NEXT 40K PCTINCREASE 50)
TABLESPACE users,
10 11 PARTITION region_west
12 VALUES ('CA','AZ','NM','OR','WA','UT','NV','CO')
13 PCTFREE 25
14 TABLESPACE users2,
15 PARTITION region_unknown
16 VALUES (DEFAULT)
17 TABLESPACE test
18 );
Table created.
db9i :SQL> insert into sales_by_region values (1, 100, 'store 1','NY',sysdate);
1 row created.
db9i :SQL> insert into sales_by_region values (2, 200, 'store 2','UT',sysdate);
1 row created.
db9i :SQL> insert into sales_by_region values (3, 300, 'store 3','ZZ',sysdate);
1 row created.
db9i :SQL> commit;
Commit complete.
db9i :SQL> select count(*) from sales_by_region
2 /
COUNT(*)
3
--insure all data went to the right partition
db9i :SQL> alter table sales_by_region truncate PARTITION region_east;
Table truncated.
db9i :SQL> select count(*) from sales_by_region
2 /
COUNT(*)
2
db9i :SQL> alter table sales_by_region truncate PARTITION region_west;
Table truncated.
db9i :SQL> select count(*) from sales_by_region
2 /
COUNT(*)
1
db9i :SQL> alter table sales_by_region truncate PARTITION region_unknown;
Table truncated.
db9i :SQL> select count(*) from sales_by_region
2 /
COUNT(*)
0
db9i :SQL> insert into sales_by_region values (1, 100, 'store 1','NY',sysdate);
insert into sales_by_region values (2, 200, 'store 2','UT',sysdate);
insert into sales_by_region values (3, 300, 'store 3','ZZ',sysdate);
1 row created.
db9i :SQL>
1 row created.
db9i :SQL>
1 row created.
db9i :SQL>
db9i :SQL>
db9i :SQL> commit;
Commit complete.
db9i :SQL> select count(*) from sales_by_region
2 /
COUNT(*)
3
--now drop one tablespace
db9i :SQL> drop tablespace users2 including contents and datafiles
2 /
drop tablespace users2 including contents and datafiles
ERROR at line 1:
ORA-14404: partitioned table contains partitions in a different tablespace
db9i :SQL> !oerr ora 14404
14404, 00000, "partitioned table contains partitions in a different tablespace"
// *Cause: An attempt was made to drop a tablespace which contains tables
// whose partitions are not completely contained in this tablespace
// *Action: find tables with partitions which span the tablespace being
// dropped and some other tablespace(s). Drop these tables or move
// partitions to a different tablespace
--move table partition from users2 to users
db9i :SQL> alter table sales_by_region move partition region_west
tablespace users; 2
Table altered.
--drop tablespace again
db9i :SQL> drop tablespace users2 including contents and datafiles
2 /
Tablespace dropped. -
Counting inbound emails (including those automatically deleted using ERMS)
Hi all,
I have a requirement to be able to count all inbound emails in SAP CRM (5.0). This includes all emails that have been automatically deleted using ERMS after the creation of an Interaction Record and Service Ticket. Can anyone think of an easy way of doing this in SAP CRM? The Email Workbench and Agent Inbox do not display deleted email Workitems. The best option that I have been able to come up with is to export the Workitem Selection Report from transaction SWI1 into a spreadsheet and filter column Workitem ID for unique entries. Does anyone know of a better way of achieving this?
Thanks,
Onkar.By using POP3, mail is automatically deleted from the server once downloaded by the client without further user intervention (granted, not immediately due to BTYahoos recent non-standard implementation of the POP3 protocol). By contrast, the whole point of IMAP is that mail is left on the server to be available to multiple devices and requires user intervention to delete. Why would a system which is designed to be used for leaving mail on a server be recommmended to someone who wished it to be deleted? If you wish to be pedantic, I agree the OP didn't ask for mail to be automatically deleted, but then nor did he specify immediate deletion either. I interpreted the request as the former, you the latter. Perhaps if we understood the underlying reason why he wished the mail to be deleted in the first place it would help in providing a solution.
There seems to be a recurring theme on this forum to promote IMAP as a universal panacea to overcome all mail problems which is diverting attention away from fixing BTYahoo's broken POP3 servers which have to my knowledge at least 4 problems. Two are deliberate by BTYahoo, lack of secure login and moving read items to the Trash folder temporarily before deletion. Two are faults which they seem either unable or reluctant to fix, intermittant authentication problems and inabilty to download even modest sized attachments on a slow connection.
Correction, he did ask them to be deleted automatically. -
TS3899 My iPad Air automatically deletes my mail
I have an iPad Air and it automatically deletes my mail after a few days...
I'm searching for older mails and i only see mails from the past 3-4 days...
How can i change that?
I want to manualy delete my mails...
Please enlighten me...
Thanks in advance...Settings > Mail, Contacts, Calendars > tap email account name > Mail Days to Sync > Increase the time
-
How do I automatically delete a .ps file after creating a pdf?
Hi all! I vaguley remember in the past that there is a preference to automatically delete a .ps file after creating a pdf. Can someone remind me of how to do this? I'm using Distiller version 9.2.0. Thank you so much!
Julie
PS: I'm creating the .ps file from Quark 7, if that makes a difference.I am unaware of any feature allowing automatic delete of .PS files.
The adobePDF print driver which has been removed in OSX.6.x (Snow Leopard) That you choose when ina Document would go through the following steps in the background this made it slow.
create .ps File (hidden)
Checksum Verify the .ps File
Open Distiller in background (hidden)
Create Pdf
Checksum Verify the .pdf File
shut down Distiller in Backgroun (hidden)
Delete .ps File (hidden)
Pdf suddenly appears
If at any point in this chain something dies the pdf was not made.
Actually in prior OS to X.3.x the print driver provided for my Hp Inkjet, it was actually better to go to print menu, and choose save as postscript, then drop the postsript file on distiller and creat the PDF. or just open the ps in Acrobat.
with the PRint Drive provided for my HP Inkjet for X.3 it was changed to create Postcsript file from PDF. In the start having the PDF button on print menu. The pdf's were not as good as those created in the AdobePDF driver. But were aceptable for most purposes. -
Hi Everyone,
I had a strange situation occur today with an SMS on my iPhone 5.
I signed up for a bank account and a message was sent to me with a few details of my account and a seperate SMS with a temporary PIN Number (from the same number) after authenticating my date of birth. The SMS was available all day yesterday and didnt look at it again, until I received another message from the Bank today stating "If your PIN message still exists in your inbox, Please delete manually", looking at the conversation of the SMS the temporary PIN has disappeared, Eventhough I still have other messages in the conversation available.
Can anyone in the community help me understand whether it is possible to remotely remove an individual SMS or send a timed SMS with an exipry, after which the message automatically deletes itself.
Kind Regards
AidanTo the best of my knowledge, not on an unjailbroken phone using the stock Messages app.
Maybe you are looking for
-
Pavilion dv6 - the search for WLAN doesnt exist after installing windows 7 ultimate
pavilion dv6 - the search for WLAN doesnt exist after installing windows 7 ultimate after installing windows 7 my computer only displays the LAN on my quicklaunch bar and I can even search for open WLAN networks =(
-
How can I retrieve a train of text messages back to October 1, 2013, that I have deleted?
-
I lost songs on my itunes library n i have same songs kn my iphone. So how can i get them back to itunes library?
-
Changing Book/Page from within a pageflow
We need to define a pageflow action which has the same effect as the user clicking on a Book (or Page) tab, i.e. switches to another portlet/pageflow - preferably at the "begin" action. That's probably 2 problems: 1) define an action to simulate the
-
BI JAVA is not started.
Hi All, java is not started in Bi system, We restarted the system then ABAP comes up but JAVA is not workiong Dispatcher is running server0 is running BUT SDM is not running its in "Stoped" i checked the logs also but no updates. Regards Babu