Alibabacloud.com offers a wide variety of articles about oracle add datafile to tablespace, easily find your oracle add datafile to tablespace information here online.
Basic usage of ORACLE tablespace creation, management, and deletion
1. Create a Permanent Table
-- Create a permanent tablespace TEST01 with a size of 50 MB. do not automatically expand the data file create tablespace TEST01loggingdatafile 'f: \ app \ oraclezq \ oradata \ orcl \ test01.dbf' size 50 mreuse autoextend o
Sizes, You need to configure the db_nK_cache_size parameters. These parameters are set to 0 by default. After these parameters are configured, you can specify the corresponding block when creating the relevant tablespace. This completes the Multiple Block Sizes. However, the Multiple Block Sizes provides a certain degree of complexity for the management proxy, so there is not much practical use.
Note:
When creating a non-db_block_size standard
Four ways to increase the size of table space in Oracle
1: Add data files to the table space
ALTER tablespace App_Data ADD datafile
' D:\ORACLE\PRODUCT\10.2.0\ORADATA\EDWTEST\APP03. DBF ' SIZE 50M;
2: New data files, and allow
the database:Sql>shutdown ImmediateSql>startupScenario Two: Moving common system tablespace data files/**************** The database server moves the system tablespace data file when there is insufficient disk space *****************/1, scope of use: the operation in the database is in the Mount State to be able to move the system table space data files2. Steps (Operation in Linux system):1># su-
Reporting ORA-01658 when importing data to the orale Database: failed to create INITIAL partition error for segments in tablespace XXX. When I create a tablespace in Oracle, the initial size is 200 MB. When the data volume in the database reaches this value, an error is returned when I import data to the database. The solution is to expand the
1.Queries the current tablespace of a database.
Select tablespace_name, file_name, sum (bytes)/1024/1024 table_size from dba_data_files group by tablespace_name, file_name;
2.Create a tablespace
Create tablespace data01DATAFILE '/Oracle/oradata/db/data01.dbf' SIZE 500 M;
3.Delete a
corresponding tablespace to *** M alter database datafile' full path data file name 'resize *** M; solution 2: add the data file alter tablespace name add datafile 'full path data file name 'size *** M; --
the size of kilobytes, megabytes, gigabytes, or megabytesMAXSIZE: Specifies the maximum disk space allowed to automatically extend data filesNEXT: Initial space used up, one-time expansion of how muchAutoextend: Space Auto-expansionReuse: Allow Oracle to re-use existing filesExtent management: If you want to manage tablespaces locally, specify Local. subkey Autoallocate Specifies that the tablespace is Sys
user is using the resources of the rollback segment? If there is a user, it is best to change the time (especially in the production environment ).
SQL> select s. username, u. name from v $ transaction t, v $ rollstat r, v $ rollname u, v $ session s
Where s. taddr = t. addr and t. xidusn = r. usn and r. usn = u. usn order by s. username;
6. Check the UNDO Segment status;
SQL> select usn, xacts, rssize/1024/1024/1024, hwmsize/1024/1024/1024, shrinks from v $ rollstat order by rssize;
7. Create
[Experiment-video process] oracle hot backup-single tablespace-backup and recovery operation demonstration
[Experiment-video process] oracle hot backup-single tablespace-backup and recovery operation demonstration
Restore a tablespace
1. Create a
tablespace_name= ' MAIL ';Tablespace_name file_name Online_sta TUS------------------------------ -------------------------------------------------------------------------------- - ------------MAIL/U01/APP/ORACLE/ORADATA/ORCL/MAIL.DBF OFFLINE(3) Copy the original data file to the new pathSql> host CP '/U01/APP/ORACLE/ORADATA/ORCL/MAIL.DBF '/HOME/ORACLE/MAIL01.DBF
The experiment is divided into two steps:1. Local tablespace managed by LMT. Structure Analysis of data files during Automatic ASSM segment ManagementORACLE 11G: 0 operating system block, 1-2 is the file header, 3-is the bitmap information. Data is stored at the beginning and end of 128-it may be the data of the segment header or segment.When ORACLE is 10 Gb, there are only 8 data file headers to store bitm
tablespace during table creation. That is to say, if the user does not specify the tablespace during table creation, it is stored in the user-specified tablespace by default, however, if a tablespace is specified, other tablespaces can still be used. In addition, if other users are granted permissions, they can still
Clean up the old data, not very familiar with the operation, directly deleted the table space, did not delete the data file,
HIS20170927 This tablespace has been deleted but the data file is still in place, a new table space is created directly on the data file.
Create tablespace HIS20170927 datafile '/oracle/oradata
;}
Example 2: the disk where the system tablespace data file is located is faulty
The backup database (Omitted) deletes the data files corresponding to the system tablespace. Start the database to the mount status. Before restore database, run set newname to specify a new location for the data file. After the restore database, Run switch datafile to change the
dbms_metadata.get_ddl (' tablespace ',' Mlog_norm_space ') from dual;
--4 confirm enough disk space to add a data fileSQL code
Alter tablespace mlog_norm_space
add datafile '/oracle/oms/oradata/mlog/mlog_norm_d
ORACLE Rman Backup and restoreRman can be incrementally backed up: database, tablespace, data fileOnly used blocks can be backed up as backup setTablespace and Data file correspondence: Dba_data_files/v$datafile_headerIn Noarchivelog mode, you can use Rman to back up read-only and offline table spacesORACLE Rman Downtime Backup:BackupRman connection on oracle,win
For Table space shrinking, Oracle only provides the extended function, but does not. Therefore, to achieve this requirement, you must first create an intermediate tablespace and then
For Table space shrinking, Oracle only provides the extended function, but does not. Therefore, to achieve this requirement, you must first create an intermediate
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.