ORA-01950

Filed under: Oracle, 错误解决 | Borrow: | No Comments »
Posted on

ORA-01950: no privileges on tablespace ‘MYDEMO’

应该是自己没理解好吧,以为用户指定了默认表空间就应该有使用这个表空间的权限,其实并不是这样的。

看代码:

$ sqlplus /nolog
 
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Sep 23 12:04:55 2008
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
 
Total System Global Area  264241152 bytes
Fixed Size                  1218868 bytes
Variable Size              62916300 bytes
Database Buffers          197132288 bytes
Redo Buffers                2973696 bytes
SQL> alter database mount;
 
Database altered.
 
SQL> alter database open;
 
Database altered.
 
SQL> create user benben identified by benben1983
  2  default tablespace mydemo
  3  temporary tablespace mydemotemp
  4  profile default;
 
User created.
 
SQL> grant create session,create table
  2  to benben;
 
Grant succeeded.
 
SQL> conn benben/benben1983
Connected.
SQL> create table benTable
  2  (
  3  bid int,
  4  name varchar2(20)
  5  );
create table benTable
*
ERROR at line 1:
ORA-01950: no privileges on tablespace 'MYDEMO'

我创建用户有自己默认的表空间,但在使用表空间时,出了错,因为没有权限。这里应该这样处理一下。

SQL> alter user benben quota 10M on mydemo;
 
User altered.

quota 是是为表空间上的用户配置一个定额。看来,没有这个是不行滴,又学到了,呵。

ORA-01081

Filed under: Oracle, 错误解决 | Borrow: | No Comments »
Posted on

ORA-01081: cannot start already-running ORACLE - shut it down first

真菜啊,这错误,真是没好好看书。

$ sqlplus /nolog
 
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Sep 21 16:14:04 2008
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
 
Total System Global Area  264241152 bytes
Fixed Size                  1218868 bytes
Variable Size              67110604 bytes
Database Buffers          192937984 bytes
Redo Buffers                2973696 bytes
SQL> startup mount
ORA-01081: cannot start already-running ORACLE - shut it down first

原来根本连语法都不对,还好没被群里人笑话啊。

$ sqlplus /nolog
 
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Sep 21 16:14:04 2008
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
 
Total System Global Area  264241152 bytes
Fixed Size                  1218868 bytes
Variable Size              67110604 bytes
Database Buffers          192937984 bytes
Redo Buffers                2973696 bytes
SQL> alter database mount;
 
Database altered.

ORA-01031

Filed under: Oracle, 错误解决 | Borrow: | No Comments »
Posted on

ORA-01031: insufficient privileges

说我是初学者真不错啊,连这都出错。

$ sqlplus /nolog
 
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Sep 21 16:14:04 2008
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
SQL> startup nomount
ORA-01031: insufficient privileges
SQL> startup mount
ORA-01031: insufficient privileges
SQL> startup open
ORA-01031: insufficient privileges

原来是我根本都没连接。。。还以为是先open了再连接数据库呢,真菜啊。还好有DBA群里朋友的指导。

$ sqlplus /nolog
 
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Sep 21 16:14:04 2008
 
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
 
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
 
Total System Global Area  264241152 bytes
Fixed Size                  1218868 bytes
Variable Size              67110604 bytes
Database Buffers          192937984 bytes
Redo Buffers                2973696 bytes