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.
After a long time to learn to create an Oracle tablespace, so share with you, after reading this article you certainly have a lot of gains, hope this article can teach you more things.1. Query the free space first
Select Tablespace_name,file_id,block_id,bytes,blocks from Dba_free_space;
2. Increase the Oracle table spaceFirst, query the data file na
;2. Bring the tablespace onlineAlter tablespace game online;3. offline data filesAlter database datafile 3 offline;4. Bring data files onlineAlter database datafile 3 online;5. Read-Only tablespaceAlter tablespace game read only;6. Make the
idx_04_01 on tb_ori_0004 (f0004_001d );Create index idx_04_09 on tb_ori_0004 (f0004_009n );Create index idx_04_01_02 on tb_ori_0004 (f0004_001d, f0004_002v );Create index idx_04_03_04_05 on tb_ori_0004 (f0004_003v, f0004_004v, f0004_005v );Create index idx_04_01_03_04_05 on tb_ori_0004 (f0004_001d, f0004_003v, f0004_004v, f0004_005v );-- View tablespacesSelect * From dba_tablespaces-- Delete a tablespaceDrop tablespace tbs_develop1-- Delete table nul
temporary table spaces
Create temporary tablespace sales
Tempfile '/home/app/oracle/oradata/oracle8i/sales01.dbf ' size 800M
Autoextend on
Next 50M
MaxSize 1000M
Creates a local administration temp table space, and if it is a temporary tablespace, the datafile in all statements are swapped to Tempfile
8i sy
Oracle tablespace query and maintenance command Book II (undo tablespace)-- Undo tablespace Summary-- View All tablespace namesSelect name from v $ tablespace;-- Create a new UNDO tablespace
Table space name and status information:
Select * From dba_tablespaces;
Table space creation statement:
Select dbms_metadata.get_ddl ('tablespace', ts. tablespace_name)
From dba_tablespaces ts;
---- View the tablespace information of the databaseSelect * from V $ datafile;
Select * -- segment_name, sum (bytes)/1024From user_extents group by segm
TEST 111 rows selected
The new tablespace cannot have the same name as the existing tablespace in the database.
SQL> CREATE tablespace TEST DATAFILE 'd: \ ORACLE \ TEST02.DBF 'size 10 M;CREATE tablespace test
/rectl1. SQL ';
SQL> alter tablespace tbs1 read only;
SQL> alter database backup controlfile to trace as '/tmp/rectl2. SQL ';
SQL> ho diff/tmp/rectl1. SQL/tmp/rectl2. SQL
69, 70c69
---
> '/U01/app/oracle/oradata/orcl/example01.dbf'
97a97, 102
> -- Files in read-only tablespaces are now named.
> Alter database rename file 'missing00006'
> TO '/u01/app/oracle/
Oracle table space Export, user deletion, table space deletion, user new, table space new, data import shellExecute the script with a non-Oracle userParameter name$1:base the user name of the table space$: User name for synchronization table spaceWorking with scenesTest, base table space is used to upgrade and build some solidified data. Synchronous table space for testing, leveling data each time and base
DCSOPEN_TBS to offline:SQL> alter tablespace dcsopen_tbs offline; Tablespace altered.
2. query the data file status: Select file #, name, status from v $ datafile;File # nameStatus------------------------------------------------------------------- 11/oracle/oradata_petest/petest/dcsopen_tbs02.dbf OFFLINE The status
: 5387030 is fixed in RDBMS 11.1.
Solution
To implement a solution for Bug: 5387030, please execute any of the below alternative solutions:• Upgrade to 11.1 in which Bug: 5387030 is fixed
OR• Apply patchset release 10.2.0.4 or higher in which Bug: 5387030 is fixed.
OR• Download and apply interim Patch: 5387030, if available for your platform and RDBMS release. to check for conflicting patches, please use the MOS Patch Planner Tool. if no patch is available, file a Service Request through My
After a long period of learning to create Oracle tablespaces, I would like to share with you that you will certainly have a lot of gains after reading this article. I hope this article will teach you more things.
1. First query free space
Copy codeThe Code is as follows: select tablespace_name, file_id, block_id, bytes, blocks from dba_free_space;
2. Add Oracle
The temporary and undo files of the database do not need to be backed up. They can be restored after they are lost, and data will not be lost.
1. After files in the temporary tablespace are lost, they are automatically created after the database is started. No intervention is required.
Simulation: After the database is shut down, the temporary files are deleted and automatically created upon startup.
2. The file corresponding to the Undo
different:Temp: dba_temp_files v $ tempfileOthers: dba_data_files v $ datafileIn conclusion, the size of the entire database is determined by temp + other tablespaces. Generally, we only calculate the size of other tablespaces. For example, in the monthly report
(2) The tablespace to be created is different.Temp tablespace:SQL> create temporary tablespace temp2 tempfile '/opt/
Tags: cal files temp tablespace auto gpm oracle Administrator SEQ SelectFirst login to the administrator account, or a user with DBA authority, followed by: --Query All users SELECT * from Dba_users; --Create new users Create user gpmgt identified by GPMGT; --View all user tablespace Select username,default_tablespace from Dba_users; --Query all table space p
Table Space:
Oracle's UNDOTBS01.DBF file is too big a solution
1. Prohibit undo tablespace automatic growth
ALTER DATABASE datafile ' FULL_PATH/UNDOTBS01.DBF ' autoextend off;
2.--Create a new small space for the undo Tablespace
Create undo tablespace undotBS2 DataFile ' Ful
When studying Oracle, you may encounter oracle tablespace recovery problems. Here we will introduce the solutions to Oracle tablespace recovery problems. Here we will share with you.
Oracle ta
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.