在Oracle
記錄如下
——用alter語句這種修改方法
alter database rename global_name to ORCL
——用alter語句這種修改方法
alter database rename global_name to ORCL
——用update語句這種修改方法
update global_name set global_name=
Microsoft Windows [版本
(C) 版權所有
C
SQL*Plus
Copyright (c)
連接到
Oracle Database
With the Partitioning
SQL> show parameter global_name
NAME TYPE VALUE
global_names boolean FALSE
SQL> show parameter global_name
NAME TYPE VALUE
global_names boolean FALSE
SQL> select * from global_name
GLOBAL_NAME
ORCL
SQL> alter database rename global_name to ORCL
數據庫已更改
SQL> select * from global_name
GLOBAL_NAME
ORCL
SQL> shutdown immediate
數據庫已經關閉
已經卸載數據庫
ORACLE 例程已經關閉
SQL> startup
ORACLE 例程已經啟動
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
數據庫裝載完畢
數據庫已經打開
SQL> select * from global_name
GLOBAL_NAME
ORCL
SQL> alter database rename global_name to ORCL
數據庫已更改
SQL> select * from global_name
GLOBAL_NAME
ORCL
SQL> alter database rename global_name to ORCL
數據庫已更改
SQL> select * from global_name
GLOBAL_NAME
ORCL
SQL> update global_name set global_name=
已更新
SQL> select * from global_name
GLOBAL_NAME
ORCL
SQL> select * from global_name
GLOBAL_NAME
ORCL
SQL> commit
提交完成
SQL> shutdown immediate
數據庫已經關閉
已經卸載數據庫
ORACLE 例程已經關閉
SQL> startup
ORACLE 例程已經啟動
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
數據庫裝載完畢
數據庫已經打開
SQL> select * from global_name
GLOBAL_NAME
ORCL
SQL>
分析一下
創建global_name視圖的語句如下
create or replace view global_name
as
select value$ from sys
不能直接修改sys
所以可以用update修改!
驗證如下
SQL> select * from global_name
GLOBAL_NAME
ORCL
SQL> select value$ from sys
VALUE$
ORCL
SQL>
From:http://tw.wingwit.com/Article/program/Oracle/201311/17766.html