Data File suffix

Source: Internet
Author: User

Data File suffix

Today, we saw 99 tablespaces in the production system. We decided to add data files to the tablespaces. No problem.

At night, you get cold sweat. Production system RAC. data files are stored in shared storage. The path is correct, but the suffix of the data file is incorrect!

Original data file name:

+ Data/datafile/xxxxxx. dat

Data Files Added by Alibaba Cloud:

+ Data/datafile/xxxxxx. dbf

The business won't be so paralyzed, right ????

Decisive test:

Create an include. dbf and. create tablespace dxmy datafile '/u01/app/oracle/oradata/single1/dxmy001.dat 'size 2 m autoextend off; alter tablespace dxmy add datafile '/u01/app/oracle/oradata/single1/dxmy002.xo' size 2 m autoextend off; alter tablespace dxmy add datafile '/u01/app/oracle/oradata/single1/dxmy003.dbf 'size 4 m autoextend off; create table tab_test (id number, name varchar2 (100 )) tablespace dxmy;
Insert data: declarebegin for I in 1 .. 100000 loop insert into tab_test values (I, I | 'dxmy'); end loop; commit; end;
View the table space: select owner, table_name, NUM_ROWS, BLOCKS * 8192/1024/1024 "Size M", EMPTY_BLOCKS, LAST_ANALYZED from dba_tables where table_name = 'tab _ test '; OWNER TABLE_NAME NUM_ROWS Size M EMPTY_BLOCKS LAST_ANALYZEDLM TAB_TEST 200000 4.859375 0 6:29:07
The data size exceeds 1 MB, indicating that all three data files are in use.
That is to say, if Oracle uses a data file that belongs to the tablespace, it can be used regardless of the suffix.

PS: If no data is occupied by the table, execute the table Analysis Statement.

Exec dbms_stats.get_tables_stats (ownname => '', tabname => '');

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.