如何在网络驱动器上建立表空间(急!!!)

[复制链接]
查看11 | 回复6 | 2009-7-22 09:30:00 | 显示全部楼层 |阅读模式
本人执行操作如何:(操作系统为win2003,z盘为1T的网络驱动器)
create tablespace mis datafile 'z:mis_01.dbf' size 20g;
报错信息如下:
ORA-01119:创建数据库文件'z:mis_01.dbf'时出错
ORA-27040:文件创建错误,无法创建文件
OSD-04002:无法打开文件
O/S—Error

OS 3)系统找不到指定的路径。
请教各位大侠的高见,谢谢!!!
本人是初学者,不知表空间是否支持建到网络驱动器上.
[ 本帖最后由 gaiwei666 于 2008-6-16 09:53 编辑 ]
回复

使用道具 举报

千问 | 2009-7-22 09:30:00 | 显示全部楼层
路径写正确。再尝试一下。还有,权限问题也检查好。
回复

使用道具 举报

千问 | 2009-7-22 09:30:00 | 显示全部楼层
修改服务里的oracleservice和oraclelistener把登陆改成此帐户,你做映射的那个机器要和你现在的这个机器administrator 的密码一致
回复

使用道具 举报

千问 | 2009-7-22 09:30:00 | 显示全部楼层
路径是我写错了 'z:mis_01.dbf' ,请问都需要检查什么权限呢?
回复

使用道具 举报

千问 | 2009-7-22 09:30:00 | 显示全部楼层
你有metalink账号么?上面有个文章专门写了如何在windows上使用网络共享
回复

使用道具 举报

千问 | 2009-7-22 09:30:00 | 显示全部楼层
直接给你转过来
希望对你有帮助:
Subject:Not able to access mapped drive when using Windows Terminal Service
Doc ID:Note:271495.1 Type:PROBLEM
Last Revision Date:17-JAN-2006 Status:PUBLISHED

The information in this article applies to:
Oracle Server - Enterprise Edition - Version: 9.2.0.4
Microsoft Windows 2000
Microsoft Windows XP
Symptoms
Yuo have followed the steps mentioned in note 45172.1.
"To use a mapped drive, the user that the service starts as must have setup mapped drive and be logged onto the server wher you want to access the mapped drive."
Still you cannot access this mapped drive. Say mapped drive is E:
SQL> create tablespace dummy datafile 'e:dummy.dbf' size 1M;
create tablespace dummy datafile 'e:dummy.dbf' size 1M
*
ERROR at line 1:
ORA-01119: error in creating database file 'e:dummy.dbf'
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 21) The device is not ready.
Cause
The user that the service starts as and has setup the mapped drive is logged in using remote desktop (using Windows Terminal Service).
Fix
It is required that the user should be logged in the server. So, the console must be logged in with the user starting Oracle, then the mapped network drives becomes available.
Logging in using remote desktop (using Windows Terminal Service) is the cause.
Refer to Note: 77627.1 for details on Oracle support matrix on WIndows 2000 Terminal Services.
References
Note 45172.1 - Running UTL_FILE on Windows NT
Note 77627.1 - Oracle Database Server product support Matrix for Windows 2000
复制代码



Subject:Running UTL_FILE on Windows NT
Doc ID:Note:45172.1 Type:FAQ
Last Revision Date:29-OCT-2007 Status:PUBLISHED
In this Document
Purpose
Questions and Answers

--------------------------------------------------------------------------------

Applies to:
PL/SQL - Version:
Oracle Server - Enterprise Edition - Version:
Microsoft Windows 2000
Microsoft Windows (32-bit)
Purpose
From release 7.3 file input/output capabilities were added to PL/SQL on the
server. This is achieved through the supplied package UTL_FILE, generic
documentation on this feature can be found in :-
- PLSQL Packages and Type References
- NoteUsing the UTL_FILE package

The following text covers how to setup directories for access by the UTL_FILE
package on windows NT 3.51 and 4.0.
Note:
=====
1) This article contains reference to the use of UTL_FILE_DIR parameter.
This parameter is no longer recommended from 9i database onwards.
2) This article provides the recommended way of accessing files using directory objects.
When directory objects are referred inside procedures , make sure they are referred in capital letters.
Checked for relevance on 29-Oct-2007
Questions and Answers
Directory Names
===============
Prior to 9i , for UTL_FILE's procedures to access server directories the directories to
be accessed must be specified in the init.ora file, for example :
UTL_FILE_DIR=E:LOGDIR
Quotes and a trailingare not necessary.
From 9i onwards the recommended option is to use a directory object .
create or replace directory MY_DIR as 'E:LOGDIR';

