亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 數據庫 > Oracle > 正文

講解Oracle數據庫的sysdba權限登錄問題

2024-08-29 13:52:53
字體:
來源:轉載
供稿:網友
sysdba權限的登錄測試:

數據庫用sysdba登錄的驗證有兩種方式,一種是通過os認證,一種是通過密碼文件驗證;登錄方式有兩種,一種是在數據庫主機直接登錄(用os認證的方式),一種是通過網絡遠程登錄;需要設置的參數有兩個,一個是SQLNET.AUTHENTICATION_SERVICES,一個是REMOTE_LOGIN_PASSWordFILE。

os認證:假如啟用了os認證,以sysdba登錄,那么只需要使用Oracle軟件的安裝用戶就能登錄:sqlplus “/ as sysdba”。如果我們要禁用os認證,只利用密碼文件登錄,我們首先要有一個密碼文件:

D:/oracle/ora92/database>orapwd file=PWDoralocal.ora password=mypassword entries=10;

D:/oracle/ora92/database>

然后我們要把$ORACLE_HOME/network/admin/sqlnet.ora中設置:

SQLNET.AUTHENTICATION_SERVICES= none

大家需要注意,密碼文件只在數據庫啟動的時候加載進去,一旦加載進去,密碼文件就脫離了oracle管理,所以在你使用orapwd新建密碼文件后,里面指定的密碼需要在數據重啟后才能發生作用:

D:/oracle/ora92/database>sqlplus "sys/mypassword as sysdba"

SQL*Plus: Release 9.2.0.1.0 - PRoduction on Fri May 16 21:59:42 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:

ORA-01031: insufficient privileges

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

### 這里我們通過改SQLNET.AUTHENTICATION_SERVICES= (NTS)用os認證登錄數據庫:

sys@ORALOCAL(192.168.50.29)> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

sys@ORALOCAL(192.168.50.29)>

sys@ORALOCAL(192.168.50.29)>

sys@ORALOCAL(192.168.50.29)>

sys@ORALOCAL(192.168.50.29)> startup

ORACLE instance started.

Total System Global Area 135338868 bytes

Fixed Size 453492 bytes

Variable Size 109051904 bytes

Database Buffers 25165824 bytes

Redo Buffers 667648 bytes

Database mounted.

Database opened.

sys@ORALOCAL(192.168.50.29)>

sys@ORALOCAL(192.168.50.29)>

sys@ORALOCAL(192.168.50.29)>

sys@ORALOCAL(192.168.50.29)> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

D:/oracle/ora92/database>

D:/oracle/ora92/database>

D:/oracle/ora92/database>

### 我們把SQLNET.AUTHENTICATION_SERVICES= (NTS)改回去。

D:/oracle/ora92/database>sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Fri May 16 22:03:59 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:

ORA-01031: insufficient privileges

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

D:/oracle/ora92/database>

D:/oracle/ora92/database>

D:/oracle/ora92/database>

D:/oracle/ora92/database>sqlplus "sys/mypassword as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Fri May 16 22:04:07 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

sys@ORALOCAL(192.168.50.29)> exit

在這里,我們看到這個新改的密碼要數據庫重啟后加載才生效。同時我們看到,用os認證是無法登錄的,但是通過網絡(用@sid)是可以登錄。

D:/oracle/ora92/database>sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 00:58:32 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:

ORA-01031: insufficient privileges

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

D:/oracle/ora92/database>

D:/oracle/ora92/database>sqlplus "sys/mypassword as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 00:59:15 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

sys@ORALOCAL(192.168.50.29)>

sys@ORALOCAL(192.168.50.29)>

sys@ORALOCAL(192.168.50.29)> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

D:/oracle/ora92/database>sqlplus "sys/mypassword@oralocal as sysdba"

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 00:59:38 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

sys@ORALOCAL(192.168.50.29)>

