1. 程式人生 > >sys使用使用者名稱密碼的方式本地登入資料庫伺服器

sys使用使用者名稱密碼的方式本地登入資料庫伺服器

直接使用使用者名稱密碼會報錯

Enter user-name: sys
Enter password: 
ERROR:
ORA-28009: connection as SYS should be as SYSDBA or SYSOPER

正確方法

Enter user-name: sys as sysdba
Enter password: 


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


SQL> 
SQL> 
SQL> 
SQL> show user
USER is "SYS"

有時候需要確認一下sys的密碼,可以這樣登入

一般情況下,還是使用常用的方式

在oracle使用者下

[[email protected] ~]$ sqlplus /nolog


SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 21 10:26:56 2017


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


SQL> conn /as sysdba
Connected.
SQL> show user
USER is "SYS"

無需密碼就能登入