Chinaunix首页 | 论坛 | 博客
  • 博客访问: 929989
  • 博文数量: 358
  • 博客积分: 8185
  • 博客等级: 中将
  • 技术积分: 3751
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:27
个人简介

The views and opinions expressed all for my own,only for study and test, not reflect the views of Any Company and its affiliates.

文章分类

全部博文(358)

文章存档

2012年(8)

2011年(18)

2010年(50)

2009年(218)

2008年(64)

我的朋友

分类: Oracle

2009-08-18 22:21:26


1.
①The remote REMOTE_LOGIN_PASSWORDFILE instance parameter controls whether
it is possible to connect to the instance as a user with the SYSDBA privilege over the network.
v$pwfile_users shows you which users have their passwords entered in the password file, and whether they have the SYSOPER privilege, the SYSDBA privilege, or both.
SQL> show parameter remote_login_

NAME                                 TYPE      VALUE
------------------------------------ --------- ---------
remote_login_passwordfile            string    EXCLUSIVE
SQL> select * from v$PWFILE_USERS;

USERNAME               SYSDBA     SYSOPER
--------------------- ---------- --------
SYS                    TRUE       TRUE

2.增加一个可以sysdba身份远程连接数据库的用户
SQL> conn sys/gaudi@gaudi100 as sysdba
已连接。
SQL> grant sysdba to gau001 identified by gaudi;
授权成功。
SQL> conn gau001/gaudi@gaudi100 as sysdba
已连接。
SQL> select * from v$pwfile_users;

USERNAME   SYSDBA     SYSOPER
---------- ---------- ----------
SYS        TRUE       TRUE
GAU001     TRUE       FALSE

3.修改参数,禁止sysdba身份远程连接数据库
①Windows:
SQL> show user;
USER 为 "SYS"
SQL> alter system set remote_login_passwordfile=none scope=spfile;

系统已更改。

SQL> show parameter remote_login_

NAME                                 TYPE      VALUE
------------------------------------ --------- -------------------
remote_login_passwordfile            string    EXCLUSIVE
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> conn sys/gaudi@gaudi100 as sysdba
已连接到空闲例程。
SQL> startup
ORA-01031: insufficient privileges
②Linux:
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area  385875968 bytes
Fixed Size                  1219568 bytes
Variable Size             121635856 bytes
Database Buffers          260046848 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL> show parameter remote_login_

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile            string      NONE
③Windows:
SQL> conn sys/gaudi@gaudi100 as sysdba
ERROR:
ORA-01017: invalid username/password; logon denied

警告: 您不再连接到 ORACLE。

4.重新修改参数REMOTE_LOGIN_PASSWORDFILE,远程开启数据库
 ①Linux
SQL> alter system set remote_login_passwordfile=EXCLUSIVE scope=spfile;

System altered.

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
 ②Windows:
SQL> conn sys/gaudi@gaudi100 as sysdba
已连接到空闲例程。
SQL> startup
ORACLE 例程已经启动。

Total System Global Area  385875968 bytes
Fixed Size                  1219568 bytes
Variable Size             125830160 bytes
Database Buffers          255852544 bytes
Redo Buffers                2973696 bytes
数据库装载完毕。
数据库已经打开。
SQL>

阅读(3532) | 评论(0) | 转发(0) |
0

上一篇:5.調査結果報告

下一篇:join (+)

给主人留下些什么吧!~~