创建外部用户_外部表

创建外部用户_外部表

大家好,又见面了,我是你们的朋友全栈君。

[root@localhost ~]# su - oracle

[oracle@localhost ~]$ sqlplus / as sysdba;

SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 13 22:22:59 2018

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


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

SYS@orcl> select instance_name ,status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
orcl             OPEN

SYS@orcl> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost ~]$ exit
logout

[root@localhost ~]# who am i
root     pts/10       2018-07-13 22:22 (192.168.242.1)
[root@localhost ~]#  useradd oracleexternal
[root@localhost ~]# passwd oracleexternal
Changing password for user oracleexternal.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# su - oracleexternal
[oracleexternal@localhost ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
[oracleexternal@localhost ~]$ vi .bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

export CLASSPATH=$ORACLE_HOME/JRE:ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
~
~
~
~
~
~
".bash_profile" 20L, 479C written
[oracleexternal@localhost ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

export CLASSPATH=$ORACLE_HOME/JRE:ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
[oracleexternal@localhost ~]$  source .bash_profile
[oracleexternal@localhost ~]$ su - oracle
Password:
[oracle@localhost ~]$ rlwrap sqlplus / as sysdba;

SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 13 22:25:45 2018

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


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

SYS@orcl> show parameter os

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_lost_write_protect                string      NONE
diagnostic_dest                      string      /u01/app/oracle
optimizer_index_cost_adj             integer     100
os_authent_prefix                    string      ops$
os_roles                             boolean     FALSE
remote_os_authent                    boolean     FALSE
remote_os_roles                      boolean     FALSE
timed_os_statistics                  integer     0
SYS@orcl> create user ops$oracleexternal identified externally;

User created.

SYS@orcl> grant create session to ops$oracleexternal;

Grant succeeded.

SYS@orcl> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost ~]$ exit
logout

[oracleexternal@localhost ~]$ who am
[oracleexternal@localhost ~]$ whoami
oracleexternal
[oracleexternal@localhost ~]$ sqlplus /

SQL*Plus: Release 11.2.0.3.0 Production on Fri Jul 13 22:27:16 2018

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


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



OPS$ORACLEEXTERNAL@orcl>
OPS$ORACLEEXTERNAL@orcl>  set time on;
22:29:13 OPS$ORACLEEXTERNAL@orcl>

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/107420.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 信息搜集 – 二层发现 arping[通俗易懂]

    信息搜集 – 二层发现 arping[通俗易懂]0x00:简介在被动信息搜集工作完成后,需要在进一步的对目标进行主动信息搜集,这一阶段主要搜索的信息包括目标主机是否存活,上面开放了哪些端口,有哪些服务,服务系统是什么,开发服务的版本以及上面支撑系统运行的一些中间件或者其他软件的版本(后续可根据版本号查看是否有公开的漏洞问题),在目标主机发现的过程中,不仅要发现目标是否存活,还要发现其整个网段下的其他设备,同时,这些其他设备也应该像目标一样搜…

    2022年5月30日
    36
  • zuul网关作用_zuul网关的作用

    zuul网关作用_zuul网关的作用Zuul网关使用步骤1.在父项目中导入依赖SpringCloud管理<dependencyManagement><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies&

    2022年8月15日
    1
  • linux aria2配置(linux下安装windows)

    系统要求CentOS7+/Debian6+/Ubuntu14.04+推荐Debian7x64,这个是我一直使用的系统,我的脚本在这个系统上面出错率最低。注意:本脚本只是安装Aria2后端,安装后默认会启动,但是还需要前端面板配合使用,如Aria2WebUI或AriaNG,教程看这里:https://doub.bid/all-one/#BT、磁力链接下载相关教程注意…

    2022年4月14日
    85
  • 配置JAVA的环境变量「建议收藏」

    配置JAVA的环境变量「建议收藏」配置JAVA的环境变量为什么配置path?希望在命令行使用javac.exe等工具时,任意目录下都可以找到这个工具所在的目录。例如:我们在C:\Users\Irene目录下使用java命令,结果如下:我们在JDK的安装目录的bin目录下使用java命令,结果如下:我们不可能每次使用java.exe,javac.exe等工具的时候都进入到JDK的安装目录下,太麻烦了。我们希望在任意目录下都可以使用JDK的bin目录的开发工具,因此我们需要告诉操作系统去哪里找这些开发工具,这就需要配置path环境

    2022年5月4日
    57
  • Eclipse调试程序

    Eclipse调试程序

    2021年8月20日
    46
  • CICD – docker私有仓库

    CICD – docker私有仓库1、创建私有仓库dockerpullregistrydockerrun-d-v/opt/registory:/var/lib/registory-p5000:5000–restart=always–nameregistryregistry2、查看私有仓库curlhttp://47.99.211.128:5000/v2/_catalog#域名解析后…

    2022年5月10日
    38

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号