Chinaunix首页 | 论坛 | 博客
  • 博客访问: 217651
  • 博文数量: 57
  • 博客积分: 1376
  • 博客等级: 中尉
  • 技术积分: 658
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-09 09:51
文章分类

全部博文(57)

文章存档

2012年(1)

2011年(56)

分类: Oracle

2011-03-12 11:27:40

I want to change the name of instance:
  1. SYS@guilin> show parameter name

  2. NAME                               TYPE         VALUE
  3. ------------------------------------ ----------- ------------------------------
  4. db_file_name_convert   string
  5. db_name                          string          liuzhou
  6. db_unique_name            string          liuzhou
  7. global_names                  boolean    FALSE
  8. instance_name                string         guilin
  9. lock_name_space            string
  10. log_file_name_convert   string
  11. service_names                 string        liuzhou
from guilin to liuzhou
How can I do this?

1. Shutdown the database
  1. SYS@guilin> shutdown immediate;
  2. Database closed.
  3. Database dismounted.
  4. ORACLE instance shut down.

2. Rename pfile or spfile and password file:
  1. [oracle@milo dbs]$ mv spfileguilin.ora spfileliuzhou.ora
  2. [oracle@milo dbs]$ mv orapwguilin orapwliuzhou
3. Change the env variables or the user profile
  1. [oracle@milo dbs]$ export ORACLE_SID=liuzhou
4. Startup database and check
  1. [oracle@milo dbs]$ sqlplus / as sysdba

  2. SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 12 11:46:13 2011

  3. Copyright (c) 1982, 2005, Oracle. All rights reserved.

  4. Connected to an idle instance.

  5. SYS@liuzhou> startup
  6. ORACLE instance started.

  7. Total System Global Area 293601280 bytes
  8. Fixed Size 1219016 bytes
  9. Variable Size 234882616 bytes
  10. Database Buffers 50331648 bytes
  11. Redo Buffers 7168000 bytes
  12. Database mounted.
  13. Database opened.
  14. SYS@liuzhou> show parameter name

  15. NAME                               TYPE                   VALUE
  16. ------------------------------------     -----------         ------------------------------
  17. db_file_name_convert   string
  18. db_name                          string              liuzhou
  19. db_unique_name            string              liuzhou
  20. global_names                  boolean          FALSE
  21. instance_name                string              liuzhou
  22. lock_name_space            string
  23. log_file_name_convert   string
  24. service_names                 string             liuzhou


阅读(1196) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~