1

I am running Oracle (V19, V18, and V12) instances under WSL2 (Windows 10 version 2004). For persistence, my Oracle data files are mapped to a folder on my Windows host. I can run the containers from Docker for Windows or from within WSL2 (Ubuntu 20.04), all the while mapping the data volume to the same folder on the Windows host.

The reason for this setup is so that we can quickly and easily connect different instances of our database to an Oracle container running either under Linux or under Windows by just switching around the volume mappings.

However, doing this through WSL2 incurs performance penalties and is not recommended (see, e.g. WSL best practices). Windows displays a warning as well:

Performance Warning

So I would like to transfer my database volume from the Windows host to the WSL2 file system.

I can create a brand new database in a volume on the Linux host and connect to that from both Docker under Ubuntu and Docker for Windows. But raw copying of the data files for an existing database from Windows to Linux (not too surprisingly) results in a failure of Oracle to open the database (control file appears corrupt):

database_1  | #####################################
database_1  | ########### E R R O R ###############
database_1  | DATABASE SETUP WAS NOT SUCCESSFUL!
database_1  | Please check output for further info!
database_1  | ########### E R R O R ###############
database_1  | #####################################
database_1  | The following output is now a tail of the alert.log:
database_1  | Additional information: 3
database_1  | ORA-221 signalled during: ALTER DATABASE   MOUNT...
database_1  | 2020-11-05T13:50:41.026149+00:00
database_1  | Errors in file /opt/oracle/diag/rdbms/orcl19cdb/ORCL19CDB/trace/ORCL19CDB_mz00_106.trc:
database_1  | ORA-00202: control file: '/opt/oracle/oradata/ORCL19CDB/control01.ctl'
database_1  | 2020-11-05T13:50:41.104385+00:00
database_1  | Errors in file /opt/oracle/diag/rdbms/orcl19cdb/ORCL19CDB/trace/ORCL19CDB_mz00_106.trc:
database_1  | ORA-01103: database name 'ORCL19CD�' in control file is not 'ORCL19CD'
database_1  | ORA-00202: control file: '/opt/oracle/oradata/ORCL19CDB/control01.ctl'
database_1  | Checker run found 1 new persistent data failures

Is there a simple automatic way to transfer the files from the Windows host to the Linux host? Or is there a better way altogether (e.g. creating a new CDB under Linux and copying the PDB from Windows into it)?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.