创建外部用户_外部表

创建外部用户_外部表

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

[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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Matlab 2016a 安装包及破解教程

    Matlab 2016a 安装包及破解教程Matlab-Matlab2016a安装破解教程本方法只是研究破解技术所用。如果要使用软件还是要用正版的。Matlab2016a安装包及破解教程百度云分享链接: 链接:https://pan.baidu.com/s/1i6BgD8p    密码:17gg Matlab安装教程: 1、下载文件,得到R2016a_win64.part1.rar、R2016a_…

    2022年5月1日
    268
  • 最短路径-Floyd算法的matlab实现.md「建议收藏」

    最短路径-Floyd算法的matlab实现.md「建议收藏」最短路径-Floyd算法的matlab实现​ 弗洛伊德算法是解决任意两点间的最短路径的一种算法,可以正确处理有向图或有向图或负权(但不可存在负权回路)的最短路径问题。​ 在Floyd算法中一般有两个矩阵,一个距离矩阵D,一个路由矩阵R,其中距离矩阵用于存储任意两点之间的最短距离,而路由矩阵则记录任意两点之间的最短路径信息。其思想是:如果可以从一个点进行中转,就进行比较从这个点中转和不中转的距…

    2022年6月22日
    144
  • 如何升级PIP命令

    如何升级PIP命令1、首先使用pipshowpip命令查看当前pip版本;2、升级命令:python-mpipinstall–upgradepip;3、验证升级成功,再次使用pipshowpip命令查看pip版本。

    2022年6月11日
    174
  • 服务器上的MSDTC不可用解决办法[通俗易懂]

    服务器上的MSDTC不可用解决办法[通俗易懂]MSDTC(分布式交易协调器),协调跨多个数据库、消息队列、文件系统等资源管理器的事务。该服务的进程名为Msdtc.exe,该进程调用系统MicrosoftPersonalWebServer和MicrosoftSQLServer。该服务用于管理多个服务器.位置:控制面板--管理工具--服务--DistributedTransactionCoordinator依存关系:R

    2025年7月15日
    4
  • 21位数激活码生成[最新免费获取]「建议收藏」

    (21位数激活码生成)最近有小伙伴私信我,问我这边有没有免费的intellijIdea的激活码,然后我将全栈君台教程分享给他了。激活成功之后他一直表示感谢,哈哈~IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.net/100143.html…

    2022年4月1日
    130
  • 我的大学生活

    我的大学生活

    2021年8月10日
    66

发表回复

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

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