sqlplus登陆
sqlplus有幾種登陸方式:
1.C: > sqlplus "/as sysdba" --以操作系統權限認證的oracle sys管理員登陸
2.C: > sqlplus /nolog --不在cmd或者terminal當中暴露密碼的登陸方式 SQL> conn /as sysdba & SQL> conn sys/password as sysdba
3.C: > sqlplus scott/tiger --非管理員用戶登陸
4.C: > sqlplus scott/tiger@orcl --非管理員用戶使用tns別名登陸
5.C: > sqlplus sys/password@orcl as sysdba --管理員用戶使用tns別名登陸
6.C: > sqlplus --不顯露密碼的登陸方式
Enter user-name:sys
Enter password:password as sysdba --以sys用戶登陸的話 必須要加上 as sysdba 子句
但是如果忘記了密碼怎么辦呢,,,我裝oracle的時候就是忘了設置密碼了,搜了一下,果然有方法!
一、忘記除SYS、SYSTEM用戶之外的用戶的登錄密碼。
用SYS (或SYSTEM)用戶登錄。
CONN SYS/PASS_WORD AS SYSDBA;
使用如下語句修改用戶的密碼。
ALTER USER user_name IDENTIFIED BY newpass;
注意:密碼不能全是數字。并且不能是數字開頭。否則會出現:ORA-00988: 口令缺失或無效
二、忘記SYS用戶,或者是SYSTEM用戶的密碼。
如果是忘記SYSTEM用戶的密碼,可以用SYS用戶登錄。然后用ALTER USER 密令
修改密碼。
CONN SYS//PASS_WORD AS SYSDBA;
ALTER USER SYSTEM IDENTIFIED BY newpass;
如果是忘記SYS用戶的密碼,可以用SYSTEM用戶登錄。然后用ALTER USER 密令
修改密碼。
CONN SYSTEM//PASS_WORD ;
ALTER USER SYSTEM IDENTIFIED BY newpass;
三、如果SYS,SYSTEM用戶的密碼都忘記或是丟失。
這一項尤其重要。
??方法一
可以使用ORAPWD.EXE 工具修改密碼。
開始菜單->運行->輸入‘CMD’,打開命令提示符窗口,輸入如下命令:
orapwd file=D:\oracle\product\10.2.0\db_1\database\pwdctcsys.ora
password=newpass
這個命令重新生成了數據庫的密碼文件。密碼文件的位置在ORACLE_HOME目錄下
的\database目錄下。 這個密碼是修改sys用戶的密碼。除sys和system其他用戶的密碼不會改變。
? 方法二
1.如果不記得sys用戶的密碼了,采用如下方法可以修改密碼: (1)打開cmd,輸入sqlplus /nolog,回車。
(2)輸入“conn / as sysdba”;
(3)輸入“alter user sys identified by 新密碼;”(新密碼必須以字母開頭,另外每條SQL語句后得分號不能忘)
其他用戶方式同理
?
2.
(1)在cmd中啟動sqlplus;
(2)用sqlplus/as sysdba登錄,使其連接到:
Oracle?Database? 10g?Express Edition Release?10.2.0.1.0 - Production
(3)執行ALTER USER DBSNMP ACCOUNT UNLOCK;
(4)?從新用SQL/PLUS登錄,設置用戶名、密碼;
?
令附圖表一張:Oracle?10g?默認用戶名/密碼
?
| Username | Password | Description | See Also |
| CTXSYS | CTXSYS | The?Oracle?Text account | Oracle?Text Reference |
| DBSNMP | DBSNMP | The account used by the Management Agent component of?Oracle?Enterprise Manager to monitor and manage the database | Oracle?Enterprise Manager Grid Control Installation and Basic Configuration |
| LBACSYS | LBACSYS | The?Oracle?Label Security administrator account | Oracle?Label Security Administrator's Guide |
| MDDATA | MDDATA | The schema used by?Oracle?Spatial for storing Geocoder and router data | Oracle?Spatial User's Guide and Reference |
| MDSYS | MDSYS | The?Oracle?Spatial and?Oracle?interMedia Locator administrator account | Oracle?Spatial User's Guide and Reference |
| DMSYS | DMSYS | The?Oracle?Data Mining account. | Oracle?Data Mining Administrator's Guide Oracle?Data Mining Concepts |
| OLAPSYS | MANAGER | The account used to create OLAP metadata structures. It owns the OLAP Catalog (CWMLite). | Oracle?OLAP Application Developer's Guide |
| ORDPLUGINS | ORDPLUGINS | The?Oracle?interMedia user. Plug-ins supplied by?Oracle?and third party format plug-ins are installed in this schema. | Oracle?interMedia User's Guide |
| ORDSYS | ORDSYS | The?Oracle?interMedia administrator account | Oracle?interMedia User's Guide |
| OUTLN | OUTLN | The account that supports plan stability. Plan stability enables you to maintain the same execution plans for the same SQL statements. OUTLN acts as a role to centrally manage metadata associated with stored outlines. | Oracle?Database Performance Tuning Guide |
| SI_INFORMTN_SCHEMA | SI_INFORMTN_SCHEMA | The account that stores the information views for the SQL/MM Still Image Standard | Oracle?interMedia User's Guide |
| SYS | CHANGE_ON_INSTALL | The account used to perform database administration tasks | Oracle?Database Administrator's Guide |
| SYSMAN | CHANGE_ON_INSTALL | The account used to perform?Oracle?Enterprise Manager database administration tasks. Note that SYS and SYSTEM can also perform these tasks. | Oracle?Enterprise Manager Grid Control Installation and Basic Configuration |
| SYSTEM | MANAGER | Another account used to perform database administration tasks. |
轉載于:https://www.cnblogs.com/luckythan/p/3411149.html
總結
- 上一篇: 【Linux】Linux 目录结构
- 下一篇: Mahout系列之----共轭梯度预处理