oracle 如何查看当前用户的表空间名称
如何查询当前用户的表空间名称?因为oracle建立索引,需要知道当前用户的表空间,查找了一下资料
--查询语法--
select default_tablespace from dba_users where username='登录用户'
如,我的登录用户是TMS21,那么查询语法是
/* 查看用户所属的表空间 */
select default_tablespace from dba_users where username='TMS21';
相关查询的用法,也顺便记录一下
1)查询当前用户表空间
/* 查看用户所属的表空间 */
select default_tablespace from dba_users where username='TMS21';
2)查询所有表空间
/*查看所有的表空间 */
-- 1 )方式1:dba_tablespaces --
select * from dba_tablespaces;
--2 )方式2:v$tablespace --
select * from v$tablespace;
3)查询用户下所有表
/* 查看用户下面的所有的表 */
-- 1 )方式1:user_tables --
select * from user_tables;
--2 )方式2: dba_tables --
select * from dba_tables where owner='TMS21';
4)查询表空间下的用户
/*查看表空间下有多少用户,tablespace_name表空间 的名字一定要大写 */
select distinct s.owner from dba_segments s where s.tablespace_name ='TMS21';
PS:因为我的表空间名称跟用户一样,所以4)中的表空间都是TMS21(以查询结果为主)
资料来源:https://blog.csdn.net/qq_26941173/article/details/77155421
oracle 如何查看当前用户的表空间名称的更多相关文章
- oracle 表空间及查看所有用户的表空间
用户有默认表空间,但是只能指定一个,但是你有其它表空间的限额的话,可以将表建到其它表空间中. 语法 create table xxx(xxxx xx) tablespace xxxxx 1.查看当前用 ...
- Oracle创建,删除用户与表空间
1.创建表空间与用户 a:创建数据表空间 create tablespace user_data logging datafile 'D:\oracle\product\10.2.0\oradata\ ...
- oracle常用SQL——创建用户、表空间、授权(12C)
一.查询 查询用户所属 表空间 select username,default_tablespace from dba_users where username='xxx' 查询表空间情况 SELEC ...
- Oracle查看用户所在表空间
查看当前用户所在表空间 select username,default_tablespace from user_users; 修改用户默认表空间 alter user 用户名 default tab ...
- oracle创建用户、表空间、临时表空间、分配权限步骤详解
首先登陆管理员账号,或者有DBA权限的用户,接下来依次: --查询所有用户select * from dba_users;--创建新用户create user gpmgt identified by ...
- ORACLE创建表空间、创建用户、更改用户默认表空间以及授权、查看权限
Oracle创建用户.表空间.导入导出....命令 //创建临时表空间 create temporary tablespace ext_temptempfile 'D:\oracle\product\ ...
- (总结)Oracle 11g常用管理命令(用户、表空间、权限)
1.启动oracle数据库: 从root切换到oracle用户进入:su - oracle 进入sqlplus环境,nolog参数表示不登录:sqlplus /nolog 以管理员模式登录:sqlpl ...
- Oracl数据库管理方面的资料(查询sga,查看oracle数据库名称sid,查看oracle数据库名称,查看表空间,修改表空间名称)
显示Oracle sga相关信息: SQL> show sga Total System Global Area 105978600 bytes Fixed Size 453352 bytes ...
- oracle学习笔记(一) oracle 体系结构简单介绍以及创建表空间和用户
体系结构 oracle数据服务器由oracle数据库和实例组成 实例由后台进程和内存结构组成 内存结构由共享池,数据缓冲区,日志缓存区 Oracle数据库是通过表空间来存储物理表的,一个数据库实例可以 ...
随机推荐
- .NET 使用中文编码
在.Net Core中默认System.Text中不支持CodePagesEncodingProvider.Instance, System.Text.Encoding.CodePages.dll允许 ...
- 小程序模板template
WXML提供模板(template),可以在模板中定义代码片段,然后在不同的地方调用. 定义模板 使用 name 属性,作为模板的名字.然后在<template/>内定义代码片段,如: & ...
- Reversion Count
字符串基础用法题,包含有大数减法大数除法模板,不难理解,代码如下: #include<stdio.h> #include<string.h> #include<strin ...
- ABP捕捉异常错误代码
在服务层或者CORE层 随便哪里都可以 创建一个捕捉异常的文件夹 里面写一个LonsidException类 继承后面的接口 然后重写继承的方法 这样在ABP项目运行阶段 无论在哪里出现异 ...
- QT5 解决QSqlDatabase: QMYSQL driver not loaded 问题
QT版本 Qt 5.12.0 MySQL版本 8.0.13 转到MySQL的安装目录 G:\mysql-8.0.13-winx64\mysql-8.0.13-winx64\lib 将安装目录下的两个文 ...
- 阿里云域名+github建立网站
1.准备工作 ①购买一个阿里云域名,这里测试的域名为 www.cores.vip ②创建一个github账号 (注意:一个github账号只能建立一个username.github.io的网站,不能建 ...
- 目前用到的一些os.path方法
这里主要记录下os.path.join()的用法 目录结构如下 在readconfig.py中进行试验,如下 1.使用os.path.realpath(__file__)获取文件所在目录 import ...
- 【调试】Idea如何远程debug之SpringBoot jar包启动
一.Java -jar启动添加如下参数 -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address= -Xdebug是通知JVM工 ...
- liunx之用户管理
用户管理 ==============================================================groupadd,groupdeluseradd,usermod, ...
- Confluence 6 指派和撤销空间权限
指派空间权限 希望添加一个新用户或者用户组到权限列表中,从希望选择的选项中查找用户组或者用户,然后选择 添加(Add).用户和用户组将会显示在列表中:选择你希望引用的权限,然后选择 保存所有(Save ...