全部博文(136)
分类: Oracle
2008-05-16 15:05:54
SQL> select username, user_id, default_tablespace from dba_users; USERNAME USER_ID DEFAULT_TABLESPACE ------------ ---------- ----------------------------- hbjb_kf 75 TP_HBJB_KF HBJB_KF 136 TP_HBJB_KF ... 已选择97行。 SQL> |
C:\Documents and Settings\yuechaotian>sqlplus SQL*Plus: Release Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. 请输入用户名: "hbjb_kf"/mypassword@s46 ERROR: ORA-01017: invalid username/password; logon denied 请输入用户名: sys/superpassword@s46 as sysdba 连接到: Oracle9i With the Partitioning, OLAP and Oracle Data Mining options JServer Release SQL> alter user "hbjb_kf" identified by mypassword; 用户已更改。 SQL> conn "hbjb_kf"/mypassword@s46 已连接。 SQL> show user USER 为"hbjb_kf" SQL> select count(*) from user_objects; COUNT(*) ---------- 0 SQL> conn hbjb_kf/mypassword@s46 已连接。 SQL> show user USER 为"HBJB_KF" SQL> select count(*) from user_objects; COUNT(*) ---------- 1650 |
SQL> create user "yuechaotian" identified by test; 用户已创建 SQL> grant connect,resource to "yuechaotian"; 授权成功。 SQL> conn yuechaotian/test@s46; ERROR: ORA-01017: invalid username/password; logon denied SQL> conn "yuechaotian"/test@s46; 已连接。 SQL> show user USER 为"yuechaotian" SQL> |
-- 1. 普通用户 SQL> alter user "yuechaotian" identified by "TeSt"; 用户已更改。 SQL> conn "yuechaotian"/test@s46 已连接。 SQL> conn "yuechaotian"/"test"@s46 已连接。 SQL> conn "yuechaotian"/"tedsfdsfst"@s46 ERROR: ORA-01017: invalid username/password; logon denied 警告: 您不再连接到 ORACLE。 SQL> conn "yuechaotian"/"nopassword"@s46 ERROR: ORA-01017: invalid username/password; logon denied SQL> conn "yuechaotian"/"TEST"@s46 已连接。 SQL>
-- 2. 超级用户 SQL> conn sys/superpassword@s46 as sysdba 用户已更改。 SQL> conn sys/superpassword@s46 as sysdba
|
chinaunix网友2008-05-25 11:08:21
要想删除用户"hbjb_kf",需要用 drop user "hbjb_kf"; 而不是 drop user hbjb_kf; -- 这将删除用户"HBJB_KF"