Sie sind auf Seite 1von 14

Tbalespace related error

ORA-01688 : unable to extend table table_name partition partition_name by 8192 i


n tablespace.
I am trying to find the path of datafile in order to add new one in linux system
,i run this query(select file_name from dba_data_files where tablespace_name = '
tablespace_name')
and it shows under this path(+DATA/etl_data/etl_data_dbf), so i am trying to get
this path in order to add new datafile,and i couldn't find this path in linux s
ystem.
That's no surprise,because '+DATA....' indicates an ASM diskgroup. See the the A
SM documentation how to deal with ASM:
http://download.oracle.com/docs/cd/E11882_01/server.112/e16102/toc.htm
In general the 'ALTER ...' commands remain the same , only the filename specific
ation is different.
==============
I am getting an ORA-01653 error. What is the fix fir the ORA-01653 error?
ORA-01653: unable to extend table string. string by string in tablespace string
Answer: The ORA-01653 error is caused because you need to add space to a tables
pace.

The Oracle docs note this on the ora-01653 error:


ORA-01653: unable to extend table string. string by string in tablespace string
Cause: Failed to allocate an extent of the required number of blocks for a table
segment in the tablespace indicated.
Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more files to
the tablespace indicated.
Oracle offer great resources on resolving ORA-01653, namely the nature of the p
roblem as it relates to space availability:
Explanation:
-----------This error does not necessarily indicate whether or not you have enough spac
e
in the tablespace, it merely indicates that Oracle could not find a large en
ough area of free
contiguous space in which to fit the next extent.
Diagnostic Steps:
----------------1. In order to see the free space available for a particular tablespace, you
must

use the view DBA_FREE_SPACE. Within this view, each record represents one
fragment of space. How the view DBA_FREE_SPACE can be used to determine
the space available in the database is described in Note 121259.1 Using DBA_
FREE_SPACE
Furthermore, we see these choices in resolving ORA-01653 (as quoted below):
Manually COALESCE Adjacent Free Extents
Add a DATAFILE
Resize DATAFILE
Enable AUTOEXTEND
Defragment tablespace
View temporary segments for space
==============================================================
What is the cause of the ORA-01652 error? ORA-01652: unable to extend temp segm
ent by string in tablespace string
Answer: The Oracle oerr utility note this about the ORA-01652 error:
ORA-01652: unable to extend temp segment by string in tablespace string
Cause: Failed to allocate an extent of the required number of blocks for
a temporary segment in the tablespace indicated.
Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more f
iles to the tablespace indicated.
First, see these important notes for fixing the ORA-1652 unable to extend error.
If you have purchased the packs to use the AWR, see dba_hist_undostat tips , whi
ch can help unveil how Oracle attempted to used all available undo before aborti
ng with the ORA-01652 error.
This sill add space t the TEMP tablespace:
alter tablespace
temp
add tempfile
'e:\oracle\app\oradata\zoom\temp02.dbf' size 1g
autoextend on;
You can check for held TEMP segments with this query:
select
srt.tablespace,
srt.segfile#,
srt.segblk#,
srt.blocks,
a.sid,
a.serial#,
a.username,
a.osuser,
a.status
from
see code depot for full scripts
v$session
a,

v$sort_usage srt
where
a.saddr = srt.session_addr
order by
srt.tablespace, srt.segfile#, srt.segblk#,
srt.blocks;
MOSC has a very detailed and informative article concerning ORA-01652 and RAC.
There is some troubleshooting required with ORA-01652 in RAC because there are t
wo common causes in this area.
First ORA-01652 may occur because there is simply no space available in the temp
tablespace of which is being used. The second cause of ORA-01652 may have to d
o with the local temp segment not being able to extent space even though there i
s space in other instances.
To trouble shoot for ORA-01652, and find out which of the above scenarios are c
ausing ORA-01652 use this query offered by MOSC:
select
sum(free_blocks)
from
gv$sort_segment
where
tablespace_name = '<TEMP TABLESPACE NAME>'
You will know that the first scenario is causing ORA-01652 to be thrown if the f
ree block reads '0' because it signifies that there is no free space.
If there is a good amount of space, you know that there is another cause for ORA
-01652, and it is probably the second scenario. It is important to note that in
a non-RAC environment, local instances are not able to extend the temp segments
, so in the RAC environment, ORA-01652 has to be handled differently. If you ar
e experiencing ORA-01652 in a non-RA environment, be aware that every SQL making
use of the tablespace can fail.
In RAC, more sort segment space can be used from other instances, which can help
resolve ORA-01652 more easily. Try using the query below:
select
inst_id,
tablespace_name,
total_blocks,
used_blocks,
free_blocks
from
gv$sort_segment;
Basically, you can then find out how much temp segment space can be used for eac
h instance by viewing the total_blocks, and the used_blocks can reveal the space
which has been used so far, and the free_blocks gives the amount of space alloc
ated to this particular instance.
This being, to resolve ORA-01652, you can c
heck out that used_blocks = total_blocks and free_blocks = 0 will probably show
for the instance, and ORA-01652 will be shown multiple times within the alert lo
g.
This basically means that free space from other instances is being requested, an
d typically signifies that there is instance contention. Instance contention wi
thin the temporary space can make the instance take more time to process.

In sever cases, a slowdown may occur, in which you might want try one of the fol
lowing work-arounds:
Increase size of the temp tablespace
Increase sort_area_size and/or pga_aggregate_target
However, remember to not use the RAC feature of DEFAULT temp space.
If ORA-01652 is causing the slowdown, SMON will probably not be able to process
the sort segment requests, you should try to diagnose the contention:
Output from the following query periodically during the problem:
select inst_id, tablespace_name, total_blocks, used_blocks, free_blocks
from gv$sort_segment;
Global hanganalyze and systemstate dumps
=================================================================
ORA-01950: no privileges on tablespace 'SYSTEM'

: What error is it?

Earlier I created a user :


SQL>create user suhail identified by password
SQL>User created.
SQL>Grant create session,create table to suhail;
SQL>Grant Succeeded.
but when I login as suhail and try to create a table I get an error saying ORA-0
1950: no privileges on tablespace 'SYSTEM' . What error is it ? Why does it occu
r ?
SQL> connect suhail
Enter password:
Connected.
SQL> create table suhail_table(name char(10));
create table suhail_table(name char(10))
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'SYSTEM'
I am using Oracle Database 11g Express Edition Release 11.2.0.2.0

This error says that the user doesn't have quota on tablespace SYSTEM which is s
et as the default persistent tablespace. You can assign a user the quota like th
is:
sql> alter user scott quota 50m on system;
Here, 50m means that the user quota on the SYSTEM tablespace is 50 mebibytes. Yo
u can also set the quota to unlimited.
However it is a bad practice to store user and application data in SYSTEM tables
pace as it causes data fragmentation and thus degrades performance. So I would r
ecommend you to create a new permanent tablespace:

sql> create smallfile tablespace users datafile '/u01/app/oracle/oradata/ORCL/us


ers.dbf' size 10g;
And then set it as the default database permanent tablespace so that objects cre
ated by the users go into that default tablespace:
sql> alter database default tablespace users;
============================================================
ORA-00959 tablespace test does not exist
user454189 Newbie
user454189 Mar 28, 2006 10:52 PM
hi all,
here i hav a question to you,actaually i try to drop the tablespace 'test' befor
e dropping i tried to take the tablespace offline. i gave
sql>alter tablespace test offline;
but it returns
error:ORA-00959 tablespace test does not exist
now i queried "select * from v$tablespace" to check is that tablespace exist or
not. there it shows the tablespace exists.
actually there are no users alloted to this tablespace.so i try to create sepera
te user and try to allot this tablespace for that user but i cud't, again it sho
ws same error.
i hav also tested by quering
SELECT tablespace_name FROM dba_tablespaces WHERE lower(tablespace_name) = 'test
';
-----------------------------------------------------------------------------------------------TABLESPACE_NAME
test
select file_name from dba_data_files where lower(tablespace_name)='test';
-------------------------------------------------------------------------------------------------------------FILE_NAME
D:\ORACLE\ORADATA\KESD\TEST.ORA
i dont know watz the wrong i did? can any one help me to solve this issue.
11309 Views
Tags:
Average User Rating: No ratings (0 ratings)
Average User Rating
No ratings
(0 ratings)
1. Re: ORA-00959 tablespace test does not exist
352719 Newbie
352719 Mar 29, 2006 12:21 AM (in response to user454189)
Because you need to drop the tablespace just used the following command:
drop tablespace test including contents and datafiles;

Michael
Like Show 0 Likes (0)
Actions
2. Re: ORA-00959 tablespace test does not exist
user454189 Newbie
user454189 Mar 29, 2006 12:30 AM (in response to 352719)
hi,
i hav also used this command but still its not dropped returning same error
Like Show 0 Likes (0)
Actions
3. Re: ORA-00959 tablespace test does not exist
Nicolas.Gasparotto Oracle ACE
Nicolas.Gasparotto Mar 29, 2006 1:17 AM (in response to user454189)
Hi,
select file_name from dba_data_files where lower(tablespace_name)='t
est';
Maybe your tablespace name was create explicitly in lower case. In this case
, you need to use " when you invoke this tablespace :
SQL> create tablespace "test" datafile '/data/ora/H89UCBAC/u01/test.dbf' siz
e 10M;

Tablespace created.

SQL> select file_name from dba_data_files where lower(tablespace_name)='test


';

FILE_NAME
------------------------------------------------------------------------------/data/ora/H89UCBAC/u01/test.dbf

SQL> alter tablespace test offline;


alter tablespace test offline
*
ERROR at line 1:
ORA-00959: tablespace 'TEST' does not exist

SQL> c/test/TEST

1* alter tablespace TEST offline


SQL> /
alter tablespace TEST offline
*
ERROR at line 1:
ORA-00959: tablespace 'TEST' does not exist

SQL> c/TEST/"test"
1* alter tablespace "test" offline
SQL> /

Tablespace altered.

SQL> drop tablespace "test" including contents and datafiles;

Tablespace dropped.

SQL>
Nicolas.
Like Show 0 Likes (0)
Actions
4. Re: ORA-00959 tablespace test does not exist
454585 Newbie
454585 Mar 29, 2006 1:16 AM (in response to user454189)
Dear user454189
The complete answer to your problem is described in the thread "ORA-00959 ta
blespace test does not exist" you [user454189] initiated on 26-Mar-2006 22:54.
I do not think there is a need to create duplicate discussion thread but OK.
Given the fact, that you created the tablespace as "test" (i.e. in lowercase le
tters, as shown by the query result) you always have to reference the tablespace
name explicitly as "test" (i.e. with double-quotes). I believe that is "watz wr
ong".
If you created the tablespace in lower/mixed case ("Test", "test", "TeST") u
sing double-quotes then you can expect troubles. You have to reference such a ta
blespace explicitely in the same way. Best practice - never create any objects i
n lower/mixed case by using double-quotes.

hi,
i was facing the same problem of tablespace doesn't exist. you might have more t
han one databases and they have different database names. when you will connect
as sys as sysdba, you have to include the database name (@dbname). this would mi
ght be helpful for you.
================================================================================
==================

ORA-00959: tablespace NSN_2 does not exist... But tablespace is defined in user
script for temp
This question has been Answered.
tennek Newbie
tennek Jun 25, 2014 6:39 AM
WHEN I RUN IMPDP I GET AN ERROR ABOUT "TABLESPACE DOES NOT EXIST"
THIS TABLESPACE IS ACTUALLY NO LONGER PRESENT ON THE SYSTEM BUT IT IS DEFINED IN
THE USER1 SCRIPT
IS THERE ANYWAY I CAN ASK IT NO TO LOOK FOR THAT TEMP TABLESPACE

or

is there anyway i can remove the definition of NSN_2 from the user (USER1)

OR

should i just recreate the NSN_2 tablescape

HELP NEEDED PLS...

DROP USER USER1 CASCADE;

CREATE USER USER1

IDENTIFIED BY <password>
DEFAULT TABLESPACE NSN_1
TEMPORARY TABLESPACE TEMP
-- 2 Tablespace Quotas for USER1
ALTER USER USER1 QUOTA UNLIMITED ON NSN_1;
ALTER USER USER1 QUOTA UNLIMITED ON NSN_2;

----item in contention

impdp user1/password directory=dump_dir dumpfile=user2.dmp logfile=LOG.log remap


_schema=USER2:USER1 remap_tablespace=NSN_4:NSN_1

Master table "USER1"."SYS_IMPORT_FULL_01" successfully loaded/unloaded


Starting "USER1"."SYS_IMPORT_FULL_01": USER1/******** directory=dump_dir dumpfi
le=setup_02102012.dmp logfile=tries.log remap_schema=setup:USER1 remap_tablespac
e=NSN_4:NSN_1
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object type USER:"USER1" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
ORA-39083: Object type TABLESPACE_QUOTA failed to create with error:
ORA-00959: tablespace 'NSN_2' does not exist
Failing sql is:
DECLARE TEMP_COUNT NUMBER; SQLSTR VARCHAR2(200); BEGIN SQLSTR := 'ALTER US
ER "USER1" QUOTA UNLIMITED ON "NSN_2"'; EXECUTE IMMEDIATE SQLSTR;EXCEPTION WH
EN OTHERS THEN
IF SQLCODE = -30041 THEN
SQLSTR := 'SELECT COUNT(*) FROM
USER_TABLESPACES
WHERE TABLESPACE_NAME = ''NSN_2'' AND CONTENTS =
''TEMPORARY''';
EXECUTE IMMEDIATE SQLSTR INTO TEMP_CO
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE/TABLE

ORA-39083: Object type TABLE:"USER1"."AVAIL_BY_OPTION_REF" failed to create with


error:
ORA-00959: tablespace 'NSN_2' does not exist
smit_sign-Oracle
Correct Answer by smit_sign-Oracle on Jun 25, 2014 10:21 PM
impdp transform=segment_attributes

Smit
See the answer in context
450 Views
Tags: error
Content tagged
, impdp
Content tagged
, ora-00959
Content tagged
, ora-39083
Content tagged

with error
with impdp
with ora-00959
with ora-39083

1. Re: ORA-00959: tablespace NSN_2 does not exist... But tablespace is defin
ed in user script for temp
carajandb Oracle ACE
carajandb Jun 25, 2014 6:54 AM (in response to tennek)
the parameter remap_tablespace should help!
REMAP_TABLESPACE=source_tablespace:target_tablespace (see Oracle DatabaseUtil
ities11g Release 2 (11.2) page 3-35)
Like Show 0 Likes (0)
Actions
Correct Answer 2. Re: ORA-00959: tablespace NSN_2 does not exist... But tabl
espace is defined in user script for temp
smit_sign-Oracle Explorer
smit_sign-Oracle Jun 25, 2014 10:21 PM (in response to tennek)
impdp transform=segment_attributes

Smit
================================================================================
=========================================

ora 01129
This question has been Answered.
672625 Newbie
672625 Mar 4, 2009 1:56 PM
Hola, I have this problem
The tables can be created correctly, but When I try to create a index, I get the
error:

ORA-01129 user's default or temporary tablespace does not exist


When using the statement
SELECT tablespace_name from dba_tablespaces;
can see the 'USERS' tablespace
TABLESPACE_NAME
--------------------SYSTEM
UNDOTBS1
SYSAUX
TEMP
USERS
EXAMPLE
TESTSPACE
TESTTEMPORAL
At the first time I used the USERS tablespace, then I created new tablespaces, a
nd the problem is the same. The tablespace was create in the Enterprise manager
console.
And another important thing, it work fine the last week......I did not make chan
ges in the database.
Thanks
OrionNet
Correct Answer by OrionNet on Mar 5, 2009 3:12 PM
Hello,
h5. Here is your problem, we have table_name in place of schema name after creat
e unique index and that's why you were getting default temp tablespace error.
Hope this helps
CREATE UNIQUE INDEX test1.xpkstest1
ON test1.t_cliente (numero_bp ASC);

Correct Answer 14. Re: ora 01129


OrionNet Guru
OrionNet Mar 5, 2009 3:12 PM (in response to 672625)
Hello,
h5. Here is your problem, we have table_name in place of schema name after c
reate unique index and that's why you were getting default temp tablespace error
.
Hope this helps
CREATE UNIQUE INDEX test1.xpkstest1
ON test1.t_cliente (numero_bp ASC);
Regards
Edited by: OrionNet on Mar 5, 2009 4:12 PM
Like Show 0 Likes (0)

===============================================================

1. Re: HOw to rename a datafile with special character


VenkatB Guru
VenkatB Sep 6, 2011 11:47 AM (in response to shashi)
What version is your database? It's very important that you mention the version
and OS when you post specific database related questions.
Obviously it's a UNIX OS and you didn't set the BACKSPACE.
So someone when creating the datafile, made a typo in SQLPLUS and then just used
BACKSPACE key to correct it and created the file with that special characters.
Whoever created it wanted to create def_arc_05.dbf but made a typo 2 instead of
5 and hit the backspace to correct it.
I am not sure what your version is.
In 10g and 11g, you can do ALTER TABLESPACE RENAME DATAFILE.
1) Alter tablespace EXAMPLE offline normal;
2) At OS Level, move the current file to a proper file
3) Alter tablespace EXAMPLE rename datafile 'def_arc_02.dbf^?^?^?^?^?5.dbf' to '
def_arc_05.dbf';
4) Alter tablespace EXAMPLE online;
Test
SQL> SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME = 'USERS'
;
FILE_NAME
BYTES
----------------------------------------------------------------- ---------C:\ORACLE\ORADATA\ORCL\USERS01.DBF
1436549120
C:\ORACLE\ORADATA\ORCL\USERS021.DBF
134217728
C:\ORACLE\ORADATA\ORCL\USERS022.DBF
1499463680
3 rows selected.
SQL> alter tablespace users offline normal;
Tablespace altered.
SQL> host move C:\ORACLE\ORADATA\ORCL\USERS022.DBF C:\ORACLE\ORADATA\ORCL\USERS0
24.dbf
SQL> alter tablespace users rename datafile 'C:\ORACLE\ORADATA\ORCL\USERS022.DBF
' to 'C:\ORACLE\ORADATA\ORCL\USERS024.dbf';
Tablespace altered.
SQL> alter tablespace users online;
Tablespace altered.
SQL> SELECT FILE_NAME, BYTES FROM DBA_DATA_FILES WHERE TABLESPACE_NAME = 'USERS'

;
FILE_NAME
BYTES
----------------------------------------------------------------- ---------C:\ORACLE\ORADATA\ORCL\USERS01.DBF
1436549120
C:\ORACLE\ORADATA\ORCL\USERS021.DBF
134217728
C:\ORACLE\ORADATA\ORCL\USERS024.DBF
1499463680
Another similar example in UNIX on 10.2.0.4 with SPECIAL CHARACTERS in file name
s
SQL> create tablespace test_restore datafile '/u01/dbfiles/ORCL/test_restore_01^
H^H^H^H.dbf' size 50m; ---deliberately put in special characters
Tablespace created.
SQL> select file_name, file_id from dba_data_files where tablespace_name='TEST_R
ESTORE';
FILE_NAME
F
ILE_ID
--------------------------------------------------------------------------- --------/u01/dbfiles/ORCL/test_restor.dbf
10
At OS LEVEL
SQL> !ls -ltr /u01/dbfiles/ORCL (hiding all other datafiles...a big list)
total 10450764
-rw-r----- 1 oracle oinstall 52436992 Sep 6 17:32 test_restore_01????.dbf
Now let's change it
SQL> alter tablespace test_restore offline normal;
Tablespace altered.
SQL> !mv /u01/dbfiles/ORCL/test_restore_01????.dbf /u01/dbfiles/ORCL/test_restor
e_01.dbf
SQL> !ls -ltr /u01/dbfiles/ORCL (hiding all other datafiles...a big list)
total 10450764
-rw-r----- 1 oracle oinstall 52436992 Sep 6 17:32 test_restore_01.dbf
SQL> alter tablespace test_restore rename datafile '/u01/dbfiles/ORCL/test_resto
r.dbf' to '/u01/dbfiles/ORCL/test_restore_01.dbf';
alter tablespace test_restore rename datafile '/u01/dbfiles/ORCL/test_restor.dbf
' to '/u01/dbfiles/ORCL/test_restore_01.dbf'
*
ERROR at line 1:
ORA-01525: error in renaming data files
ORA-01522: file '/u01/dbfiles/ORCL/test_restor.dbf' to be renamed does not exist
It's not recognizing it. So I'll do it using dynamic statement
SQL>
2
3
4
(39)

Begin
For i in (select file_name from dba_data_files where file_id = 10)
Loop
Execute Immediate 'Alter tablespace test_restore rename datafile ' || chr
|| i.file_name || chr(39) || ' to ' || chr(39) || '/u01/dbfiles/ORCL/test_r

estore_01.dbf' || chr(39) ;
5 End Loop;
6 End;
7 /
PL/SQL procedure successfully completed.
SQL> alter tablespace test_restore online;
Tablespace altered.
SQL> select file_name, file_id from dba_data_files where tablespace_name='TEST_R
ESTORE';
FILE_NAME
F
ILE_ID
--------------------------------------------------------------------------- --------/u01/dbfiles/ORCL/test_restore_01.dbf
10
Edit : Please perform a backup of database after this structual change. This is
very important
================================================================================
=================================

Das könnte Ihnen auch gefallen