Why does the creation of a pluggable database in Oracle XE 21c fail with ORA-65100: "missing or invalid path prefix"?

huangapple go评论65阅读模式
英文:

Why does the creation of a pluggable database in Oracle XE 21c fail with ORA-65100: "missing or invalid path prefix"?

问题

我需要在承载旧XE测试数据库的服务器突然崩溃后设置一个新的Oracle XE数据库。
为了做到这一点,我有一个.dmp文件,记录了数据库正常运行时的状态。
服务器是一台Windows机器。
数据库结构最初是在Oracle 11g环境中创建的,但服务器已经进行了更新,因此.dmp是在19c环境中创建的。
我尝试设置的新的Oracle XE数据库是21c。

安装Oracle XE成功,但尝试创建PDB时出现ORA-65100 "丢失或无效的路径前缀"错误。
通过命令行在sqlplus中发出了以下语句:

create pluggable database DATABASE_MAIN 
	admin user USERNAME identified by PASSWORD 
	storage (maxsize 2G) 
	default tablespace TS_DATA 
	datafile '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/DATABASE_MAIN.dbf' size 250M autoextend on 
	path_prefix = '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/' 
	file_name_convert = ('/disk1/Oracle/product/21c/dbhomeXE/pdbs/pdbseed', '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/');

因此,这一行当前引发错误:

path_prefix = '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/'

我尝试了以下方法来解决错误:

  • 以管理员身份运行cmd,以防出现简单的权限问题
  • 手动创建缺失的文件夹(/pdbs/DATABASE_MAIN)
  • 将/disk1替换为/diskc,看看是否有差异
  • 省略/disk1,以/Oracle开头
  • 尝试不同的路径(/disk1/Oracle/product/21c/pdbs/DATABASE_MAIN/)
  • 删除路径前缀末尾的'/'符号

搜索在线关于路径前缀失效的原因的信息遗憾地没有给我任何答案,但Oracle的文档将以下内容列为有效示例路径前缀:

PATH_PREFIX = '/disk1/oracle/dbs/salespdb/'

这是我第一次与CDB/PDB这种“新”Oracle数据库结构互动,因为到目前为止,我只使用了以用户/模式结构构建的旧数据库。

英文:

I need to set up a new Oracle XE database after the server holding our old XE testing database suddenly died.
To do this I do have a .dmp file from when the database was functional.
The server is a Windows machine.
The database structure was originally created in an Oracle 11g environment but the server had been updated since so the .dmp was created in a 19c environment.
The new Oracle XE database I'm trying to set up is 21c.

The installation of Oracle XE worked, but trying to create a PDB fails with ORA-65100 "missing or invalid path prefix".
Issued the following statements in sqlplus via command line:

create pluggable database DATABASE_MAIN 
	admin user USERNAME identified by PASSWORD 
	storage (maxsize 2G) 
	default tablespace TS_DATA 
	datafile '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/DATABASE_MAIN.dbf' size 250M autoextend on 
	path_prefix = '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/' 
	file_name_convert = ('/disk1/Oracle/product/21c/dbhomeXE/pdbs/pdbseed', '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/');

So this line is currently throwing the error:

path_prefix = '/disk1/Oracle/product/21c/dbhomeXE/pdbs/DATABASE_MAIN/'

Things I've tried to get around the error:

  • ran cmd as administrator in case its a simple permission issue
  • created the missing folders myself ( /pdbs/DATABASE_MAIN )
  • replaced /disk1 with /diskc to see if it makes a difference
  • omitted /disk1 and started the string with /Oracle
  • tried a different path ( /disk1/Oracle/product/21c/pdbs/DATABASE_MAIN/ )
  • removed the trailing '/' at the end of the path prefix

Searching online for what invalidates the path prefix sadly didn't give me any answers however Oracle's documentation states the following as a valid example path prefix:

PATH_PREFIX = '/disk1/oracle/dbs/salespdb/'

This is my first time interacting with this "new" Oracle database structure of CDB/PDB as I've only worked with older databases so far that were built with the user/schema structure.

答案1

得分: 0

正如注释中所指出的,问题是由于UNIX风格的路径,而不是Windows风格的路径导致的。

因此,将路径从

/disk1/foo/bar

更改为

C:\foo\bar

解决了问题。

以下是在sqlplus中运行的功能性create语句:

create pluggable database DATABASE_MAIN
    admin user USERNAME identified by PASSWORD
    storage (maxsize 2G)
    default tablespace TS_DATA
    datafile 'C:\Oracle\productc\oradata\XE\DATABASE_MAIN\DATABASE_MAIN.dbf' size 250M autoextend on
    path_prefix = 'C:\Oracle\productc\oradata\XE\DATABASE_MAIN'
    file_name_convert = ('C:\Oracle\productc\oradata\XE\pdbseed','C:\Oracle\productc\oradata\XE\DATABASE_MAIN');
英文:

As noted in the comments, the issue was due to the UNIX style paths rather than Windows styled.

So changing the paths from

/disk1/foo/bar

to

C:\foo\bar

resolved the issue.

Here's the functional create-statement as run in sqlplus:

create pluggable database DATABASE_MAIN
    admin user USERNAME identified by PASSWORD
    storage (maxsize 2G)
    default tablespace TS_DATA
    datafile 'C:\Oracle\productc\oradata\XE\DATABASE_MAIN\DATABASE_MAIN.dbf' size 250M autoextend on
    path_prefix = 'C:\Oracle\productc\oradata\XE\DATABASE_MAIN'
    file_name_convert = ('C:\Oracle\productc\oradata\XE\pdbseed','C:\Oracle\productc\oradata\XE\DATABASE_MAIN');

huangapple
  • 本文由 发表于 2023年2月16日 19:15:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/75471474.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定