Search code examples
javajdbcoracle11gsqlexception

java.sql.SQLException: ORA-01501: CREATE DATABASE failed ORA-01100: database already mounted


I made some MySQL java-jdbc code to create a database and add a few sample rows to it. I wanted to make this code work for oracle 11g also. So, I changed the connection URL in my code accordingly. But, now I am getting the error:

java.sql.SQLException: ORA-01501: CREATE DATABASE failed ORA-01100: database already mounted

I don't why am I getting this error. What does this mean "database already mounted" ? Please help me to fix this problem.

Thanks.


Solution

  • Shutdown the database then start it in nomount stage then apply create database statement

         SQL>shutdown immediate;
         SQL>startup nomount;
         SQL>CREATE ........