Undable to drop tablespace ORA-01561: failed to remove all objects in the
hi,
i am unable to drop table tablespace how can i do that??
please advise
DROP TABLESPACE tbs_tp2 INCLUDING CONTENTS AND datafiles
ERROR at line 1:
ORA-01561: failed to remove all objects in the tablespace specified
Thanks in advance
siva
chennai
Have you tried dropping the objects individually? You can see which objects still belong to this tablespace by using the DBA_SEGMENTS view as shown below:
SELECT OWNER, SEGMENT_NAME, SEGMENT_TYPE, TABLESPACE_NAME
FROM DBA_SEGMENTS
WHERE TABLESPACE_NAME=tbs_tp2;HTH!
Similar Messages
-
Dropping Tablespaces ORA 23515 Error
Hi
I am trying to drop a tablespace
DROP TABLESPACE EXAMPLE INCLUDING CONTENTS AND DATAFILES;
I get ORA 23515 Error " Materialized Views and /or their indices exist in the Tablespace"
How to find out which Materialized views and /or indices are to be dropped? Is there a way to find them?You can find materialized views from the database using the following select
select object_name,object_type from dba_objects where owner='xxxxx' and object_type='MATERIALIZED VIEW';
and then drop the MV using command
drop materialized view xxxxx; -
Indesign packaging leaves out some links, even though files are linked correctly prior to packaging. I am currently working on Indesign CS5, Mac 0S X, Version 10.5.8.
I had a problem with links on the master pages not being packaged. I found this and did the 7.0.3 Adobe update but no success.
I tried a few more web searches and found this
http://indesignsecrets.com/packaging-graphics-on-the-pasteboard.php
which is sort of the same problem.
The gist is to enlarge the slug area to the max (152.4mm or whatever that is in your preferred units). It seems that package ignores anything that has part of it on the pasteboard.
This is a pain when you only want to collect the active items but I expect someone at Adobe will sort this out in due course.
Hope this helps someone else -
hi,
drop tablespace tbs1 INCLUDING CONTENTS AND DATAFILES;
drop tablespace tbs1 INCLUDING CONTENTS AND DATAFILES
ERROR at line 1:
ORA-01561: failed to remove all objects in the tablespace specified
I tried it also after altering tbs1 to offline. Same result.
any idea?
thanksHello,
If you are very sure of no objects being held by the tablespace then you can follow the below steps to drop it:
Get the tablespace-Number from 'TS$'
sys@ORADEMO> select TS# from TS$ where name='TABLESPACE_NAME';
TS#
7
Now, update the 'SEG$' view
sys@ORADEMP>update SEG$ set TYPE#=3 where TS#=7;
1 row updated
Shutdown and startup the database.
Now try dropping the tablespace:
Wishes
^_^ -
Problem while dropping tablespace
Hi all,
I am getting following error while i am trying to drop tablespace
ORA-02449: unique/primary keys in table referenced by foreign keys.
I am using followin statement to drop tablespace;
drop tablespace QAREF430 including contents and datafiles;
wat might be the problem?
Thanks.wat might be the problem?You have some referential integrity constraints, outside QAREF430 tablespace, pointing to a table inside QAREF430 tablespace. Try
drop tablespace QAREF430 including contents and datafiles cascade constraints; -
I want to know how to drop tablespace in Oracle 8i.
Actually i read on internet that we cannot drop tablespace in oracle 8i.
Is that true?
How can i drop the tablespace in 8i?
Thanks,8i does have a DROP TABLESPACE command. What it does not have is the "AND DATAFILES" clause. Thus, it will not remove the datafiles at the OS layer (eg filesystem).
-
Failed to Open a Session on the Device - scanning from Mac OSX 10.9.3 - M1217nfw
Hello,
I'm running into some issues scanning wirelessly from our HP LaserJet M1217nfw MFP from any Mac running 10.9.3. I've tried to "Reset Printing System" and re-adding the printer with no success. Each time I open either Preview/Printers & Scanners/Image Capture, I receive the following error message: "Failed to Open a Session on the Device." When I add the printer, I do so by selecting the "+" icon, and selecting "Add Printer or Scanner..." selecting the printer from the list listed via bonjour, and "Select the software" but my model printer is not listed. The closest printer listed is HP LaserJet Professional M1210nf MPF Series, but it doesn't work. Any ideas here?
This question was solved.
View Solution.Welcome to the HP Forums jpuebla,
I see by your post that you are having issues scanning, you aren't able find the drivers to add the printer.
I can help you with this issue.
The drivers for Maverick are the Apple Update drivers.
OS X v10.9 Mavericks: Installing and Using the Printer on a Mac.
Repair the Disk Permissions on the Mac:
Close all applications.
On the Apple menu bar, click Go, click Applications and then click Utilities.
Double-click Disk Utility.
Highlight your hard drive/partition on the left.
Click Verify and then Repair Disk Permissions.
Restart the computer.
Reset the Printing System:
Note: This will remove all printers in the print and Fax/Scan, any printer removed can be re-added later by clicking the plus (+) symbol.
Click the Apple icon ( ), and then click System Preferences.
Click Printers & Scanners.
Right-click (or Ctrl +click) in the left white side panel, then click Reset printing system.
Click OK to confirm the reset.
Type the correct Name and Password.
Click OK to reset the printing system.
Then click the + sign, then select the printer from the list and click on the Add button.
(make sure it shows the printer name beside Use, not the Airprint driver)
You might have to run the Apple Updates again with USB cable connected to get the drivers installed.
Then try and add the bonjour printer again.
Test the printer again.
If you are having network issues, then add the printer through the IPProtocal.
After clicking the + button, select the IP icon across the top, type in the printer's IP address, select jet direct below and then Apply.
Test the printer.
I have seen the HP Printer Drivers v.2.16.1 for OS X drivers work successfully, if the issue persists.
If you need further assistance, let me know.
Have a nice day!
Thank You.
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
Gemini02
I work on behalf of HP -
ORA-01039:Insufficient Privileges on the Underlying Objects of the View
Hi,
I have a Query where it is using (SELECT name from v$DATABASE as a Inline View).
But when my running the Explain Plan in Toad it is giving the Error as
'ORA-01039:Insufficient Privileges on the Underlying Objects of the View'
Any help will be appreciable
Thanks and Regardsyou need SELECT ANY DICTIONARY privelage Below is a small demonstration.
First iam connecting as a SYSDBA and doing an explain plan on v$database.
SQL*Plus: Release 9.2.0.1.0 - Production on Mon Sep 1 12:36:53 2008
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Enter user-name: akivadba/akivadba@akivatst as sysdba
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> set linesize 250
SQL>
SQL> explain plan for select * from v$database
2 /
Explained.
SQL> select * from table(dbms_xplan.display)
2 /
PLAN_TABLE_OUTPUT
Plan hash value: 735420252
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 100 | 77200 | 0 (0)| 00:00:01 |
| 1 | MERGE JOIN CARTESIAN| | 100 | 77200 | 0 (0)| 00:00:01 |
|* 2 | FIXED TABLE FULL | X$KCCDI | 1 | 710 | 0 (0)| 00:00:01 |
| 3 | BUFFER SORT | | 100 | 6200 | 0 (0)| 00:00:01 |
| 4 | FIXED TABLE FULL | X$KCCDI2 | 100 | 6200 | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("DI"."INST_ID"=USERENV('INSTANCE'))
16 rows selected.No problem till now every thing is fine. Now iam connecting as a normal user and doing the same.
SQL> connect
Enter user-name: sysadm/sysadm@akivatst
Connected.
SQL>
SQL> explain plan for select * from v$database
2 /
explain plan for select * from v$database
ERROR at line 1:
ORA-01039: insufficient privileges on underlying objects of the viewLook i got the insufficient privileges error. Now let me grant the required privileges.
SQL> connect
Enter user-name: akivadba/akivadba@akivatst as sysdba
Connected.
SQL> GRANT SELECT ANY DICTIONARY TO SYSADM
2 /
Grant succeeded.Now connect back to the user and try again.
SQL> connect
Enter user-name: sysadm/sysadm@akivatst
Connected.
SQL> explain plan for select * from v$database
2 /
Explained.
SQL> select * from table(dbms_xplan.display)
2 /
PLAN_TABLE_OUTPUT
Plan hash value: 735420252
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 100 | 77200 | 0 (0)| 00:00:01 |
| 1 | MERGE JOIN CARTESIAN| | 100 | 77200 | 0 (0)| 00:00:01 |
|* 2 | FIXED TABLE FULL | X$KCCDI | 1 | 710 | 0 (0)| 00:00:01 |
| 3 | BUFFER SORT | | 100 | 6200 | 0 (0)| 00:00:01 |
| 4 | FIXED TABLE FULL | X$KCCDI2 | 100 | 6200 | 0 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("DI"."INST_ID"=USERENV('INSTANCE'))
16 rows selected.
SQL>Thanks,
Karthick.
Edited by: karthick_arp on Sep 1, 2008 12:21 AM -
I can find nothing searching online. Trying to move the last user mailbox from one server to another, but it fails with this error. I have checked all mailboxes for the same GUID but can't locate it anywhere. Anybody have some suggestions?
Does anyone know if there is a way to perform a search based on mailbox GUID? Maybe I could find all objects with the same and it could lead me in the right direction.
Hi,
To find the object that belongs to a GUID, you can refer to this blog.
http://blogs.technet.com/b/ehlro/archive/2010/04/22/how-to-find-the-object-that-belongs-to-a-guid.aspx
Best Regards.
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
Lynn-Li
TechNet Community Support -
Hello,
1 create tablespace TS1
2 create restore point RP1;
3 drop tablespace TS1 (datafile '/c:/ts1.dbf') including files
4 restore database to RP1
5 alter database open resetlogs failed with this error :
ERROR at line 1:
ORA-01245: offline file 7 will be lost if RESETLOGS is done
ORA-01110: data file 7: '/c:/ts1.dbf'
Can you help me please to fix this issue and to understand why it's occured.Hi,
If you check the alert log you will get message similar to
Recovery deleting file #7:'<Oracle_Home>/db/dbs/UNNAMED00007' from controlfile.
Now you have 2 option
1. If you have backup of that tablespace TS1 then you can restore and recover it
If you don't need that tablespace then you offline drop that datafile 7 . Open the database in resetlogs mode and then drop tablespace TS1
Thank you -
TSPITR - Recover a Dropped Tablespace aborting due dependency over XDB.
I found an issue using TSPITR to Recover a Dropped Tablespace when XML DB (XDB) is installed on a different tablespace from "SYSAUX".
During execution of TSPITR RMAN use Data Pump to export/import Tablespace Metadata as Data Pump has dependency over XDB views and related objects and XDB is installed on a set of tablespace not included on dummy database then EXPDP fails.
Errors raised ORA-39123, ORA-00376, ORA-01110.
I didn't found any limitation about XDB location on documentation or MoS.
This looks like a Oracle Bug.
See this:
XDB installed on TABLESPACE XDB.
SQL> select owner,tablespace_name
from dba_segments
where owner='XDB'
GROUP BY owner,tablespace_name ;
OWNER TABLESPACE_NAME
XDB XDBDropping Tablespace SOE.
SQL> select to_char(sysdate,'dd-mm-yyyy hh24:mi:ss') actual_date from dual;
ACTUAL_DATE
17-12-2012 11:57:44
SQL> drop tablespace SOE including contents and datafiles;
Tablespace dropped.Restoring Dropped Tablespace.
RMAN> list backup tag TAG20121217T112226;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
69 Full 995.61M DISK 00:02:41 17-12-2012 11:25:07
BP Key: 69 Status: AVAILABLE Compressed: YES Tag: TAG20121217T112226
Piece Name: +DG_16M/prod/backupset/2012_12_17/nnndf0_tag20121217t112226_0.286.802264947
List of Datafiles in backup set 69
File LV Type Ckp SCN Ckp Time Name
1 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/system.349.799325249
2 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/sysaux.348.799325249
3 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/undotbs1.347.799325251
4 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/users.335.799325251
5 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/audit_aux.287.799330083
6 Full 1628648 17-12-2012 11:22:26
7 Full 1628648 17-12-2012 11:22:26 +DS8000_DG/prod/datafile/xdb.311.801410833
RMAN>
run{
SET NEWNAME FOR DATAFILE 6 TO "+DS8000_DG";
RECOVER TABLESPACE SOE
UNTIL TIME "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')"
AUXILIARY DESTINATION '/u01/app/oracle/flash_recovery_area01/stage_area_tspitr';
executing command: SET NEWNAME
Starting recover at 17-12-2012 12:01:29
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time
List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1
Creating automatic instance, with SID='FCox'
initialization parameters used for automatic instance:
db_name=PROD
db_unique_name=FCox_tspitr_PROD
compatible=11.2.0.0.0
db_block_size=8192
db_files=200
sga_target=280M
processes=50
db_create_file_dest=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr
log_archive_dest_1='location=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr'
#No auxiliary parameter file used
starting up automatic instance PROD
Oracle instance started
Total System Global Area 292278272 bytes
Fixed Size 2220880 bytes
Variable Size 109055152 bytes
Database Buffers 176160768 bytes
Redo Buffers 4841472 bytes
Automatic instance created
List of tablespaces that have been dropped from the target database:
Tablespace SOE
contents of Memory Script:
# set requested point in time
set until time "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')";
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
# archive current online log
sql 'alter system archive log current';
# avoid unnecessary autobackups for structural changes during TSPITR
sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
executing Memory Script
executing command: SET until clause
Starting restore at 17-12-2012 12:01:46
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=16 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece +DG_16M/prod/autobackup/2012_12_17/s_802265113.276.802265115
channel ORA_AUX_DISK_1: piece handle=+DG_16M/prod/autobackup/2012_12_17/s_802265113.276.802265115 tag=TAG20121217T112513
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:05
output file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/controlfile/o1_mf_8dy9ghpz_.ctl
Finished restore at 17-12-2012 12:01:52
sql statement: alter database mount clone database
sql statement: alter system archive log current
sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
contents of Memory Script:
# set requested point in time
set until time "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')";
# set destinations for recovery set and auxiliary set datafiles
set newname for clone datafile 1 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 2 to new;
set newname for clone tempfile 1 to new;
set newname for datafile 6 to
"+DS8000_DG";
# switch all tempfiles
switch clone tempfile all;
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 3, 2, 6;
switch clone datafile all;
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
renamed tempfile 1 to /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_temp_%u_.tmp in control file
Starting restore at 17-12-2012 12:01:58
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_system_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_undotbs1_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_sysaux_%u_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00006 to +DS8000_DG
channel ORA_AUX_DISK_1: reading from backup piece +DG_16M/prod/backupset/2012_12_17/nnndf0_tag20121217t112226_0.286.802264947
channel ORA_AUX_DISK_1: piece handle=+DG_16M/prod/backupset/2012_12_17/nnndf0_tag20121217t112226_0.286.802264947 tag=TAG20121217T112226
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:09:15
Finished restore at 17-12-2012 12:11:13
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=802267873 file name=+DS8000_DG/prod/datafile/soe.487.802267321
datafile 1 switched to datafile copy
input datafile copy RECID=6 STAMP=802267873 file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_system_8dy9gs09_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=7 STAMP=802267873 file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_undotbs1_8dy9ov17_.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=8 STAMP=802267873 file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_sysaux_8dy9hxsc_.dbf
contents of Memory Script:
# set requested point in time
set until time "to_date('17-12-2012 11:55:00','dd/mm/yyyy hh24:mi:ss')";
# online the datafiles restored or switched
sql clone "alter database datafile 1 online";
sql clone "alter database datafile 3 online";
sql clone "alter database datafile 2 online";
sql clone "alter database datafile 6 online";
# recover and open resetlogs
recover clone database tablespace "SOE", "SYSTEM", "UNDOTBS1", "SYSAUX" delete archivelog;
alter clone database open resetlogs;
executing Memory Script
executing command: SET until clause
sql statement: alter database datafile 1 online
sql statement: alter database datafile 3 online
sql statement: alter database datafile 2 online
sql statement: alter database datafile 6 online
Starting recover at 17-12-2012 12:11:14
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 15 is already on disk as file +DG_16M/prod/archivelog/2012_12_17/thread_1_seq_15.277.802267317
channel ORA_AUX_DISK_1: starting archived log restore to default destination
channel ORA_AUX_DISK_1: restoring archived log
archived log thread=1 sequence=14
channel ORA_AUX_DISK_1: reading from backup piece +DG_16M/prod/backupset/2012_12_17/annnf0_tag20121217t112512_0.264.802265113
channel ORA_AUX_DISK_1: piece handle=+DG_16M/prod/backupset/2012_12_17/annnf0_tag20121217t112512_0.264.802265113 tag=TAG20121217T112512
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
archived log file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/1_14_801941068.dbf thread=1 sequence=14
channel clone_default: deleting archived log(s)
archived log file name=/u01/app/oracle/flash_recovery_area01/stage_area_tspitr/1_14_801941068.dbf RECID=141 STAMP=802267877
archived log file name=+DG_16M/prod/archivelog/2012_12_17/thread_1_seq_15.277.802267317 thread=1 sequence=15
media recovery complete, elapsed time: 00:00:01
Finished recover at 17-12-2012 12:11:19
database opened
contents of Memory Script:
# make read only the tablespace that will be exported
sql clone 'alter tablespace SOE read only';
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/u01/app/oracle/flash_recovery_area01/stage_area_tspitr''";
# create directory for datapump export
sql clone "create or replace directory TSPITR_DIROBJ_DPDIR as ''
/u01/app/oracle/flash_recovery_area01/stage_area_tspitr''";
executing Memory Script
sql statement: alter tablespace SOE read only
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/flash_recovery_area01/stage_area_tspitr''
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/u01/app/oracle/flash_recovery_area01/stage_area_tspitr''
Performing export of metadata...
EXPDP> Starting "SYS"."TSPITR_EXP_FCox":
EXPDP> ORA-39123: Data Pump transportable tablespace job aborted
ORA-00376: file 7 cannot be read at this time
ORA-01110: data file 7: '+DS8000_DG/prod/datafile/xdb.311.801410833'
Removing automatic instance
shutting down automatic instance
database closed
database dismounted
Oracle instance shut down
Automatic instance removed
auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_temp_8dyb0qok_.tmp deleted
auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/onlinelog/o1_mf_3_8dyb0kfp_.log deleted
auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/onlinelog/o1_mf_2_8dyb0fm9_.log deleted
auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/onlinelog/o1_mf_1_8dyb07xv_.log deleted
auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_sysaux_8dy9hxsc_.dbf deleted
auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_undotbs1_8dy9ov17_.dbf deleted
auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/datafile/o1_mf_system_8dy9gs09_.dbf deleted
auxiliary instance file /u01/app/oracle/flash_recovery_area01/stage_area_tspitr/PROD/controlfile/o1_mf_8dy9ghpz_.ctl deleted
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 12/17/2012 12:12:19
RMAN-06962: Error received during export of metadata
RMAN-06965: Datapump job has stopped
RMAN-06960: EXPDP> Job "SYS"."TSPITR_EXP_FCox" stopped due to fatal error at 12:12:02
RMAN>If I drop tablespace SOE and XDB on Target database and try to restore both (SOE,XDB) export will succeeds but during IMPORT Metadata RMAN will faill due XDB dependency.
In my view, they (mean Oracle) need find way to include XDB Tablespace at DUMMY database only to export (EXPDP) Metadata purposes.
If someone get a workaround for this error will be grateful.
P.S: This is not a Production environment and will soon open a SR on Oracle Support.Hi Michael,
I did not find solution to use TSPITR to recover dropped tablespace if XML DB is installed in a non-default tablespace (i.e outside of SYSAUX).
As far I could understand, the only way to perform this RESTORE is using the old fashion. By creating clone database excluding all unnecessary tablespace, exporting and importing metadata from desired tablespace manually.
Since Oracle has not solved the issue I created my own workaround.
@All
If someone is able to use TSPITR to restore dropped tablespace when XDB is installed in a non-default tablespace, please let me know!!!
The procedure below is supported on All Oracle Version since 10.1 until 11.2.
I DON'T RECOMMEND to create AUXILIARY (clone) database using the same server from TARGET because you can damage the TARGET database.
On this example I'm using same server.
See this example:
### ON TARGET DATABASE
SQL> select count(1) SEG_COUNT from dba_segments where tablespace_name='SOE';
SEG_COUNT
32
SQL> ! date
Wed Dec 19 15:08:11 GMT-02:00 2012
SQL> drop tablespace soe including contents and datafiles;
Tablespace dropped.
### CHECK TABLESPACE TO BE EXCLUDED FROM RESTORE
SQL> select tablespace_name
from dba_tablespaces
where tablespace_name not in ('SYSTEM','SYSAUX','UNDOTBS1','SOE','XDB','TEMP');
TABLESPACE_NAME
USERS
AUDIT_AUX
### CHECK BACKUP ON TARGET DATABASE
RMAN> list backup completed between "sysdate-1" and "sysdate";
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
95 Full 986.56M DISK 00:03:18 19-12-2012 14:41:59
BP Key: 95 Status: AVAILABLE Compressed: YES Tag: TAG20121219T143840
Piece Name: /fra/PROD/backupset/2012_12_19/o1_mf_nnndf_TAG20121219T143840_8f3vdn3q_.bkp
List of Datafiles in backup set 95
File LV Type Ckp SCN Ckp Time Name
1 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/system.349.799325249
2 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/sysaux.348.799325249
3 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/undotbs1.347.799325251
4 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/users.335.799325251
5 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/audit_aux.287.799330083
6 Full 1675258 19-12-2012 14:38:42
7 Full 1675258 19-12-2012 14:38:42 +DS8000_DG/prod/datafile/xdb.311.801410833
BS Key Size Device Type Elapsed Time Completion Time
96 1.16M DISK 00:00:00 19-12-2012 14:42:08
BP Key: 96 Status: AVAILABLE Compressed: YES Tag: TAG20121219T144208
Piece Name: /fra/PROD/backupset/2012_12_19/o1_mf_annnn_TAG20121219T144208_8f3vm0k3_.bkp
List of Archived Logs in backup set 96
Thrd Seq Low SCN Low Time Next SCN Next Time
1 8 1675198 19-12-2012 14:38:25 1675365 19-12-2012 14:42:07
BS Key Type LV Size Device Type Elapsed Time Completion Time
97 Full 7.52M DISK 00:00:02 19-12-2012 14:42:11
BP Key: 97 Status: AVAILABLE Compressed: NO Tag: TAG20121219T144209
Piece Name: /fra/PROD/autobackup/2012_12_19/o1_mf_s_802449729_8f3vm2cc_.bkp
SPFILE Included: Modification time: 19-12-2012 14:36:30
SPFILE db_unique_name: PROD
Control File Included: Ckp SCN: 1675376 Ckp time: 19-12-2012 14:42:09
RMAN>
### PREPARING ENV
cp $ORACLE_HOME/dbs/orapwprod $ORACLE_HOME/dbs/orapwtspitr
cd $ORACLE_HOME/dbs
## Creating INIT from TSPITR Instance
vi inittspitr.ora
DB_NAME=prod
DB_UNIQUE_NAME=tspitr
CONTROL_FILES=/stage_area_tspitr/PROD/controlfile/control01.ctl
REMOTE_LOGIN_PASSWORDFILE=exclusive
COMPATIBLE =11.2.0
DB_BLOCK_SIZE=8192
memory_target=700M
streams_pool_size=100M
### creating stage area to deploy database
mkdir -p /fra/stage_area_tspitr/PROD
cd /fra/stage_area_tspitr/PROD
mkdir controlfile datafile onlinelog
#### RESTORING DATABASE TSPITR
export ORACLE_SID=tspitr
$ rman target /
RMAN> startup nomount
Oracle instance started
Total System Global Area 730714112 bytes
Fixed Size 2225088 bytes
Variable Size 553651264 bytes
Database Buffers 167772160 bytes
Redo Buffers 7065600 bytes
RMAN> restore controlfile from '/fra/PROD/autobackup/2012_12_19/o1_mf_s_802449729_8f3vm2cc_.bkp';
Starting restore at 19-12-2012 15:16:27
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=146 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output file name=/fra/stage_area_tspitr/PROD/controlfile/control01.ctl
Finished restore at 19-12-2012 15:16:31
RMAN> startup mount
database is already started
database mounted
released channel: ORA_DISK_1
### REPORT SCHEMA TO GET DATAFILE NUMBER TO BE RESTORED
RMAN> report schema;
RMAN-06139: WARNING: control file is not current for REPORT SCHEMA
Report of database schema for database with db_unique_name TSPITR
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
1 700 SYSTEM *** +DS8000_DG/prod/datafile/system.349.799325249
2 600 SYSAUX *** +DS8000_DG/prod/datafile/sysaux.348.799325249
3 200 UNDOTBS1 *** +DS8000_DG/prod/datafile/undotbs1.347.799325251
4 5 USERS *** +DS8000_DG/prod/datafile/users.335.799325251
5 100 AUDIT_AUX *** +DS8000_DG/prod/datafile/audit_aux.287.799330083
6 0 SOE *** +DS8000_DG/tspitr/datafile/soe.368.802445265
7 100 XDB *** +DS8000_DG/prod/datafile/xdb.311.801410833
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
1 385 TEMP 32767 +DS8000_DG/prod/tempfile/temp.300.799325437
RMAN>
### GET LOGFILE NAME to RENAME to new location.
$ sqlplus / as sysdba
SQL> select member from v$logfile;
MEMBER
+DS8000_DG/prod/onlinelog/group_1.330.802352807
+DS8000_DG/prod/onlinelog/group_2.331.802352815
+DS8000_DG/prod/onlinelog/group_3.321.802352821
run {
set newname for datafile 1 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U';
set newname for datafile 2 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U';
set newname for datafile 3 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U';
set newname for datafile 7 to '/fra/stage_area_tspitr/PROD/datafile/datafiles_%U';
set newname for datafile 6 to "+DS8000_DG";
restore datafile 1,2,3,7,6 from tag 'TAG20121219T143840' ;
switch datafile 1;
switch datafile 2;
switch datafile 3;
switch datafile 7;
switch datafile 6;
switch tempfile all;
set until time "to_date('19-12-2012 14:42:00','dd-mm-yyyy hh24:mi:ss')";
recover database SKIP TABLESPACE "USERS", "AUDIT_AUX" delete archivelog;
## Renaming ONLINELOG
sql "alter database rename file ''+DS8000_DG/prod/onlinelog/group_1.330.802352807'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group1.rdo''";
sql "alter database rename file ''+DS8000_DG/prod/onlinelog/group_2.331.802352815'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group2.rdo''";
sql "alter database rename file ''+DS8000_DG/prod/onlinelog/group_3.321.802352821'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group3.rdo''";
alter database open resetlogs;
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 19-12-2012 15:32:13
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSTEM_FNO-1
channel ORA_DISK_1: restoring datafile 00002 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSAUX_FNO-2
channel ORA_DISK_1: restoring datafile 00003 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-UNDOTBS1_FNO-3
channel ORA_DISK_1: restoring datafile 00007 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-XDB_FNO-7
channel ORA_DISK_1: restoring datafile 00006 to +DS8000_DG
channel ORA_DISK_1: reading from backup piece /fra/PROD/backupset/2012_12_19/o1_mf_nnndf_TAG20121219T143840_8f3vdn3q_.bkp
channel ORA_DISK_1: piece handle=/fra/PROD/backupset/2012_12_19/o1_mf_nnndf_TAG20121219T143840_8f3vdn3q_.bkp tag=TAG20121219T143840
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:12:35
Finished restore at 19-12-2012 15:44:48
datafile 1 switched to datafile copy
input datafile copy RECID=6 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSTEM_FNO-1
datafile 2 switched to datafile copy
input datafile copy RECID=8 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSAUX_FNO-2
datafile 3 switched to datafile copy
input datafile copy RECID=10 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-UNDOTBS1_FNO-3
datafile 7 switched to datafile copy
input datafile copy RECID=12 STAMP=802453489 file name=/fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-XDB_FNO-7
datafile 6 switched to datafile copy
input datafile copy RECID=14 STAMP=802453489 file name=+DS8000_DG/tspitr/datafile/soe.304.802452733
renamed tempfile 1 to /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-TEMP_FNO-1 in control file
executing command: SET until clause
Starting recover at 19-12-2012 15:44:49
using channel ORA_DISK_1
Executing: alter database datafile 4 offline
Executing: alter database datafile 5 offline
starting media recovery
archived log for thread 1 with sequence 8 is already on disk as file +DS8000_DG/prod/onlinelog/group_2.331.802352815
archived log file name=+DS8000_DG/prod/onlinelog/group_2.331.802352815 thread=1 sequence=8
media recovery complete, elapsed time: 00:00:02
Finished recover at 19-12-2012 15:44:55
sql statement: alter database rename file ''+DS8000_DG/prod/onlinelog/group_1.330.802352807'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group1.rdo''
sql statement: alter database rename file ''+DS8000_DG/prod/onlinelog/group_2.331.802352815'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group2.rdo''
sql statement: alter database rename file ''+DS8000_DG/prod/onlinelog/group_3.321.802352821'' to ''/fra/stage_area_tspitr/PROD/onlinelog/group3.rdo''
database opened
## Exporting Tablespace Metadata
RMAN >
run {
sql 'alter tablespace SOE read only';
# create directory for datapump export
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr''";
# grant on directory to SYSTEM
sql "grant read,write on directory TSPITR_DIROBJ_DPDIR to system";
# exporting metadata
host "expdp system/oracle@localhost:1521/tspitr DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_FULL_CHECK=Y TRANSPORT_TABLESPACES=SOE";
using target database control file instead of recovery catalog
sql statement: alter tablespace SOE read only
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr''
sql statement: grant read,write on directory TSPITR_DIROBJ_DPDIR to system
Export: Release 11.2.0.3.0 - Production on Wed Dec 19 15:53:02 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, Oracle Label Security, OLAP,
Data Mining, Oracle Database Vault and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01": system/********@localhost:1521/tspitr DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_FULL_CHECK=Y TRANSPORT_TABLESPACES=SOE
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
Processing object type TRANSPORTABLE_EXPORT/INDEX/FUNCTIONAL_INDEX/INDEX
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Master table "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Dump file set for SYSTEM.SYS_EXPORT_TRANSPORTABLE_01 is:
/fra/stage_area_tspitr/exp_transport_soe.dmp
Datafiles required for transportable tablespace SOE:
+DS8000_DG/tspitr/datafile/soe.304.802452733
Job "SYSTEM"."SYS_EXPORT_TRANSPORTABLE_01" successfully completed at 15:54:28
host command complete
## Stop Database and destroy it to make sure that Datafile 6 will not be used by this database;
RMAN>
run {
shutdown immediate;
## removing controlfile and SYSTEM Tablespace to make sure that database will not be opened
host "rm -f /fra/stage_area_tspitr/PROD/controlfile/control01.ctl /fra/stage_area_tspitr/PROD/datafile/datafiles_data_D-PROD_TS-SYSTEM_FNO-1";
database closed
database dismounted
Oracle instance shut down
host command complete
## TARGET Database
## Plugging Tablespace on TARGET database.
$ export ORACLE_SID=prod
$ rman target /
run {
# create directory for datapump import
sql "create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr''";
# grant on directory to SYSTEM
sql "grant read,write on directory TSPITR_DIROBJ_DPDIR to system";
host "impdp system/oracle@localhost:1521/prod DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_DATAFILES=''+DS8000_DG/tspitr/datafile/soe.304.802452733''";
sql "alter tablespace soe read write";
sql statement: create or replace directory TSPITR_DIROBJ_DPDIR as ''/fra/stage_area_tspitr''
sql statement: grant read,write on directory TSPITR_DIROBJ_DPDIR to system
Import: Release 11.2.0.3.0 - Production on Wed Dec 19 16:09:30 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, Oracle Label Security, OLAP,
Data Mining, Oracle Database Vault and Real Application Testing options
Master table "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01": system/********@localhost:1521/prod DIRECTORY=TSPITR_DIROBJ_DPDIR DUMPFILE=exp_transport_soe.dmp TRANSPORT_DATAFILES=+DS8000_DG/tspitr/datafile/soe.304.802452733
Processing object type TRANSPORTABLE_EXPORT/PLUGTS_BLK
Processing object type TRANSPORTABLE_EXPORT/TABLE
Processing object type TRANSPORTABLE_EXPORT/INDEX/INDEX
Processing object type TRANSPORTABLE_EXPORT/INDEX/FUNCTIONAL_INDEX/INDEX
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/INDEX_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/CONSTRAINT/REF_CONSTRAINT
Processing object type TRANSPORTABLE_EXPORT/TABLE_STATISTICS
Processing object type TRANSPORTABLE_EXPORT/POST_INSTANCE/PLUGTS_BLK
Job "SYSTEM"."SYS_IMPORT_TRANSPORTABLE_01" successfully completed at 16:10:03
host command complete
sql statement: alter tablespace soe read write
### Recompiling Invalid Objects and Checking objects from tablespace SOE
$ sqlplus / as sysdba
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql
TIMESTAMP
COMP_TIMESTAMP UTLRP_BGN 2012-12-19 16:10:34
OBJECTS WITH ERRORS
0
ERRORS DURING RECOMPILATION
0
Function created.
PL/SQL procedure successfully completed.
Function dropped.
PL/SQL procedure successfully completed.
SQL> select count(1) SEG_COUNT from dba_segments where tablespace_name='SOE';
SEG_COUNT
32
SQL> SELECT COUNT(1) OBJ_INVALID FROM DBA_OBJECTS WHERE STATUS != 'VALID';
OBJ_INVALID
0
## PERFORM A FULL BACKUP AFTER RESTORE TABLESPACE.Regards,
Levi Pereira -
Snapshot too old error during drop tablespace
Hi Experts
When we are doing BW reorg and steps followed are
1. created a newtablespace with source tablespace TABART class reference.
2. Export the source tablespace to the filesystem level.
3. DROP the source tablespace now.
4. Rename the new tablespace to source tablespace name.
5. Import
Here in the third step i have received snapshot too old error.
BR0301E SQL error -604 at location BrSqlExecute-1, SQL statement:
'/* BRSPACE */ drop tablespace PSAPADSOLD including contents and datafiles cascade constraints'
ORA-00604: error occurred at recursive SQL level 1
ORA-01555: snapshot too old: rollback segment number 0 with name "SYSTEM" too small
BR1017E Execution of SQL statement 'drop tablespace PSAPADSOLD including contents and datafiles cascade constraints' failed
so i tried to rename the tablespace and set to offline and tried to import only 240 tables were imported compared to 24057 tables.Still the PSAPADS - Source tablespace shows 65000 elements.
my queries:
1. After Export of the tablespace how come the Source tablespace retain the tables.
2. why i could not able to drop the tablespace
I had increased the UNDO_RETENTION to 86400 my oracle version is 10.2.04.
Source table space PSAPADS is 80 GB and has only 30 GB data and the remaining are free.
PSAPUNDO was 17GB in size.
Kinldy suggest
Regards
BalaHi Stefa
Thanks for your reply.
how to find the System undo is still active.How to track which Undo which is active and their steps.
As per the metalink note our PSAPUNDO is Locally Managed Tablepsace hence the second workaround is applicable..
How to validate this will not give a problem again while i am doing reorganization.
When i checked a sap note 1039060 this note is applicable to windows i dont how it can be impleneted.
Whether any merge fix will help on this
Regards
Bala -
Error while dropping tablespace
Hi all
I am getting follwogin error while dropping tablespace.is it memory prob?
ERROR at line 1:
ORA-04031: unable to allocate 4180 bytes of shared memory ("shared
pool","unknown object","sga heap(1,0)","state objects")
Thanks.Your Sga seems too small, you should increase it
-
I cannot drop the tablespace create earlier today by me. The tablespace have 2 files and they are empty. Here is the case.
Thansk a lot,mj
SQL> select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
SYSTEM
UNDOTBS1
SYSAUX
TEMP
ADDR_IX2
CFG_DATA
CFG_IX
TS_ATTR_IX
TS_Nums_DT
TS_NAME_DT
TS_INSERT_ONLY_DT
11 rows selected.
Elapsed: 00:00:00.01
SQL> drop tablespace TS_Nums_DT INCLUDING CONTENTS and datafiles;
drop tablespace TS_Nums_DT INCLUDING CONTENTS and datafiles
ERROR at line 1:
ORA-00959: tablespace 'TS_NUMS_DT' does not existAs Aron says, there may be other, non-printing, characters in the name. You can check this by running:
SELECT DUMP(tablespace_name)
FROM dba_tablespaces
WHERE tablespace_name like 'TS\_N%' ESCAPE '\'Which will give you the ascii values of the characters in the tablespace name like this:
SQL> SELECT DUMP(tablespace_name)
2 FROM dba_tablespaces
3 WHERE tablespace_name = 'ONECALL';
DUMP(TABLESPACE_NAME)
Typ=1 Len=7: 79,78,69,67,65,76,76
O N E C A L LHTH
John -
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.
Maybe you are looking for
-
Hi Experts, I have two questions related to POWL, please help me: 1. Where can I set the columns as hierarchy colunms that use can choose them for hierarchy display? And how can I set the default hierarchy colunms? 2. It seems the system cannot remem
-
Hello! I need to configurate REPORTS_PATH in AS. I had add this key in env file, but it doesn't work. What i need to do? Thanks!
-
We run a gwcheck post office and library maintenance / fix process once a week. we see a large number of the following error message for a single user, different file name for each instance Error 50- Orphaned Blob file: 46ADBF20.000 I suspect the 'do
-
Deletion of request from init option for source system
Hello Experts, Iam using 3 IP. IP for init load with data transder, IP for init load without data transfer & Delta. now with data transfer IP is not used. i trigered "without data transfer IP", then accidentally "triggered with data transfer IP". the
-
Hello! I have a strange situation: I use smsj api (http://smsj.sourceforge.net/ - with some changes) to send binary sms to a midlet using UCP/EMI. When i send a binary message the message is not dispalyed(is not received) on Nokia phones (i tested on