ORA-01950: no privileges on tablespace 'USERS' - Oracle-程序员宅基地

技术标签: privileges  oracle  import  scott  ORA-01950  DataBase  

Problem

Import the objects from one user scott to another user tom, returns error ORA-01950: no privileges on tablespace 'USERS'.

Procedure

Export all the objects from user scott,

[tom@ocp backup]$ exp scott/oracle file=scott
[tom@ocp backup]$ ll
-rw-rw-r--. 1 tom tom 24576 Aug 31 22:55 scott.dmp

Error occurred when Importing the objects from one user scott to another user tom,ORA-01950: no privileges on tablespace 'USERS', the message was as below,

[tom@ocp backup]$ imp system/oracle file=scott.dmp fromuser=scott touser=tom

Import: Release 11.2.0.1.0 - Production on Sat Aug 31 23:07:38 2019

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export file created by EXPORT:V11.02.00 via conventional path

Warning: the objects were exported by SCOTT, not by you

import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
. importing SCOTT's objects into TOM
. . importing table                         "DEPT"
IMP-00058: ORACLE error 1950 encountered
ORA-01950: no privileges on tablespace 'USERS'
. . importing table                          "EMP"
IMP-00058: ORACLE error 1950 encountered
ORA-01950: no privileges on tablespace 'USERS'
. . importing table                     "SALGRADE"
IMP-00058: ORACLE error 1950 encountered
ORA-01950: no privileges on tablespace 'USERS'
About to enable constraints...
Import terminated successfully with warnings.
[tom@ocp backup]$


The object scheme was imported, however the table content cannot be imported, it was empty:

SQL> conn tom/oracle;
Connected.
SQL> select object_name,object_type from user_objects;

OBJECT_NAME	     OBJECT_TYP
-------------------- ----------
JOB1		     JOB
DEPT		     TABLE
PK_DEPT 	     INDEX
EMP		     TABLE
PK_EMP		     INDEX
SALGRADE	     TABLE

6 rows selected.

SQL> select * from emp;

no rows selected

SQL>

Now delete all the objects which had been imported into user tom,

SQL> drop table dept CASCADE CONSTRAINTS;

Table dropped.

SQL>

SQL> drop table emp CASCADE CONSTRAINTS;

Table dropped.
SQL> drop table salgrade CASCADE CONSTRAINTS;

Table dropped.

SQL>
SQL> select object_name,object_type from user_objects;

OBJECT_NAME	     OBJECT_TYP
-------------------- ----------
JOB1		     JOB

SQL>

If grant user tom the unlimited tablespace, the error ORA-01950: no privileges on tablespace 'USERS' was resolved.

Solution

SQL> GRANT UNLIMITED TABLESPACE TO tom;

Grant succeeded.

SQL>
SQL> select user from dual;

USER
------------------------------
SYS

SQL>

Verify the result

Do it again:

[tom@ocp backup]$ imp system/oracle file=scott.dmp fromuser=scott touser=tom

Import: Release 11.2.0.1.0 - Production on Sat Aug 31 23:36:19 2019

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export file created by EXPORT:V11.02.00 via conventional path

Warning: the objects were exported by SCOTT, not by you

import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
. importing SCOTT's objects into TOM
. . importing table                         "DEPT"          4 rows imported
. . importing table                          "EMP"         14 rows imported
. . importing table                     "SALGRADE"          5 rows imported
About to enable constraints...
Import terminated successfully without warnings.

Check the result in Oracle:

SQL> select object_name,object_type from user_objects;

OBJECT_NAME	     OBJECT_TYP
-------------------- ----------
DEPT		     TABLE
PK_DEPT 	     INDEX
EMP		     TABLE
PK_EMP		     INDEX
SALGRADE	     TABLE
JOB1		     JOB

6 rows selected.

SQL> select * from dept;

    DEPTNO DNAME	  LOC
---------- -------------- -------------
	10 ACCOUNTING	  NEW YORK
	20 RESEARCH	  DALLAS
	30 SALES	  CHICAGO
	40 OPERATIONS	  BOSTON

SQL>

Reference

Oracle no privileges on tablespace USERS

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/scruffybear/article/details/100182191

智能推荐

【LeetCode 46】全排列_前端 全排列-程序员宅基地

文章浏览阅读376次。题目描述给定一个 没有重复 数字的序列,返回其所有可能的全排列。示例:输入: [1,2,3]输出:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1]]解题思路这个题目很容易理解,就是将数组中的所有数进行全排列,最后输出全排列的结果。这个应该还是回溯+剪枝的问题,以1为开头的组合为例:红色部分就是我们需要剪掉的枝。限制条件就是,结果数组不能重复,元素不能重复。这里我们初始化一个数组arr,当每一次将一个_前端 全排列

记录CAS6.1X Server 部署加Mysql数据源整合详细_\etc\cas\thekeystore-程序员宅基地

文章浏览阅读1.4k次。1.首先下载CAS6.1X Serve端代码链接如下(注意cas6.1要求jdk11的环境):https://github.com/apereo/cas-overlay-template/tree/6.12.代码下载本地后解压 cas-overlay-template-6.1.zip 如下代码3.cmd进入解压后的目录,执行命令gradlew.bat clean build 进行第一次构建。gradlew.bat clean build 4.构建完成后,执行命令 gradlew.bat _\etc\cas\thekeystore

imx6 LCD 参数配置(lvds为例)_ldb=spl1-程序员宅基地

