开发者社区 问答 正文

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

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

展开
收起
杨冬芳 2016-07-08 13:47:28 2545 分享 版权
1 条回答
写回答
取消 提交回答
  • IT从业

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

    2019-07-17 19:53:19
    赞同 展开评论