1) Long filenames or directory names with mixed case
----------------------------------------------------
For this to work the directory specified for use in the UTL_FILE procedures
must exactly match (including case) that specified in UTL_FILE_DIR. Although
the UTL_FILE_DIR init.ora parameter does not have to exactly match the actual
directories case.
e.g. UTL_FILE_DIR=E:LogDirectory
UTL_FILE.FOPEN('E:LogDirectory','logfile.log','w');
From 9i ,while creating directory name , they can be created in any case.
For example , we can create a directory object as
create or replace directory MY_DIR as 'E:LogDir';
or
create or replace directory MY_DIR as 'E:LOGDIR';
or
create or replace directory MY_DIR as 'E:logdir';
and all the above will work.
2) Directories with space characters
------------------------------------
For this to work the directory must be delimited by double quotes in the
init.ora parameter file.
e.g. UTL_FILE_DIR="E:LOG DIR".
From 9i onwards ,there is no special treatment required for the directories with space.Since
the directory object is create by referring to the physical directory within quotes,such problems
are taken care of.
create or replace directory MY_DIR as 'E:log dir';
3) Making multiple directories available
----------------------------------------
To specify multiple directories have a separate UTL_FILE_DIR line for each
directory, but make sure these are on consecutive lines otherwise only the
last directory will be accessible. Alternatively separate each directory
with a space on a single UTL_FILE_DIR line.
From 9i onwards , you need to create one directory object for each directory that needs to be accessed.
This holds good for sub-directories as well.
For example if you have directory E:logdir for which there is a directory object MY_DIR , to access any sub-directory of this directory ,
a new directory object has to be created.
Directory Permissions
=====================
Directories on FAT partitions
-----------------------------
FAT does not support file or directory permissions.
Directories on NTFS partitions
------------------------------
When an oracle instance is created the services that support it are setup
to Log On As the SYSTEM (or operating system) account. For UTL_FILE's
procedures to access directories that do not have access granted to
everyone they must have "Change" privileges granted to the SYSTEM account.
If the OracleServiceXXXX service has been altered to log on as another
account, it is this account that must be given access to the directories.
Accessing Network Directories
=============================
Netware Networked Directories
-----------------------------
For this to work ensure that the account that started the Oracle instance
has a mapped network drive connected using a fully qualified username/password
with the same drive letter and path as is specified by UTL_FILE_DIR.
NT Networked Directories
------------------------
When an oracle instance is created the services that support it are setup
to "Log On As" the SYSTEM (or operating system) account, this account has
very few privileges and no access to NT Domains. To access another NT machine
the OracleServiceXXXX must be setup to logon to the appropriate NT Domain as
a user who has access to the required location for UTL_FILE.
To change the default logon for the Oracle services, go to :
-> Control Panel
-> Services
-> OracleServiceXXXX (where XXXX is the instance name)
-> Startup
-> Log On As
Choose the "This Account" radio button, then complete the appropriate
domain login information. Repeat this procedure for the TNS Listener :
-> Control Panel
-> Services
-> OracleXXXXTNSListener (where XXXX is the Oracle Home Name)
-> Startup
-> Log On As
If the listener is not configured to start as the same user as the Oracle
Service user will fail to connect with "ORA-12500 TNS:listener failed to start
a dedicated server process". Once the services have been setup as a user with
the appropriate privileges the are two options for setting UTL_FILE_DIR :
a. Mapped Drive : To use a mapped drive, the user that the service starts as
must have setup a drive to match UTL_FILE_DIR and be logged onto the server
when UTL_FILE is in use.
While using directory objects ,a directory object has to be created for the drive and
the user has to be logged onto the server when UTL_FILE is in use.
b. Universal Naming Convention : UNC is preferable to Mapped Drives because
it does not require anyone to be logged on and UTL_FILE_DIR should be set to
a name in the form :
\

or
"\"
A directory object has to be created using UNC format to point to the shared directory :
create or replace directory NET_SHARE as '\';
Keywords
WINNT;
复制代码
回复

使用道具 举报

千问 | 2009-7-22 09:30:00 | 显示全部楼层
谢谢哦!谢谢各位,问题已解决,采用棉花糖的方法,就OK了!以后向大家多学习哦!!!嘻嘻
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行