yu110415
2014-01-10 02:06 浏览 2.0k

LINUX下使用.sql脚本,不知道是那里写错了!求解答!

进入oracle用户后获取DBA权限运行.sql文件
sqlplus / as sysdba @create_user.sql
以下是.sql文件命令,主要是用来创建表空间和用户的。
------------------------创建表空间---------------------------
CREATE TABLESPACE ids DATAFILE '/u01/oradata/orcl/ids.dbf' SIZE 200m AUTOEXTEND ON NEXT 300M MAXSIZE UNLIMITED;
-------------------------创建用户----------------------------
CREATE user ids identified by ids default tablespace ids temporary tablespace TEMP profile DEFAULT;
----------------------给用户分配权限-------------------------
Grant dba to ids;
--------------------------提交-------------------------------
commit;

运行.sql文件后报错。
Connected to an idle instance.

CREATE TABLESPACE ids DATAFILE '/u01/oradata/orcl/ids.dbf' SIZE 200m AUTOEXTEND ON NEXT 300M MAXSIZE UNLIMITED
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

CREATE user ids identified by ids default tablespace ids temporary tablespace TEMP profile DEFAULT
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

Grant dba to ids
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

commit
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

是缺少什么?
求大神解答!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

3条回答 默认 最新

  • yx721kw0826 yx721kw0826 2014-01-13 01:52

    oracle没有连接上,报的是不可用错误

    点赞 评论 复制链接分享
  • u014530814 yiyongle 2014-08-26 12:01

    你的数据库实例还没有开启
    sqlpuls / as sysdba
    startup

    点赞 评论 复制链接分享
  • oyljerry oyljerry 2015-01-11 04:47

    oracle实例启动没?

    点赞 评论 复制链接分享

相关推荐