至此,我們已經實現不用os認證(sqlplus “/ as sysdba”的方式登錄不了)。那么我們怎么限制網絡方面利用sysdba遠程登錄呢?我們可以設置初始化文件中的REMOTE_LOGIN_PASSWORDFILE=none。

注意,當REMOTE_LOGIN_PASSWORDFILE=none時,這個參數生效需要重啟數據庫,并且,一旦啟用這個參數,將使用操作系統認證,不使用口令文件。因此如果REMOTE_LOGIN_PASSWORDFILE=none且SQLNET.AUTHENTICATION_SERVICES= none這個時候數據庫是無法登錄的。

[coolcode lang=”sql” linenum=”off”]

D:/oracle/ora92/database>sqlplus “sys/change_on_install as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 01:28:58 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

sys@ORALOCAL(192.168.50.29)> show parameter remote_login

NAME TYPE VALUE

———————————— ———– ——————————

remote_login_passwordfile string EXCLUSIVE

sys@ORALOCAL(192.168.50.29)> alter system set remote_login_passwordfile=none scope=spfile;

System altered.

Elapsed: 00:00:00.01

sys@ORALOCAL(192.168.50.29)> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

sys@ORALOCAL(192.168.50.29)> startup

ORA-01031: insufficient privileges

sys@ORALOCAL(192.168.50.29)>exit

C:/Documents and Settings/Administrator>sqlplus “/ as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 08:26:43 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:

ORA-01031: insufficient privileges

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

C:/Documents and Settings/Administrator>sqlplus “sys/change_on_install as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 08:26:53 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

C:/Documents and Settings/Administrator>

C:/Documents and Settings/Administrator>sqlplus “sys/change_on_install@oralocal as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 08:27:03 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

C:/Documents and Settings/Administrator>

[coolcode]

這里我們看到由于啟用了REMOTE_LOGIN_PASSWORDFILE=none,使用os認證,不用密碼文件認證,必須將SQLNET.AUTHENTICATION_SERVICES= none取消,不然是無法登錄。我們改成SQLNET.AUTHENTICATION_SERVICES= (NTS)后再次測試。

[coolcode lang=”sql” linenum=”off”]

### 非oracle軟件安裝軟件用戶:###

C:/Documents and Settings/hejianmin>sqlplus “/ as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 20:15:13 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:

ORA-01031: insufficient privileges

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

C:/Documents and Settings/hejianmin>

C:/Documents and Settings/hejianmin>sqlplus “sys/change_on_install as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 20:15:30 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:

ORA-01031: insufficient privileges

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

C:/Documents and Settings/hejianmin>

C:/Documents and Settings/hejianmin>sqlplus “sys/change_on_install@oralocal as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 20:15:42 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:

ORA-01031: insufficient privileges

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

C:/Documents and Settings/hejianmin>

### oracle 軟件安裝用戶 ####

C:/Documents and Settings/Administrator>sqlplus “/ as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on 星期六 5月 17 20:19:13 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

連接到:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

sys@ORALOCAL(192.168.0.29)> exit

從Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production中斷開

C:/Documents and Settings/Administrator>sqlplus “sys/change_on_install as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on 星期六 5月 17 20:19:33 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

連接到:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

sys@ORALOCAL(192.168.0.29)> exit

從Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production中斷開

C:/Documents and Settings/Administrator>sqlplus “sys/change_on_install@oralocal as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on 星期六 5月 17 20:19:45 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

連接到:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

sys@ORALOCAL(192.168.0.29)> exit

從Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production中斷開

C:/Documents and Settings/Administrator>sqlplus “11/22 as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on 星期六 5月 17 20:19:58 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

連接到:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

sys@ORALOCAL(192.168.0.29)>

[/coolcode]

在這里我們看到由于用了os認證,在oracle安裝用戶下,無論用什么方式都能登錄。非oracle用戶無論用什么用戶都無法登錄。

如果REMOTE_LOGIN_PASSWORDFILE=exclusive且SQLNET.AUTHENTICATION_SERVICES= none時:

[coolcode lang=”sql” linenum=”off”]

