创建外部用户_外部表

Posted ios9

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了创建外部用户_外部表相关的知识,希望对你有一定的参考价值。



[[email protected] ~]# su - oracle

[[email protected] ~]$ 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

[email protected]> select instance_name ,status from v$instance;

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

[email protected]> 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
[[email protected] ~]$ exit
logout

[[email protected] ~]# who am i
root     pts/10       2018-07-13 22:22 (192.168.242.1)
[[email protected] ~]#  useradd oracleexternal
[[email protected] ~]# passwd oracleexternal
Changing password for user oracleexternal.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[[email protected] ~]# su - oracleexternal
[[email protected] ~]$ 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
[[email protected] ~]$ 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
[[email protected] ~]$ 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
[[email protected] ~]$  source .bash_profile
[[email protected] ~]$ su - oracle
Password:
[[email protected] ~]$ 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

[email protected]> 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
[email protected]> create user ops$oracleexternal identified externally;

User created.

[email protected]> grant create session to ops$oracleexternal;

Grant succeeded.

[email protected]> 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
[[email protected] ~]$ exit
logout

[[email protected] ~]$ who am
[[email protected] ~]$ whoami
oracleexternal
[[email protected] ~]$ 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



[email protected]>
[email protected]>  set time on;
22:29:13 [email protected]>


以上是关于创建外部用户_外部表的主要内容,如果未能解决你的问题,请参考以下文章

android:当用户触摸片段外部时,我如何关闭片段?

Hive - 从三个外部表创建一个内部表

Oracle 创建外部表

Hive - 每个日期选择不同的唯一 ID,无需创建外部表或使用 JOINS

外部样式表不会覆盖引导程序

从分区文件结构创建 Impala 外部表