• remote_os_autent实验


    [root@ly003 ~]# su - oracle
    [oracle@ly003 ~]$ sqlplus / as sysdba

    SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 27 08:49:27 2018

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


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

    SQL>
    SQL> show parameter os_au;

    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    os_authent_prefix string ops$
    remote_os_authent boolean FALSE

    SQL> create user ops$xinba identified by oracle;

    User created.
    SQL> grant resource ,connect to ops$xinba;

    Grant succeeded.

    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [oracle@ly003 ~]$ su -
    Password:
    [root@ly003 ~]# useradd -g oinstall -G dba xinba
    [root@ly003 ~]# passwd xinba
    Changing password for user xinba.
    New password:
    BAD PASSWORD: it is based on a dictionary word
    BAD PASSWORD: is too simple
    Retype new password:
    passwd: all authentication tokens updated successfully.
    [root@ly003 ~]# su - xinba
    [xinba@ly003 ~]$ sqlplus /
    -bash: sqlplus: command not found
    [xinba@ly003 ~]$ exit
    logout
    [root@ly003 ~]# scp /home/oracle/.bash_profile /home/xinba/
    [root@ly003 ~]# cd /home/xinba/
    [root@ly003 xinba]# ll
    total 0
    [root@ly003 xinba]# ls -la
    total 32
    drwx------ 4 xinba oinstall 4096 Jun 27 09:08 .
    drwxr-xr-x. 6 root root 4096 Jun 27 09:07 ..
    -rw------- 1 xinba oinstall 15 Jun 27 09:08 .bash_history
    -rw-r--r-- 1 xinba oinstall 18 May 10 2016 .bash_logout
    -rw-r--r-- 1 xinba oinstall 772 Jun 27 09:09 .bash_profile
    -rw-r--r-- 1 xinba oinstall 124 May 10 2016 .bashrc
    drwxr-xr-x 2 xinba oinstall 4096 Nov 11 2010 .gnome2
    drwxr-xr-x 4 xinba oinstall 4096 May 28 22:13 .mozilla
    [root@ly003 xinba]# su - xinba
    [xinba@ly003 ~]$ sqlplus /

    SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 27 09:09:44 2018

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


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

    SQL> quit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [xinba@ly003 ~]$ lsnrctl status

    LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 27-JUN-2018 09:10:08

    Copyright (c) 1991, 2013, Oracle. All rights reserved.

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ly003)(PORT=1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    Linux Error: 111: Connection refused
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    Linux Error: 111: Connection refused
    [xinba@ly003 ~]$ sqlplus /@oracle01:1521/VDEDU

    SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 27 09:10:43 2018

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

    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified


    Enter user-name:
    ERROR:
    ORA-01017: invalid username/password; logon denied
    [xinba@ly003 ~]$ su - oracle
    Password:
    su: incorrect password
    [xinba@ly003 ~]$ sqlplus / as sysdba

    SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 27 09:11:21 2018

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


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

    SQL> show parameter os_au;

    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    os_authent_prefix string ops$
    remote_os_authent boolean FALSE
    SQL> alter system set remote_os_authent=true scope=spfile;

    System altered.
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
    ORACLE instance started.

    Total System Global Area 1603411968 bytes
    Fixed Size 2253664 bytes
    Variable Size 989858976 bytes
    Database Buffers 603979776 bytes
    Redo Buffers 7319552 bytes
    Database mounted.
    Database opened.
    SQL> quit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    [xinba@ly003 ~]$ su - xinba
    Password:
    [xinba@ly003 ~]$ sqlplus / @ly003:1521/VDEDU_ONE

    SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 27 09:35:56 2018

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


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

    SP2-0310: unable to open file "ly003:1521/VDEDU_ONE.sql"
    SQL>

  • 相关阅读:
    Appium + Python自动化
    Appium + python自动化
    基于python的request库,模拟登录csdn博客
    利用uiautomator实现Android移动app启动时间的测试
    JavaScript 闭包
    Vue.js 参考资料汇总
    JVM垃圾回收策略
    JVM内存分配策略
    synchronized底层原理
    HTTPS加密原理
  • 原文地址:https://www.cnblogs.com/xingxingdiandian/p/9238677.html
Copyright © 2020-2023  润新知