Alter tablespace uniform size
I'm having difficulty with the syntax to change the uniform size of an existing tablespace. I haven't found much on it. Any help would be appreciated.
Thank you
copy pasted from below site......
TSharma
Handle: TSharma
Status Level: Pro (755)
Registered: Feb 9, 2010
Total Posts: 460
http://www.dba-oracle.com/t_tablespace_extent_management_local_uniform_autoallocate.htm
he changed Hence, you to one....did you read the OP post ....did he mentioned alter tablespace uniform to autoallocate?......just copy paste from other sites....is it right way editing some others words...without reading OP post......
thanks,
DBC,
Sr DBA,
OCE.
Edited by: dbc001 on Mar 19, 2013 9:14 AM
Similar Messages
-
Default Storage versus Uniform size at creating Tablespace
anybody can explain if those two concepts mean same? in my practice, i need to dump all data from 9i to 10g database, in 9i a tablespace created by :
CREATE TABLESPACE DATA_TS
DATAFILE '/opt/oracle/u01/data_04.dbf' SIZE 11M AUTOEXTEND ON NEXT 1024K MAXSIZE UNLIMITED
EXTENT MANAGEMENT DICTIONARY
LOGGING
DEFAULT STORAGE(INITIAL 112K
NEXT 112K
MINEXTENTS 1
MAXEXTENTS 1017
PCTINCREASE 0)
ONLINE
PERMANENT
SEGMENT SPACE MANAGEMENT MANUAL
so in 10g I created tblsp like:
CREATE TABLESPACE DATA_TS
DATAFILE '/opt/oracle/u10/data_04.dbf' SIZE 11M AUTOEXTEND ON NEXT 1024K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 112K
LOGGING
ONLINE
SEGMENT SPACE MANAGEMENT MANUAL
are they same?Hi,
Two concepts are not same.
Check this link:
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/tspaces.htm
Starting with Oracle9i, the default for extent management when creating a tablespace is locally managed. However, you can explicitly specify that you want to create a dictionary-managed tablespace. For dictionary-managed tablespaces, Oracle updates the appropriate tables in the data dictionary whenever an extent is allocated, or freed for reuse. -
Alter tablespace command problem (sql statement))
Hello,
I have a table space named t_space2.
I wanna add a datafile for this tablespace so I wrote on sql the following:
Alter tablespace t_space2
add datafile 'D:\DATA\cust.dat'
size 30 M;
it gives me the following message:
table space t_space2 doesn't exist!!!
the tablespace exsits on dba_tablespaces.
Thank u in advance
nullHi,
the reason may be that one:
You created the tablespace with a command like that:
CREATE TABLESPACE "goofy"
DATAFILE 'E:\ORADB8I\ORADATA\WARPING\GOOFY_01.dbf' SIZE 5M REUSE
DEFAULT STORAGE ( INITIAL 80K NEXT 80K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 1 )Using the quotes, You've indicated to the DB to use the name exaclty as written, so in lower cases.
Because of that, every time You need to refere to the tablespace, but the same is for tables or column names, Youve to use the name "goofy" intead of goofy or GOOFY.
This is used to permit to the user, if it is necessary to the application, to use a field name that may be:
"Total Amount Field"
I believe that this is the rela reason.
Bye Max
null -
Alter tablespace add datafile taking too much time
Hi All,
DB Version :10.2.0.1
OS Version: Windows Server 2003 32 Bit
When i am trying to add datafile into tablespace it takes lot of time approx 8 hours.but earlier it take approx 40 to 60 mins
When i check Alert log file i got the message:
ORA-604 signalled during: alter tablespace crbt add datafile
I check there is sufficent space in Disk as i need to add Datafile of 30G.
Syntax i am using is
ALTER TABLESPACE TEST
ADD DATAFILE 'C:\TEST02.DBF' SIZE 30G
Can anyone tell me exactly the reason for the same
Thanks in advanceHi Aman,
The space is added sometime but most of the time i am getting this error
SQL> ALTER TABLESPACE IN_OCT2011
2 ADD DATAFILE 'E:\CAT\IN_OCT04.DBF' SIZE 30G REUSE;
ALTER TABLESPACE IN_OCT2011
ERROR at line 1:
ORA-19502: write error on file "E:\CAT\IN_OCT04.DBF", blockno 11008
(blocksize=8192)
ORA-27072: File I/O error
OSD-04008: WriteFile() failure, unable to write to file
O/S-Error: (OS 33) The process cannot access the file because another process
has locked a portion of the file.
Kindly help over the same
Edited by: Vikas Kohli on Nov 5, 2011 8:38 PM -
Execution of SQL statement 'alter tablespace PSAPSR3
Dear mastah,
I trying extend tablesapce at oracle, but not succesfully, and have problem,
maybe can help this issue..
error problem add tablespace:
BR0280I BRSPACE time stamp: 2014-01-06 10.27.31
BR0370I Directory /oracle/SID/sapreorg/semxnacf created
BR0280I BRSPACE time stamp: 2014-01-06 10.27.32
BR0319I Control file copy created: /oracle/SID/sapreorg/semxnacf/cntrlSID.old 99106816
BR0280I BRSPACE time stamp: 2014-01-06 10.27.32
BR1088I Extending tablespace PSAPSR3...
BR0280I BRSPACE time stamp: 2014-01-06 10.27.51
BR0301E SQL error -59 at location BrSqlExecute-1, SQL statement:
'/* BRSPACE */ alter tablespace PSAPSR3 add datafile '/oracle/SID/sapdata16/sr3_218/sr3.data218' size 4000M autoextend off'
ORA-00059: maximum number of DB_FILES exceeded
BR1017E Execution of SQL statement 'alter tablespace PSAPSR3 add datafile '/oracle/SID/sapdata16/sr3_218/sr3.data218' size 4000M autoextend off' failed
BR0669I Cannot continue due to previous warnings or errors - you can go back to repeat the last action
BR0280I BRSPACE time stamp: 2014-01-06 10.27.51
BR0671I Enter 'b[ack]' to go back, 's[top]' to abort:
regards,
aminBR1088I Extending tablespace PSAPSR3...
BR0280I BRSPACE time stamp: 2014-01-06 10.27.51
BR0301E SQL error -59 at location BrSqlExecute-1, SQL statement:
'/* BRSPACE */ alter tablespace PSAPSR3 add datafile '/oracle/SID/sapdata16/sr3_218/sr3.data218' size 4000M autoextend off'
ORA-00059: maximum number of DB_FILES exceeded
$ oerr ora 59
00059, 00000, "maximum number of DB_FILES exceeded"
// *Cause: The value of the DB_FILES initialization parameter was exceeded.
// *Action: Increase the value of the DB_FILES parameter and warm start.
$ -
Alter tablespace RW on standby database
I work with Oracle8i for Solaris.
I've created a stanby database which is opened in read only.
Now, I need to use a temporary tablespace, so
I've tried :
"alter tablespace temp nologging read write;"
But, oracle answer me an ORA-16000 error (database open for read-only access).
So :
1) Is it possible to use a temporary tablespace in standby mode ?
2) How.
Thanks,
Philippe
nullHello,
Since the table sizes is about 100GB , it takes time to move and rebuild the indexes and the end user application doesnot work if any of the index is unusable or not present.I think it will generate a lot of Archived logs, so it will be very heavy to manage and apply to your Standby.
If it's possible, it will be faster to put your Primary database in NOARCHIVELOG mode then, you make the Move and Rebuild.
Afterwards, you put again the Primary in ARCHIVELOG mode and take a good BACKUP of it.
Later, when nobody work on Standby, you recreate it.
Hope this help.
Best regards,
Jean-Valentin -
[b]Resizing/Altering Tablespaces Oracle9i[/b]
1. I want to solve a performance problem by resizing the:
temporary tablespace
rollback tablespace
undo tablespace
using
Alter tablespace, by doubling the storage parameters.
Is this enough or should I resize the associated datafiles?
2. Is it better performance wise: to resize the datafiles, i.e doubling
capacity
OR
adding another datafile to the tablespace with the same capacity as
the first one.Well U should add space in datafiles if datafiles are of smaller size and very soon they need to autoextend.
Storage parameters must be decided before making tablespace.
for ur second query i will suggest u to have different datafile on different disks -
Hot backup : Rman vs. ALTER TABLESPACE...BEGIN BACKUP
Dear Experts,
I'm currently using the following statements
- ALTER TABLESPACE (...) BEGIN BACKUP
- host ocopy (...)
- ALTER TABLESPACE (...)END BACKUP state
I'm going for rman now but I've got 2 questions for those who did that in the past:
1/ Will rman reduce the size of my hotbackup ?
2/ Does the hot backup run faster using rman ?
Thanks.
Best Regards,
Jerome1/ Will rman reduce the size of my hotbackup ? rman backup only those blocks which get accessed by oracle, means it doesn't copy the empty blocks as a part of backup as your OS copy command does. So yeah, the size of the backup will be smaller if there are huge datafiles but with comparably less data. Moreover if you are on 10g then you can use compressed backupset feature which will compress the backupsets.
2/ Does the hot backup run faster using rman ?
By using rman, there is no need to put every tablespace in backup mode, you can run the backup in parallel by allocating multiple channels, on 10g you can use block change tracking feature to speed up your incremental backups AND as explained in point 1 there is no need to copy the whole datafile. These all are the benefits of RMAN and I can't make a state statement that by all this the backup will run faster but will definitely go for it.
Daljit Singh -
Question about ALTER TABLESPACE add/drop datafile
Good afternoon,
As an exercise, I created a tablespace STORETABS and added a datafile to it using the command:
SQL> alter tablespace storetabs add datafile 'e:/storetabs3.dbf' size 50M;This step succeeded. A new file was created in the root of e: as expected.
Following that command, I issued:
SQL> alter tablespace storetabs drop datafile 'e:/storetabs3.dbf';
Tablespace altered.The command succeeded. However, the file *'e:/storetabs3.dbf'* was not removed. After re-reading the documentation found at http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_3002.htm, I get the impression that removing the O/S file itself is something that always needs to be done manually.
The question: Am I correct that there is no option to cause the "alter tablespace <tablespace> drop datafile <datafilename>" to delete the O/S file ? In other words, must the O/S file always be manually deleted as a separate step ?
Thank you for your help,
John.I believe in windows directory paths used backslash and not forward slash.
You can argue why oracle does not give error, either while creating or while dropping ;)
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 Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
SQL> select tablespace_name, file_name from dba_data_files ;
TABLESPACE_NAME
FILE_NAME
USERS
/u01/app/oracle/oradata/orcl/users01.dbf
UNDOTBS1
/u01/app/oracle/oradata/orcl/undotbs01.dbf
SYSAUX
/u01/app/oracle/oradata/orcl/sysaux01.dbf
SYSTEM
/u01/app/oracle/oradata/orcl/system01.dbf
EXAMPLE
/u01/app/oracle/oradata/orcl/example01.dbf
SCOTT_TBS
/home/oracle/scott_f1.dat
6 rows selected.
SQL> !ls -l scott_f1.dat
-rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat
SQL> alter tablespace scott_tbs add datafile '/home/oracle/scott_f2.dat' size 10M ;
Tablespace altered.
SQL> !ls -l scott_*.dat
-rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat
-rw-r----- 1 oracle oinstall 10493952 Sep 11 21:18 scott_f2.dat
SQL> alter tablespace scott_tbs drop datafile '/home/oracle/scott_f2.dat' ;
Tablespace altered.
SQL> !ls -l scott*.dat
-rw-r----- 1 oracle oinstall 276832256 Sep 11 21:15 scott_f1.dat -
Enqueue while trying to alter tablespace
I try to run the "alter tablespace .... read only " command ,
through sqlplus (as sysdba) ,
but never get back to prompt .
instead when I run "select * From v$session_event where sid=XX"
I get an event named enqueue with large number in "total_waits" column and the same number in "total_timeout" column .
why do I have this lock ?
who else can lock the same object ?
I administer DWH project , with total size of 3.5 T , but the specified tablespace is only 325MB , no one runs a query againts this tablespace right now , and no one writes into tables that are built on that tablespace .
how can I monitor it and find out what causes the lock ?
I use oracle 9205 on UNIX AIX 5.3 64 bit .
Thanks .please someone correct me if I'm wrong ,
but I've just entered the metalink site , and saw that it is a reported bug affecting versions 9.2.0.5 and 10.1.0.3 .
the bug is fixed in versions 9.2.0.7 and 10.2.0.1 , am I right ?
they are talking about SMON that holds TT enqueue and preventing alter temporary tablespace , mine , is not temporary tablespace , it is permanent tablespace ,
but I bumped into the same lock . -
ORA-604 signalled during: ALTER TABLESPACE...
Oracle 10.2.0.4 EE, Server 2003...
Today I wanted to add new datafile…
First I restart the instance and then used EM to add datafile… After 5 minutes process failed and in AlertSID.ora I get this message:
===========================================================
Mon Feb 08 10:23:04 2010
ALTER TABLESPACE "R1" ADD DATAFILE 'D:\Datafile\R03.DBF' SIZE 15000M AUTOEXTEND ON NEXT 512M MAXSIZE 32767M
Mon Feb 08 10:28:08 2010
ORA-604 signalled during: ALTER TABLESPACE "R1" ADD DATAFILE 'D:\Datafile\R03.DBF' SIZE 15000M AUTOEXTEND ON NEXT 512M MA…
===========================================================
Then I create datafile with command prompt and everything was fine, new datafile was added.
Any Ideas why does this happen?
Thanks!Error message was only:
Mon Feb 08 10:28:08 2010
ORA-604 signalled during: ALTER TABLESPACE "R1" ADD DATAFILE 'D:\Datafile\R03.DBF' SIZE 15000M AUTOEXTEND ON NEXT 512M MAXSIZE 32767M
As I said, I used EM and after 5 minutes EM connection failed. Then I re-connect and EM don’t show me any errors, everything was fine but new datafile was not added. Only I get error message in AlertSID.ora… -
Hi there,
I have a tablespace with the following details:
PSDEFAULT with size 2G
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
SEGMENT SPACE MANAGEMENT AUTOAnd I want to change it to EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10MCan someone please assist?
Thanks.Visions wrote:
Hi there,
I have a tablespace with the following details:
PSDEFAULT with size 2G
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
SEGMENT SPACE MANAGEMENT AUTOAnd I want to change it to EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10MCan someone please assist?
Its not possible online...
Perform below steps:
1. Move all the objects to some other tablespace.
2. Drop the tablespace and recreate with the desired storage option..
3. Move objects again to original tablespace
Regards
Rajesh -
Dynamic alter tablespace statement to add datafiles
Hi Gurus,
I need a PL/SQL stored procedure which will accept a datafile name as parameter and dynamically create and execute "alter tablespace" command to add this passed datafile dynamically.
Thanks
Amitava.See this demo : 11.2.0.1 Windows
Before running this demo, I logged into SYS account and said :
grant create tablespace to scott;
grant select on dba_tablespaces to scott;
grant select on dba_data_files to scott;
grant alter tablespace to scott;
even scott user is having DBA role. Then I login as scott user and :
set serveroutput on;
create or replace procedure create_tbs(tbs_name in varchar2, filename in varchar2) as
rt dba_tablespaces%rowtype;
str_tbs varchar2(500);
v_tbs varchar2(100);
begin
str_tbs := 'create tablespace ' || tbs_name || ' datafile '''||filename|| ''' size 1m' ;
dbms_output.put_line(str_tbs);
select * into rt from dba_tablespaces where tablespace_name=upper(tbs_name);
dbms_output.put_line('tablespace exists');
exception
when no_data_found then
execute immediate str_tbs;
dbms_output.put_line('tablespace was created');
end;
select tablespace_name from dba_tablespaces;
TABLESPACE_NAME
SYSTEM
SYSAUX
UNDOTBS1
TEMP
USERS
EXAMPLE
PERFSTAT
7 rows selected.
SQL> exec create_tbs('TESTTBS','c:\data\test.dbf');
create tablespace TESTTBS datafile 'c:\data\test.dbf' size 1m
tablespace was created
PL/SQL procedure successfully completed.
SQL> exec create_tbs('SYSAUX','c:\data\test.dbf');
create tablespace SYSAUX datafile 'c:\data\test.dbf' size 1m
tablespace exists
PL/SQL procedure successfully completed.
SQL> drop tablespace testtbs including contents and datafiles;
Tablespace dropped.
SQL>Now I am going to create add datafile procedure, which is your question :
column file_name for a50;
column tablespace_name for a20;
select file_name,tablespace_name from dba_data_files;
FILE_NAME TABLESPACE_NAME
E:\APP\SERVERROOM\ORADATA\ORCL\USERS01.DBF USERS
E:\APP\SERVERROOM\ORADATA\ORCL\UNDOTBS01.DBF UNDOTBS1
E:\APP\SERVERROOM\ORADATA\ORCL\SYSAUX01.DBF SYSAUX
E:\APP\SERVERROOM\ORADATA\ORCL\SYSTEM01.DBF SYSTEM
E:\APP\SERVERROOM\ORADATA\ORCL\EXAMPLE01.DBF EXAMPLE
E:\APP\SERVERROOM\ORADATA\ORCL\PERFSTAT PERFSTAT
6 rows selected.
create or replace procedure alter_tbs(tbs_name in varchar2, filename in varchar2) as
rt dba_data_files%rowtype;
str_tbs varchar2(500);
v_tbs varchar2(100);
begin
str_tbs := 'alter tablespace ' || tbs_name || ' add datafile '''||filename|| ''' size 10m' ;
dbms_output.put_line(str_tbs);
select * into rt from dba_data_files where tablespace_name=upper(tbs_name) and file_name=upper(filename);
dbms_output.put_line('Datafile already exists.');
exception
when no_data_found then
execute immediate str_tbs;
dbms_output.put_line('Datafile added.');
end;
SQL> exec alter_tbs('users','E:\APP\SERVERROOM\ORADATA\ORCL\USERS01A.DBF');
alter tablespace users add datafile 'E:\APP\SERVERROOM\ORADATA\ORCL\USERS01A.DBF' size 10m
Datafile added.
PL/SQL procedure successfully completed.
SQL> column file_name for a50;
SQL> column tablespace_name for a20;
SQL> select file_name,tablespace_name from dba_data_files;
FILE_NAME TABLESPACE_NAME
E:\APP\SERVERROOM\ORADATA\ORCL\USERS01.DBF USERS
E:\APP\SERVERROOM\ORADATA\ORCL\UNDOTBS01.DBF UNDOTBS1
E:\APP\SERVERROOM\ORADATA\ORCL\SYSAUX01.DBF SYSAUX
E:\APP\SERVERROOM\ORADATA\ORCL\SYSTEM01.DBF SYSTEM
E:\APP\SERVERROOM\ORADATA\ORCL\EXAMPLE01.DBF EXAMPLE
E:\APP\SERVERROOM\ORADATA\ORCL\PERFSTAT PERFSTAT
E:\APP\SERVERROOM\ORADATA\ORCL\USERS01A.DBF USERS
7 rows selected.
SQL> alter tablespace users drop datafile 'E:\APP\SERVERROOM\ORADATA\ORCL\USERS01A.DBF';
Tablespace altered.
SQL> select file_name,tablespace_name from dba_data_files;
FILE_NAME TABLESPACE_NAME
E:\APP\SERVERROOM\ORADATA\ORCL\USERS01.DBF USERS
E:\APP\SERVERROOM\ORADATA\ORCL\UNDOTBS01.DBF UNDOTBS1
E:\APP\SERVERROOM\ORADATA\ORCL\SYSAUX01.DBF SYSAUX
E:\APP\SERVERROOM\ORADATA\ORCL\SYSTEM01.DBF SYSTEM
E:\APP\SERVERROOM\ORADATA\ORCL\EXAMPLE01.DBF EXAMPLE
E:\APP\SERVERROOM\ORADATA\ORCL\PERFSTAT PERFSTAT
6 rows selected.
SQL>Similar thread : Create a procedure to dynamically add a tablespace
Regards
Girish Sharma -
Hi,
I need a help here and quick one please.
I create tablespace with these setting
CREATE TABLESPACE test
datafile 'c:/test/l_ind_scotia_01.dbf' size 50M autoextend on next 10M maxsize 30000M
extent management local uniform size 4M segment space management auto;
now i want to change the setting of the uniform and make the new statment like that
CREATE TABLESPACE test
datafile 'c:/test/l_ind_scotia_01.dbf' size 500M autoextend on next 10M maxsize 30000M
extent management local uniform size 128M segment space management auto;
so i just want to do 2 things:
1-resize the datafile wish is fine with me : it is done
and then resize the local uniform size from 4M to 128M which i could not do that and i dont know how?
please i need big help here
i read some artical saying, i can not change the local storage setting
hellllllllllllllllp
ThanksHi,
What ever "damorgan" Specified its for your Best Only...It does not mean
he is not helping you. He want to help you out in terms for learning and
knowing things by your self...so that you can help or suggest to others
in case if they find any difficulties..
First of all I sincerely suggest that please don't get angry and misuse words
against others, since there you friends who are helping out.
damorgan is a really experienced person..you should not talk in such a way.!!
in future posts.
It's my sincere Suggestion ...!!
If don't like my suggesstion ..then you a can Ignore.. !!
I can't help you..
Thanks & Regards
Pavan Kumar N -
How do i alter my screen size on mozilla firefox?
how do i alter the screen size on mozilla fire fox
Normally you would just drag one of the edges of the browser window. How does this question relate to downloading, installing, setting up Adobe software?
Maybe you are looking for
-
Ssis execute process task error: process exit code was 1 while the expected was 0
Hi Sir, in my SSIS Package(2012) i am using Execute Process Task which will call bat file. bat file is located on UNC Path.i am having the below script in the batch file. del \\servername\foldername\name.txt rcmd \\servername D:\name1.bat del \\
-
Best PDF reader for iPad2?
Is there a PDF "reader" app for the iPad which will allow you to 1. search for a specific word (or words) and 2. allow you to copy text from a PDF?
-
I'm having battery issues with macbook pro
I've tried calibrating my battery on my fairly new (3 months old) macbook pro, but it has not resolved the issue. Whenever i connect the charger to my mac it momentarily lights up green for a few seconds and then goes to amber which obviously means i
-
Hi, I have a particular wireless design that requires one WLC 5508 to be connected to two seperate swithces. Port 1 of WLC is connected trunk to Switch A and Port 2 of WLC is connected to Switch B. Each switch has its own local VLANS. When I connect
-
Context based assignment - context filter to display roles
Hi!! I would like to make a guided task with a context named SYSTEM that contains values such as SAP ECC / SAP BW... and once the user selects the system (s) he wants (step 1), the appropriate roles (corresponding to the value of the context SYSTEM)