Add datafile or Increase MAXBYTES
Hi,
I have a datafile1 which has
MAXBYTES = 1024MB
Autoextend = ON.
nextextent size = 20MB
current size = 1010MB.
So it'll not be able to allocate next extent.
My question are
1. Should I increase MAXBYTES to 2024MB to let the datafile grow?
2. Should I add a new datafile?
What is the difference in both this case? Will both work?
Pl. help.
Hi,
>>Will both work?
Yes.
>>What is the difference in both this case??
basically adding a datafile, you just will need to worry in backup one more datafile.
Cheers
Similar Messages
-
Add datafile or increase the size?
Hi, I have this question. When is recomendable to add a datafile on the tablespace and when is recomendable to increase the size of the datafile on the tablespace?
Thanks!What i feel is
if you dont have free space in the file system then adding datafile to another filesystem is the only option.In this case we cannot increase the datafilesize.
NO free space in filesystem---add datafile in another filsystem
else increase data file size.
increasing the datafile increases the time in recovery incase if datafile is crashed.
Datawarehouse Db suits big tablespaxces.
Correct me if i am wrong -
Autoextend user tablespace or add datafile
Hello,
My USERS tablespace had problem today when loading a file using sqlldr. It stopped loading halfway through the file.
The allocated is set to 1900 mb and the used was at 1850. I only have 1 datafile for users tablespace. I have autoextensible to YES.
Why did it not extend the tablespace when I should still have 2gb free??
I dropped a couple unused user tables and it reduced the used amount, then I was able reran the sqlldr load and it completed.
Should I create a new datafile
ALTER TABLESPACE USERS ADD DATAFILE ‘/usr/lib/oracle/xe/oradata/XE/users01.dbf’ SIZE 2000M AUTOEXTEND OFF;
or increase the allocation
ALTER DATABASE DATAFILE ‘/usr/lib/oracle/xe/oradata/XE/users.dbf’ RESIZE 3000M;
Thanks for the help...Why did it not extend the tablespace when I should still have 2gb free??
Might be maxsize was defined at the time of tablespace creation
For example
SQL> select DBMS_METADATA.GET_DDL('TABLESPACE', 'USERS') from dual;
DBMS_METADATA.GET_DDL('TABLESPACE','USERS')
CREATE TABLESPACE "USERS" DATAFILE
'C:\ORACLE\ORACLEXE\ORADATA\XE\USERS.DBF' SIZE 104857600
AUTOEXTEND ON NEXT 10485760[b] MAXSIZE 5120M
LOGGING ONLINE PERMANENT BLOCKSIZE 8192
EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO
Should I create a new datafile
ALTER TABLESPACE USERS ADD DATAFILE
‘/usr/lib/oracle/xe/oradata/XE/users01.dbf’ SIZE
2000M AUTOEXTEND OFF;
or increase the allocation
ALTER DATABASE DATAFILE
‘/usr/lib/oracle/xe/oradata/XE/users.dbf’ RESIZE
3000M; It is good idea to add new file and having multiple file with same size.
Also in future if needed you can relocate datafile to reduce I/O contention. -
Hi,
Can anybody let me know how to add datafile using ASM
DB- ORACLE 10.2
OS-RHELSQL> select name from v$asm_diskgroup;
NAME
DATA1
DATA
Above we are having two asm diskgorup
SQL> alter tablespace users add datafile ‘+data1′ size 5M;
Tablespace altered.
SQL> select name from v$datafile;
NAME
+DATA1/nonasmtoasm/datafile/system.259.721108803
+DATA1/nonasmtoasm/datafile/undotbs1.261.721108865
+DATA1/nonasmtoasm/datafile/sysaux.260.721108841
+DATA1/nonasmtoasm/datafile/users.262.721108873
+DATA1/nonasmtoasm/datafile/users.269.721187971 -
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 -
Add datafile in a network drive
Hi,
I mapped in my NT machine a network disk, but when I try to create a datafile there, the next error message appear.
ALTER TABLESPACE CRM_DATA ADD DATAFILE 'h:\database\crm\dbs\CRM_TAB_5.DBF' SIZE 6000M
ORA-01119: error in creating database file 'h:\database\crm\dbs\CRM_TAB_5.DBF'
ORA-27040: skgfrcre: create error, unable to create file OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.
Somebody know if I need to do something before for Oracle identified this network drive like a other local disk? Can I create datafiles in a network disk?
Thanks.
nullThe architecture of Windows is due to this problem. Keep in mind that YOU do have this share available but the Oracle process has not. You yourself are the connecting user of the share and this share is availbale to you and not to the Oracle process. Oracle itselfs runs in the background (and not on your console) with another user (default Windows internal user: SYSTEM) and you cannot get this share available for this user. The previous reply (run the Oracle service using another DOMAIN user) will help.
-
Error: add datafile to an tablespace
I have a 10g database in Sun machine.
I issued the following command and got this error. What the problem:
SQL> l
1 alter TABLESPACE "TEST" add DATAFILE
2 '/local/ORACLE/product/10.2.0/oradata/orcl/test_02.dbf' SIZE 10m
3* EXTENT MANAGEMENT LOCAL UNIFORM SIZE 40960 SEGMENT SPACE MANAGEMENT AUTO
SQL> /
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 40960 SEGMENT SPACE MANAGEMENT AUTO
ERROR at line 3:
ORA-00933: SQL command not properly ended
However, if I issue the following commanc, it went through
1 alter TABLESPACE "TEST" add DATAFILE
2* '/local/ORACLE/product/10.2.0/oradata/orcl/test_02.dbf' SIZE 10m
SQL> /
SQL>
Any help will be appraciated!I believe that is the syntax for add datafile nothing else can be done other than this.
ADD TEMPFILE 'filespec' SIZE int K
[ AUTOEXTEND ON [NEXT int K | M]
[MAXSIZE {UNLIMITED|int K|int M}] ]
SS -
Can I add datafile bigger then 2GB
Hi all,
Can I add datafile bigger then 2GB (on the raw device) to the tablespace ?
I get err:
ORA-01119 : error in creating database file '/opt/DISK/data02'
ORA-27042 : not enought space on raw partition to fullfill request
Aditional information : 1
And
partition has size 4096543 kB
when I use partition with size 2GB it is Ok.
Is it limitation by Linux ?
I have linux 7.1
and oracle 8.1.7
What can I do ?
thanks
nullIf you want to use raw devices with linux you have to use the utility 'raw' to map the device. You could also use the Logical Volume Manager (or both)
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Martin Silar ([email protected]):
I do not know where it is my problem.
I wont to create datafile on raw disk and
I wont to need raw disk with 4GB size, becose
I can not create more logic devices on my SCSI disk then 15 logic partition. Disk have 39GB.
I have problem with add raw datafile to tablespace.
Have you sambody idea ?
thanks Martin<HR></BLOCKQUOTE>
null -
How to add datafile to standby database
Hi,
We have standby database on another site and we are using manual recovery. How to add datafile to standby database after datafile is added to primary database.
We are on Oracle 9i R2.
Please help.
Thanks in advanceHi,
When you recover the standby database after you added a datafile to the production, you will get an error that the file that needs recovery does not exist.
At this point you can connect to the standby and issue:
alter database create datafile '<original_name>' as '<new_name>';the new name is optional if the location of the files are the same.
After that, you can continue recovering the standby database.
Liron Amitzi
Senior DBA consultant
[www.dbsnaps.com]
[www.orbiumsoftware.com] -
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 -
Add prefix in increasing order in paragraph styles
Hi All,
Can we add prefix in increasing order in paragraphs styles.
Like
01 Style 1
02 Style 2
03 Style 3
04 Style 4
Please pass the code
Thanks
MonThank you so much, Jongware. This is what I want.
You and Kasyan both are very helpful.
Thanks again,
Mon -
Do I need to add datafile right now
Hi Friends,
I saw a tablespace there are two datafile.
one is full. second file information as below
File Size 3072MB and online
Automatically extend datafile when full (AUTOEXTEND) Increment 1024 KB
Maximum File Size value 32767MB
I saw size 6144.0 and used 5805.0 used as 94.5 in EM
seagment management set as auto
from threshold I saw
Tablespace Size (MB) 6,144.00 Space Used (MB) 5,805.00
Space Used (%) 94.48 Free Space (MB) 339.00
We use oracle 10gR2 in window 2003
Do i need to add or increase size or waitng for auto increase based on Maximum File Size value 32767MB
I dod not get a alert/ or warming information. we set as 95% for this event. warming as 85%.
Thanks,
Jim
Edited by: user589812 on Dec 5, 2008 1:32 PMIf the second file is created with maxsize 32 G then you don' thave issue at this point of time, it will automatically extend file till second files also reaches its maxsize. In addition if you are deleting/truncating data periodically from tables, then you should be having free space in both files
select file_name, (bytes/(1024*1024*1024)) size_gb from dba_data_files
where tablespace_name='YOURTABLESPACE';
You can use following to verify how much is freed up in tablespaces (you can join with dba_data_files)
select * from dba_free_space
where tablespace_name='YOURTABLESPACE'; -
Add Datafile in Logical Standby Database
Hi,
I have add one datafile in our primary RAC DB. We had logical standby database with file management is equal to manual. Both the primary RAC and logical standby db have the different storage structure. When the archive applied on the logical standby database its throws the error " error in creating datafile 'path'";
Would appreciate if come to know the steps to add the datafile in this kind of environment. and how can i overcome from this problem now except skip transaction for that ddl.
Thanks in advance.
DewanWhen the archive applied on the logical standby database its throws the error " error in creating datafile 'path'";Can you post the error message with the number.
From Manual..
8.3.1.2 Adding a Tablespace and a Datafile When STANDBY_FILE_MANAGEMENT Is Set to MANUAL
The following example shows the steps required to add a new datafile to the primary and standby database when the STANDBY_FILE_MANAGEMENT initialization parameter is set to MANUAL. You must set the STANDBY_FILE_MANAGEMENT initialization parameter to MANUAL when the standby datafiles reside on raw devices.
Add a new tablespace to the primary database:
SQL> CREATE TABLESPACE new_ts DATAFILE '/disk1/oracle/oradata/payroll/t_db2.dbf'
2> SIZE 1m AUTOEXTEND ON MAXSIZE UNLIMITED;
Verify the new datafile was added to the primary database:
SQL> SELECT NAME FROM V$DATAFILE;
NAME
/disk1/oracle/oradata/payroll/t_db1.dbf
/disk1/oracle/oradata/payroll/t_db2.dbf
Perform the following steps to copy the tablespace to a remote standby location:
Place the new tablespace offline:
SQL> ALTER TABLESPACE new_ts OFFLINE;
Copy the new tablespace to a local temporary location using an operating system utility copy command. Copying the files to a temporary location will reduce the amount of time the tablespace must remain offline. The following example copies the tablespace using the UNIX cp command:
% cp /disk1/oracle/oradata/payroll/t_db2.dbf
/disk1/oracle/oradata/payroll/s2t_db2.dbf
Place the new tablespace back online:
SQL> ALTER TABLESPACE new_ts ONLINE;
Copy the local copy of the tablespace to a remote standby location using an operating system utility command. The following example uses the UNIX rcp command:
%rcp /disk1/oracle/oradata/payroll/s2t_db2.dbf standby_location
Archive the current online redo log file on the primary database so it will get transmitted to the standby database:
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
Use the following query to make sure that Redo Apply is running. If the MRP or MRP0 process is returned, Redo Apply is being performed.
SQL> SELECT PROCESS, STATUS FROM V$MANAGED_STANDBY;
Verify the datafile was added to the standby database after the archived redo log file was applied to the standby database:
SQL> SELECT NAME FROM V$DATAFILE;
NAME
/disk1/oracle/oradata/payroll/s2t_db1.dbf
/disk1/oracle/oradata/payroll/s2t_db2.dbf -
Which is better? Resize datafile or add datafile in same diskgroup.
Hi All,
Can you explain which is better option between adding a datafile or resizing one in a diskgroup with 20 disks?
Regards,
Avihello buddy,
Since you know that a small file datafile has a limitation of 32gb then if your tablespace is out of this space then the solution is add more dfiles, also, in my point of view less datafiles in a hughe database is better for evite ckpt contention. The answer is dependo always for your situation!!!
I hope it helps
best regards,
Rodrigo Mufalani
www.mufalani.com.br -
Hello
How can I add a datafile in a RAC database with ASM?
The filename are create by ASM are like this
'+DATA/csoprd1a/datafile/aalarge.615.594210853'
where aalarge.615.594210853' is generated by ASM
thanksHello Daljit,
I already have this file, and I want to add another one and yes, I'm confused with the numbers, because , they are generated by ASM, so how can I do?
There is an Instance ASM, is there that I must add the datafile?
Regards
Carlos
Maybe you are looking for
-
Hello, eu estou trabalhando no electronica fiscal de Nota. Nós temos seguintes sistemas: -- SAP R/3 - SAP GRC NFE--JAVA (assinaturas digitais)-SAP NETWEAVER PI/XI - As AUTORIDADES (PARA A AUTORIZAÇÃO) como eu verificam a conexão entre estes sistemas.
-
i need help extending my desktop
-
Does anyone know how I can fix the screen brightness? Its very dark. I've been in to the brightness option and changed it but no luck andf I've also been in to settings....
-
Add additional IP to Windows 2008 SP2 Cluster
Dears, I have a 2 node SQL 2008 Cluster 64bit (non r2) on Windows 2008 SP2 64bit (non r2) Server. I need to add additional IP (different subnet) to the Cluster Quorum Resource. Kindly guide me the steps to add the IP ? Thanks Tariq
-
Hi I need to create a Demo using RNIF adapter.I plan to use R/3 for one end of the 3B2 PIP process..What kinda system can I use for the other end as Buyer/Supplier.If someone has created a demo/actual scenario, can you advise me on the same. Regards