创建外部用户_外部表

创建外部用户_外部表

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

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

相关推荐

  • 10种不同画法画平行线怎么画_六边形有几种画法

    10种不同画法画平行线怎么画_六边形有几种画法。1.趋势线:趋势线分快速、中速、慢速,趋势的画法为:上升(下降)趋势线是以向上(下)走势中的低点(高点)与低点(高点)的连线。其中时间跨度越长所构成的支撑作用也越强,而趋势线与K线相交的点位越多,趋势线形成的支撑作用也越强。2.水平线:用前期低点画线,构成再度回落的支撑作用,或者前期低点在后期颇为下跌后再度上升将形成阻力作用。水平线有构成阻力和支撑作用。水平线的画法,一般是用K线实体高点或低点画…

    2022年9月20日
  • GridLayout网格式布局

    GridLayout网格式布局1.设置网格的列数。gridLayout.numColumns=3;//设置网格的列数为3,默认是1importorg.eclipse.swt.SWT;importorg.eclipse.swt.widgets.*;importorg.eclipse.swt.layout.*;publicclassA{ publicstaticvoidmain(String[]…

    2022年6月10日
  • sqlserver数据库置疑修复语句_sql2008数据库可疑解决方法

    sqlserver数据库置疑修复语句_sql2008数据库可疑解决方法SQL数据库修复的三大核心技术:1、磁盘阵列分析重组技术;2、数据库恢复与修复技术;3、SCSI盘物理故障开盘技术。至今已经成功恢复数百台服务器的SQL数据库,用户覆盖全国。导致SQL数据库丢失的原因:1、各种原因:误删除、误格式化、断电等造成的MSSQLSERVER数据库文件破坏。2、MSSQLSERVER数据库丢失了*.ldf文件,只有一个*.MDF文件,将是非

    2022年8月20日
  • java calendar计算时间差_Java Calendar 计算时间差

    java calendar计算时间差_Java Calendar 计算时间差publicstaticvoidmain(String[]args){Calendarc=Calendar.getInstance();inty=2016;//年intM=1;//月intd=1;//日intH=0;//时intm=0;//分ints=0;//秒c.set(Calendar.YEAR,y);c.set(Calendar.MONTH,M-1);c.set(…

    2022年6月5日
  • git常用命令汇总

    git常用命令汇总

    2021年9月18日
  • C#操作 word代码

    推荐:http://www.cnblogs.com/roucheng/p/3521864.html

    2021年12月26日

发表回复

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

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