博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
oracle11g修改用户名
阅读量:2042 次
发布时间:2019-04-28

本文共 2334 字,大约阅读时间需要 7 分钟。

20:42:14 SQL> select user#,name from user$;

     USER# NAME

---------- ------------------------------
         0 SYS
......
        96 JYC
        97 TEST

88 rows selected.

20:44:36 SQL> update user$ set name='JYC' where user#=97;

update user$ set name='JYC' where user#=97
*
ERROR at line 1:
ORA-00001: unique constraint (SYS.I_USER1) violated

20:45:11 SQL> update user$ set name='JYC1' where user#=97;

1 row updated.

20:45:28 SQL> update user$ set name='TEST' where user#=96;

1 row updated.

20:45:38 SQL> update user$ set name='JYC' where user#=97;

1 row updated.

20:45:47 SQL> commit;

Commit complete.

20:45:50 SQL> select user#,name from user$;

     USER# NAME

---------- ------------------------------
         0 SYS

......

        83 SCOTT

        96 TEST
        97 JYC

88 rows selected.

20:45:57 SQL> alter system checkpoint;

System altered.

20:46:05 SQL> alter system flush shared_pool;

System altered.

20:46:15 SQL> conn jyc/jyc

ERROR:
ORA-01017: invalid username/password; logon denied

Warning: You are no longer connected to ORACLE.
20:46:33 SQL> conn jyc/test
Connected.
20:46:38 SQL> conn test/jyc
Connected.
20:46:43 SQL> conn /as sysdba
Connected.

20:46:56 SQL> alter user jyc identified by jyc;

User altered.

20:47:01 SQL> alter user test identified by test;

User altered.

20:47:07 SQL> select count(*) from jyc.a;

  COUNT(*)

----------
       496

20:47:22 SQL> select count(*) from jyc.b;

  COUNT(*)

----------
        64

20:47:25 SQL> select count(*) from test.b;

  COUNT(*)

----------
         1

20:47:28 SQL> select count(*) from test.a;

  COUNT(*)

----------
        31

20:47:30 SQL> shutdown immediate

Database closed.
Database dismounted.
ORACLE instance shut down.
20:47:55 SQL> startup
ORACLE instance started.

Total System Global Area 2455228416 bytes

Fixed Size                  2255712 bytes
Variable Size             654312608 bytes
Database Buffers         1778384896 bytes
Redo Buffers               20275200 bytes
Database mounted.
Database opened.
20:48:02 SQL> select count(*) from jyc.a;

  COUNT(*)

----------
       496

20:48:10 SQL> select count(*) from jyc.b;

  COUNT(*)

----------
        64

20:48:13 SQL> conn jyc/jyc

Connected.
20:48:17 SQL> create table c as select * from a;

Table created.

20:48:26 SQL> select count(*) from c;

  COUNT(*)

----------
       496

20:48:32 SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@saperp ~]$ 

相关参考:

转载地址:http://pcsof.baihongyu.com/

你可能感兴趣的文章
(1129) Recommendation System 排序
查看>>
PAT1090 Highest Price in Supply Chain 树DFS
查看>>
(PAT 1096) Consecutive Factors (质因子分解)
查看>>
(PAT 1019) General Palindromic Number (进制转换)
查看>>
(PAT 1073) Scientific Notation (字符串模拟题)
查看>>
(PAT 1080) Graduate Admission (排序)
查看>>
Tree UVA - 548 (DFS+建立二叉树)
查看>>
Play on Words UVA - 10129 (欧拉路径)
查看>>
mininet+floodlight搭建sdn环境并创建简答topo
查看>>
(计蒜客) 取石子游戏 (gcd算法灵活运用)
查看>>
Prime Path POJ - 3126 (BFS,素数距离)
查看>>
Wireless Network POJ - 2236 (并查集)
查看>>
【javascript】手写bind函数
查看>>
Kube-state-metrics的collectors配置
查看>>
使用Vmware装虚拟机Ubuntu
查看>>
【java】异常处理及捕获的理解
查看>>
【Java】继承知识点总结
查看>>
【Linux】什么是链接文件及其分类
查看>>
【UML】《Theach yourself uml in 24hours》——hour2&hour3
查看>>
【linux】nohup和&的作用
查看>>