创建外部用户_外部表
[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>
为人:谦逊、激情、博学、审问、慎思、明辨、 笃行
学问:纸上得来终觉浅,绝知此事要躬行
为事:工欲善其事,必先利其器。
态度:道阻且长,行则将至;行而不辍,未来可期
.....................................................................
------- 桃之夭夭,灼灼其华。之子于归,宜其室家。 ---------------
------- 桃之夭夭,有蕡其实。之子于归,宜其家室。 ---------------
------- 桃之夭夭,其叶蓁蓁。之子于归,宜其家人。 ---------------
=====================================================================
* 博客文章部分截图及内容来自于学习的书本及相应培训课程以及网络其他博客,仅做学习讨论之用,不做商业用途。
* 如有侵权,马上联系我,我立马删除对应链接。 * @author Alan -liu * @Email no008@foxmail.com
转载请标注出处! ✧*꧁一品堂.技术学习笔记꧂*✧. ---> https://www.cnblogs.com/ios9/
学问:纸上得来终觉浅,绝知此事要躬行
为事:工欲善其事,必先利其器。
态度:道阻且长,行则将至;行而不辍,未来可期
.....................................................................
------- 桃之夭夭,灼灼其华。之子于归,宜其室家。 ---------------
------- 桃之夭夭,有蕡其实。之子于归,宜其家室。 ---------------
------- 桃之夭夭,其叶蓁蓁。之子于归,宜其家人。 ---------------
=====================================================================
* 博客文章部分截图及内容来自于学习的书本及相应培训课程以及网络其他博客,仅做学习讨论之用,不做商业用途。
* 如有侵权,马上联系我,我立马删除对应链接。 * @author Alan -liu * @Email no008@foxmail.com
转载请标注出处! ✧*꧁一品堂.技术学习笔记꧂*✧. ---> https://www.cnblogs.com/ios9/