C:/Documents and Settings/Administrator>sqlplus “sys/change_on_install as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 20:30:57 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:

Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

sys@ORALOCAL(192.168.0.29)> exit

Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

With the Partitioning, OLAP and Oracle Data Mining options

JServer Release 9.2.0.1.0 - Production

C:/Documents and Settings/Administrator>

C:/Documents and Settings/Administrator>sqlplus “/ as sysdba”

SQL*Plus: Release 9.2.0.1.0 - Production on Sat May 17 20:31:04 2008

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:

ORA-01031: insufficient privileges

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

Enter user-name:

ERROR:

ORA-01017: invalid username/password; logon denied

SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

C:/Documents and Settings/Administrator>

C:/Documents and Settings/Administrator>

[/coolcode]

結論:

(1)REMOTE_LOGIN_PASSWORDFILE=none且SQLNET.AUTHENTICATION_SERVICES= none:

oracle安裝用戶本地sqlplus “/ as sysdba”無法登錄

非oracle安裝用戶本機sqlplus “sys/change_on_install as sysdba”無法登錄

非oracle安裝用戶遠程sqlplus “/ as sysdba_on_install@sid as sysdba”無法登錄

(2)REMOTE_LOGIN_PASSWORDFILE=exclusive且SQLNET.AUTHENTICATION_SERVICES= none:

oracle安裝用戶本地sqlplus “/ as sysdba”無法登錄

非oracle安裝用戶本機sqlplus “sys/change_on_install as sysdba”能登錄

非oracle安裝用戶遠程sqlplus “/ as sysdba_on_install@sid as sysdba”能登錄

(3)REMOTE_LOGIN_PASSWORDFILE=none且SQLNET.AUTHENTICATION_SERVICES= (NTS):

oracle安裝用戶本地sqlplus “/ as sysdba”能登錄

非oracle安裝用戶本機sqlplus “sys/change_on_install as sysdba”無法登錄

非oracle安裝用戶遠程sqlplus “/ as sysdba_on_install@sid as sysdba”無法登錄

(4)REMOTE_LOGIN_PASSWORDFILE=exclusive且SQLNET.AUTHENTICATION_SERVICES= (NTS):

oracle安裝用戶本地sqlplus “/ as sysdba”能登錄

非oracle安裝用戶本機sqlplus “sys/change_on_install as sysdba”能登錄