文章浏览阅读1.4k次。目前imx6的BSP开发中,lvds的参数配置一般在两个地方:uboot的CMDLINE的参数设置,形如:video=mxcfb0:dev=ldb,bpp=32uboot板级代码中对struct display_info_t的配置,形如:static struct display_info_t const displays[] = {{.bus = -1,.addr = ..._ldb=spl1

【计算机组成与体系结构Ⅰ】实验2 数据通路组成实验_数据通路实验-程序员宅基地

文章浏览阅读2.3k次,点赞4次,收藏19次。【计算机组成与体系结构Ⅰ】实验2 数据通路组成实验_数据通路实验

洛谷P1352 没有上司的舞会(树形DP)-程序员宅基地

文章浏览阅读221次。传送门难度[https://www.luogu.com.cn/problem/P1352](https://www.luogu.com.cn/problem/P1352)普及+/提高注:与POJ2342完全相同POJ传送门[http://poj.org/problem?id=2342](http://poj.org/problem?id=2342)..._p1352 没有上司的舞会

蒙鸟云:网站SEO优化上不去?很可能和你的服务器有关!_云优化seo登录不上-程序员宅基地

文章浏览阅读224次。新手站长基本上都会遇到一个难题——为什么我的网站权重不高?为什么我的网站收录太低,甚至没有?大多数站长处理此类问题的解决办法是从网站内链外链、网站标题、关键词、描述语以及网站内容的原创度等等方面去优化,然而他们可能会忽略另一个看似不起眼但也很重要的问题——服务器。服务器是支撑网站运行的基础,所以服务器在网站的优化上也起着至关重要的作用,因此这就要求站长在选择服务器上谨慎又谨慎了。关于服务器的选择,蒙鸟云为大家提供以下一些参考方面。服务器稳定性选择服务器的稳定性决定了网站的访问.._云优化seo登录不上

随便推点

如何解决MTP 驱动更新的问题(手机插上电脑无法显示U盘弹窗)?_mtp驱动-程序员宅基地

文章浏览阅读3.7k次。问题:电脑与平板数据线连接好后,平板已经出现“USB调试设置”,已选择“传输文件”此选项。电脑却一直无法出现此图标。 无法进行把电脑文件复制到平板上的操作。经过多次尝试与信息搜索,最终找到解决方案! 解决方案:第一步,打开平板的“设置”--->开发者选项--->启用USB调试模式进度:此时上图的图标已经能够出现,但是无法显示其内存,即你在电..._mtp驱动

Spring 框架两大核心机制(IoC、AOP)_spring 两大机制-程序员宅基地

文章浏览阅读698次,点赞2次,收藏2次。Spring 框架两大核心机制(IoC、AOP)IoC(控制反转)/ DI(依赖注入)AOP(面向切面编程)Spring 是一个企业级开发框架,是软件设计层面的框架,优势在于可以将应用程序进行分层,开发者可以自主选择组件。MVC:Struts2、Spring MVCORMapping:Hibernate、MyBatis、Spring Data如何使用 IoC创建 Maven 工..._spring 两大机制

基本的图像处理和操作—— Matplotlib_matplotlib根据像素点坐标画的线远端炸开怎么处理-程序员宅基地

文章浏览阅读279次。Matplotlib1.1绘制图像、点、线Matplotlib可以绘制出较好的条形图、饼状图、散点图等.from PIL import Imagefrom pylab import *#读取图像到数组中im = array(Image.open('FatherAndSon.jpg'))#绘制图像imshow(im)#一些点x = [50,50,100,100]y ..._matplotlib根据像素点坐标画的线远端炸开怎么处理

Spring学习笔记(五):控制工厂创建对象次数和生命周期_spring创建对象的生命周期四种分别是-程序员宅基地

文章浏览阅读168次。Spring学习笔记:控制工厂创建对象次数和生命周期1.如何控制简单对象创建次数2.如何控制复杂对象创建次数3.为什么我们要控制对象创建次数4.什么是对象的生命周期1.如何控制简单对象创建次数<bean id="account" scope="singleton|prototype" class="xxxx.Account"/>sigleton:只会创建⼀次简单对象 默认值prototype:每⼀次都会创建新的对象2.如何控制复杂对象创建次数FactoryBean{ isSing_spring创建对象的生命周期四种分别是

CPU L2缓存初探-程序员宅基地

文章浏览阅读2.8k次。CPU L2缓存初探探索目的为了设计高性能的内存数据库,往往要考虑CPU缓存的命中率,查阅资料发现,Intel架构的处理器有3级缓存的设置,其中L1,L2较小,L3较大但被三个核心所公用。在我使用的i7 4712mq中,使用dmidecode查看缓存大小:inszva@inszva-Aspire-E5-572G:~$ sudo dmidecode[sudo] password for inszva

android 连笔记本无线上网,[转载]android手机通过笔记本无线wifi上网-程序员宅基地

文章浏览阅读109次。如何共享WIFI上网?其实这种功能的软件网上有很多,比如联想的闪联任意通,英特尔的MYWIFI等等,但是通常这类软件都对硬件有诸多限制,使用起来并不是十分方便,win7作为微软一个成功系统典范,现在使用已经十分普遍,主要是功能十分强大,有很多意想不到的内在东西在WIN7系统里,比如,方便设置WIN7的无线网卡路由设置,实现共享WIFI上网,下面就分享一下设置过程:1. 以管理员身份运行命令提示符因..._github安卓无线连接电脑

推荐文章

热门文章

相关标签