Now there is a table (mt) with at least million data every day, and we plan to build a partition table in the form of monthly partitions. When partitioning, let Oracle run faster 2, said p21. [SQL]
- SQL>AlterSystemSetDb_create_file_dest ='F: \ oradata \ orclyxkj \ tbs_test_t_mt_2012';
[SQL]
- SQL>CreateTablespace ts_mt_2012_1 datafileSize50 M autoextendOn;
The first sentence means to set a data file storage path for ORACLE to automatically create files under this path,And use oracle to name the data file.Indeed, after executing the above two sentences, it is as follows:
It can be found that oracle has created two folders, ORCLYXKJ \ DATAFILE, and created them. the dbf data file is not the ts_mt_2012_1.dbf file I wrote. However, the size of the file created by oracle is indeed 50 MB, indicating that it is the data file of the tablespace. Why? Because:
Alter system set db_create_file_dest = 'f: \ oradata \ orclyxkj \ tbs_test_t_mt_2012 ';
This statement means that oracle's OMF is enabled, that is, oracle's Automatic File Management. Therefore, all file names are automatically completed by oracle.Generally, OMF is not enabled for a single database instance..
To enable OMF, another method is to create a database:
When creating a database, select 3rd items. This is the omf management method. oracle automatically manages the data file name, so it is not your name. Select 2nd items.
Then, I saw the file and directory, not the regular names I expected, and I didn't want to create the tablespace in this way, so I decided to delete the tablespace that I just created (some statements directly Delete the tablespace and data files), but I didn't delete the statements at this time, but directly in PL/SQL, find ts_mt_2012_1 in the Tablespace folder, and then press the reverse key to delete it.
After the file is deleted, go to the 'f: \ oradata \ orclyxkj \ tbs_test_t_mt_2012 'directory and find that the file created by oracle is still there. I am afraid to delete it manually, the data cannot be opened because it is inconsistent with the data file after deletion. In fact, this problem does not exist at this time, because the tablespace has been deleted. The database cannot be started unless the tablespace is not deleted and the data file is not offline or deleted.
The problem has been described. Conclusion:
1. Create a tablespace to the specified directory:
[SQL]
- SQL>CreateTablespace wfcrmdb datafile'E:/tools/oracle/oradata/wfcrm/wfcrmdb. dbf' Size100 m autoextendOn Next50 m maxsize unlimited;-- <Span style = "color: # ff0000;"> automatic expansion of tablespaces is usually disabled, because automatic expansion may cause database downtime without warning. Solution: See the following "partition table" </span>
Interpolation:
-- When creating a new tablespace, the data file extension is ora, but the system tablespace data file is dbf, and some existing tablespace data files are dat files, is there any difference?