Search code examples
databasewindowsoracleoracle-xeoracle21c

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


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.


Solution

  • 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\product\21c\oradata\XE\DATABASE_MAIN\DATABASE_MAIN.dbf' size 250M autoextend on
        path_prefix = 'C:\Oracle\product\21c\oradata\XE\DATABASE_MAIN'
        file_name_convert = ('C:\Oracle\product\21c\oradata\XE\pdbseed','C:\Oracle\product\21c\oradata\XE\DATABASE_MAIN');