非oracle安裝用戶遠程sqlplus “/ as sysdba_on_install@sid as sysdba”能登錄


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
欧美精品免费播放| 成人久久久久久久| 欧美激情乱人伦| 亚洲国产精品va在线| 国产精品伦子伦免费视频| 这里只有精品视频在线| 98午夜经典影视| 亚洲成人久久网| 久久午夜a级毛片| 97在线日本国产| 日韩欧美综合在线视频| 亚洲在线观看视频网站| 成人有码在线视频| www.欧美三级电影.com| 欧美激情图片区| 国产精品9999| 国产精品爽爽爽爽爽爽在线观看| 欧美第一黄网免费网站| 欧美在线一级va免费观看| 国产日韩精品入口| 日韩免费视频在线观看| 国产精品黄页免费高清在线观看| 亚洲高清在线观看| 日本老师69xxx| 97久久精品人搡人人玩| 国产剧情久久久久久| 欧美日韩免费网站| 欧美在线免费看| 亚洲精品视频播放| 91国在线精品国内播放| 日韩免费高清在线观看| 国产精品视频网站| 不卡av在线网站| 亚洲一区亚洲二区| 成人精品视频99在线观看免费| 国产成人小视频在线观看| 综合国产在线视频| 亚洲国产精彩中文乱码av在线播放| 91天堂在线观看| 最近2019中文字幕mv免费看| 日韩精品在线私人| 国产视频精品免费播放| 国产在线999| 国产视频在线一区二区| 久久精品国产成人| 国产精品久久久久不卡| 国产精品久久久久久久久久三级| 视频在线观看99| 亚洲精品欧美极品| 日韩免费中文字幕| 成人在线中文字幕| 2019av中文字幕| 亚洲国产精品久久精品怡红院| 成人久久一区二区三区| 欧美成人激情视频| 欧美壮男野外gaytube| 欧美激情免费观看| 国产精品99久久99久久久二8| 欧美www视频在线观看| 91精品国产高清自在线看超| xxxx欧美18另类的高清| 欧美精品久久一区二区| 欧美日韩中文在线| 在线精品国产欧美| 国产成人精品av在线| 日韩av一区二区在线观看| 欧美精品久久久久久久久久| 久久精品亚洲精品| 国产精品igao视频| 国产成人精品视频在线| 国产成+人+综合+亚洲欧美丁香花| 欧美日本高清视频| 国产一区二区三区在线看| 欧美在线不卡区| 国产成人黄色av| 国产免费久久av| 亚洲国产精品悠悠久久琪琪| 国产一区二区在线免费| 日韩在线精品视频| 日本成人精品在线| 中文字幕亚洲综合久久筱田步美| 亚洲欧美日韩爽爽影院| 国产一区二区三区免费视频| 欧美亚洲日本网站| 中日韩午夜理伦电影免费| 97视频免费在线观看| 亚洲激情 国产| 日本一区二区在线播放| 亚洲人成伊人成综合网久久久| 国产精品第100页| 91久久精品日日躁夜夜躁国产| 91九色视频在线| 97精品伊人久久久大香线蕉| 成人精品福利视频| 欧美国产日韩二区| 成人黄色片在线| 久久精彩免费视频| 亚洲精品一区二区在线| 国产视频精品xxxx| 欧美日韩性生活视频| 亚洲精品一区中文字幕乱码| 亚洲国产欧美一区二区丝袜黑人| 尤物精品国产第一福利三区| 亚洲精品一区中文字幕乱码| 亚洲va久久久噜噜噜久久天堂| www.亚洲一二| 欧美亚洲成人免费| 欧美极品少妇xxxxⅹ喷水| 欧美洲成人男女午夜视频| 亚洲自拍偷拍网址| 精品国产福利在线| 亚洲美腿欧美激情另类| 日韩av不卡电影| 成人黄色中文字幕| 亚洲成人动漫在线播放| 成人精品一区二区三区电影黑人| 亚洲国产精品一区二区三区| 日韩中文字幕久久| 久久久国产精彩视频美女艺术照福利| 亚洲免费成人av电影| 岛国av一区二区| 午夜精品一区二区三区在线视| 久久久久久久久久亚洲| 日韩欧美成人网| 亚洲一级黄色片| 黑人精品xxx一区| 亚洲九九九在线观看| 最近2019年日本中文免费字幕| 日韩精品中文字幕视频在线| 国产乱肥老妇国产一区二| 色悠久久久久综合先锋影音下载| 精品欧美一区二区三区| 成人精品一区二区三区电影黑人| 久久久人成影片一区二区三区观看| 麻豆成人在线看| 欧美日韩亚洲天堂| 热久久免费视频精品| 亚洲欧美国产高清va在线播| 91免费看视频.| 日本国产欧美一区二区三区| 国产丝袜一区二区三区免费视频| 91久久久国产精品| 亚洲人成电影在线观看天堂色| 波霸ol色综合久久| 国产97在线亚洲| 欧美精品18videos性欧美| 国产精品国产亚洲伊人久久| 日韩少妇与小伙激情| 久久久精品影院| 欧美日韩精品在线| 久久中国妇女中文字幕| 粉嫩av一区二区三区免费野| 欧美成人免费大片| 久久久精品久久久久| 欧美日韩精品在线观看| 美乳少妇欧美精品| 亚洲欧洲av一区二区| 2018国产精品视频| 日韩理论片久久| 亚洲精品福利在线观看| 欧美午夜性色大片在线观看| 亚洲第一福利在线观看| 精品久久香蕉国产线看观看亚洲| 中文字幕综合在线|