- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
2#
发表于 2012-4-8 11:23:27
db_create_file_dest
DB_CREATE_FILE_DEST
Property Description
Parameter type String
Syntax DB_CREATE_FILE_DEST = directory | disk group
Default value There is no default value.
Modifiable ALTER SESSION, ALTER SYSTEM
Basic Yes
DB_CREATE_FILE_DEST specifies the default location for Oracle-managed datafiles. This location is also used as the default location for Oracle-managed control files and online redo logs if none of the DB_CREATE_ONLINE_LOG_DEST_n initialization parameters are specified.
If a file system directory is specified as the default location, then the directory must already exist; Oracle does not create it. The directory must have appropriate permissions that allow Oracle to create files in it. Oracle generates unique names for the files, and a file thus created is an Oracle-managed file.
DB_CREATE_FILE_DEST 指定了Oracle-Managed Datafiles Oracle管理数据文件的默认路径,使用该参数可以在增加datafile 时不需要指定相关路径:
ODM TEST:
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
不使用db_create_file_dest 的情况
SQL> show parameter db_create
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest string
SQL> create tablespace maclean datafile size 10M;
create tablespace maclean datafile size 10M
*
ERROR at line 1:
ORA-02236: invalid file name
使用db_create_file_dest 的情况
SQL> alter system set db_create_file_dest='/s01/orabase/oradata';
System altered.
SQL> create tablespace maclean datafile size 10M;
Tablespace created.
SQL> col FILE_NAME for a90
SQL> select file_name,tablespace_name from dba_data_files where tablespace_name='MACLEAN';
FILE_NAME TABLESPACE_NAME
------------------------------------------------------------------------------------------ ------------------------------
/s01/orabase/oradata/G11R23/datafile/o1_mf_maclean_7r2lqfmd_.dbf MACLEAN |
|