数据库未打开

发布于 2024-11-28 02:43:29 字数 287 浏览 3 评论 0原文

收到以下错误消息

我正在尝试在 Windows 2008 服务器上使用 Oracle 11g R2 创建数据库,当我运行脚本来创建数据库实例时,我将在第 1 行 ERROR: ORA-01109: 数据库未打开

使用授予选项将 ALL_MVIEW_DETAIL_PARTITION 上的选择授予公共 *

第 1 行出现错误: ORA-01109: 数据库未打开

以管理员身份登录。`

谢谢, 用户玛

I am trying to create database using Oracle 11g R2 on windows 2008 server, when I run script to create database instance I will get the following error message

ERROR at line 1:
ORA-01109: database not open

grant select on ALL_MVIEW_DETAIL_PARTITION to public with grant option
*

ERROR at line 1:
ORA-01109: database not open

logged on as administrator.`

Thanks,
usermma

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

雨的味道风的声音 2024-12-05 02:43:29

使用 root 登录 Oracle

su - oracle
sqlplus / as sysdba
create user username identified by password;
Exception : ORA-01109 Database not open

为了解决这个问题,我尝试了以下步骤并成功创建了架构。

  1. 请验证 ORA_HOMEPATH/dbs/sgadef.dbf
  2. 确保关闭 Oracle 服务器后,如果您发现任何服务在计算机上运行,​​请输入以下命令

    <前><代码>ps -ef | grep ora_ | | grep ora_ grep 数据库名称(sid)

  3. 如果发现任何服务,请使用 Kill 命令杀死进程

    kill -9 PID
    
  4. 请检查上述路径中是否存在以下文件;如果没有,请创建。

    ORACLE_HOMEPATH/dbs/lk;
    
  5. start mount;如果服务器已启动,请立即关闭

    SQL>改变数据库关闭;
    
    数据库已更改。
    
    SQL>立即关闭
    ORA-01109: 数据库未打开
    
    数据库已卸载。
    ORACLE实例关闭
    
    SQL>启动挂载
    ORACLE 实例已启动。
    
    系统全局区域总计 126951228 字节
    固定大小 454460 字节
    可变大小 109051904 字节
    数据库缓冲区 16777216 字节
    重做缓冲区 667648 字节
    数据库已安装。
    
    SQL>从 v$database 选择 open_mode;
    
    开放模式
    ----------
    已安装
    
    SQL>改变数据库打开;
    
    数据库已更改。
    
  6. 现在,您可以在数据库打开时创建自己的架构

    SQL>创建由密码标识的用户模式名称;
    
    SQL>授予资源,连接到模式名称;
    
    授予权限成功。
    

我已完成上述步骤以在数据库未打开时创建架构。

Login to Oracle with root

su - oracle
sqlplus / as sysdba
create user username identified by password;
Exception : ORA-01109 Database not open

To resolve this i trie below steps and succesfully created the schema.

  1. Please verify the ORA_HOMEPATH/dbs/sgadef.dbf
  2. Make ensure that after shutting down the Oracle server,if you find any services running on machine by entering below command

    ps -ef | grep ora_ | grep DBName(sid)
    
  3. Kill the processes if you find any by using kill command

    kill -9 PID
    
  4. Please check below file exists in mentioned path; if not please create.

    ORACLE_HOMEPATH/dbs/lk<sid>
    
  5. start mount; If the server is started use close immediate

    SQL> alter database close;
    
    Database altered.
    
    SQL> shutdown immediate
    ORA-01109: database not open
    
    Database dismounted.
    ORACLE instance shut down
    
    SQL> startup mount
    ORACLE instance started.
    
    Total System Global Area  126951228 bytes
    Fixed Size                   454460 bytes
    Variable Size             109051904 bytes
    Database Buffers           16777216 bytes
    Redo Buffers                 667648 bytes
    Database mounted.
    
    SQL> select open_mode from v$database;
    
    OPEN_MODE
    ----------
    MOUNTED
    
    SQL> alter database open;
    
    Database altered.
    
  6. Now you can create your own schema as the database is open

    SQL> create user schemaname identified by password;
    
    SQL> grant resource,connect to schema name;
    
    grant permission succeded.
    

I have done above steps to create a schema when database is not open.

另类 2024-12-05 02:43:29

依次执行以下命令....

> sqlplus 

用户名/密码= sys/********

SQL> shutdown immediate;
SQL> startup mount;
SQL> recover database;
SQL> alter database open;

Execute below Commands Sequentially....

> sqlplus 

username/password = sys/*******

SQL> shutdown immediate;
SQL> startup mount;
SQL> recover database;
SQL> alter database open;
风追烟花雨 2024-12-05 02:43:29

您是如何创建脚本的?它有什么作用?您不使用数据库配置助手来执行此操作是否有某种原因?这可能只是没有通过 oradim 创建的实例的服务的问题。

How did you create the script(s)? What does it do? Is there some reason you're not using the Database Configuration Assistant to do this? It may be simply a matter of not having the service for the instance created via oradim.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文