java.sql.SQLException: ORA-01501: CREATE DATABASE failed ORA-01100: 数据库已经安装
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11837609/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
java.sql.SQLException: ORA-01501: CREATE DATABASE failed ORA-01100: database already mounted
提问by fastboat
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:
我制作了一些 MySQL java-jdbc 代码来创建一个数据库并向其中添加一些示例行。我也想让这段代码适用于 oracle 11g。因此,我相应地更改了代码中的连接 URL。但是,现在我收到错误:
java.sql.SQLException: ORA-01501: CREATE DATABASE failed ORA-01100: database already mounted
java.sql.SQLException: ORA-01501: CREATE DATABASE failed ORA-01100: 数据库已经安装
I don't why am I getting this error. What does this mean "database already mounted" ? Please help me to fix this problem.
我不知道为什么我会收到这个错误。“数据库已经安装”是什么意思?请帮我解决这个问题。
Thanks.
谢谢。
回答by Sai Ye Yan Naing Aye
Shutdown the database then start it in nomount stage then apply create database statement
关闭数据库,然后在 nomount 阶段启动它,然后应用 create database 语句
SQL>shutdown immediate;
SQL>startup nomount;
SQL>CREATE ........