DBNEWID工具使用三:更改INSTANCE_NAME
来源:互联网 发布:如何利用大数据炒股 编辑:程序博客网 时间:2024/05/23 16:47
三、更改INSTANCE_NAME
三、更改INSTANCE_NAME
1、检查当前的instance_name 是wwl
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
wwl
2、创建pfile参数文件
SQL> create pfile from spfile;
File created.
3、关闭数据库
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> host
4、切换到操作系统命令行,修改用户环境下的.bash_profile参数文件,将ORACLE_SID的值由原来的wwl改为wwl01
[oracle@ora10g ~]$ cd
[oracle@ora10g ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_SID=wwl01
export ORACLE_BASE=/orasoft/
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBARY_PATH=$ORACLE_HOME/lib
export LANG="zh_CN.GB18030";
export PATH
umask 022
".bash_profile" 22L, 410C written
5、让刚才修改的ORACLE_SID的值立即生效
[oracle@ora10g ~]$ source .bash_profile
6、检查下系统的环境变量中的ORACLE_SID的值是否已经更改为我们理想中的wwl01
[oracle@ora10g ~]$ echo $ORACLE_SID
wwl01
7、进入$ORACLE_HOME/dbs目录,也就是pfile存放的路径,将initwwl.ora参数文件改名为initwwl01.ora
[oracle@ora10g ~]$ cd $ORACLE_HOME/dbs
[oracle@ora10g dbs]$ ls
hc_wwl.dat initdw.ora init.ora initwwl.ora lkWWL lkWWL01 spfilewwl.ora
[oracle@ora10g dbs]$ mv initwwl.ora initwwl01.ora
[oracle@ora10g dbs]$ pwd
/orasoft/product/10.2.0/db_1/dbs
8、进入数据库用刚才复制的参数文件启动数据库
[oracle@ora10g dbs]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 22 00:37:33 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount pfile='/orasoft/product/10.2.0/db_1/dbs/initwwl01.ora';
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 62916176 bytes
Database Buffers 218103808 bytes
Redo Buffers 2973696 bytes
Database mounted.
9、检查数据库的当前instance_name是否已经修改为wwl01了,我们看到已经成功了。
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
wwl01
10、将数据库OPEN,数据库已经能够正常运行了。
SQL> alter database open;
Database altered.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
wwl01 OPEN
SQL>
- DBNEWID工具使用三:更改INSTANCE_NAME
- 三、更改INSTANCE_NAME
- DBNEWID 使用一:更改DBID
- DBNEWID工具使用二:修改DBNAME
- DBNEWID工具使用二:修改DBNAME
- 使用dbnewid工具修改dbid和db_name
- Oracle工具之DBNEWID
- Oracle工具——DBNEWID
- oracle工具——DBNEWID
- 修改数据库的名字和ID可以使用DBNEWID Utility工具
- DBNEWID 使用一:更改DBID (数据库里的各个基本概念易混淆的 看该博主)
- oracle工具——DBNEWID(其二)
- 使用DBNEWID修改DBNAME和DBID
- 21.3 DBNEWID
- 使用命令行工具打开SQLite数据库&更改命令行窗口编码
- Android自动化工具Monkeyrunner使用(三)
- 自动构建工具Ant的使用(三)
- GNU工具链的使用(三)
- 突然冒出来的轻应用平台们,各有什么特点?
- cloud control peer not authenticated错误解决
- DBNEWID工具使用二:修改DBNAME
- MXQuery的基本使用
- python 核心编程 第二版 第二章 练习题
- DBNEWID工具使用三:更改INSTANCE_NAME
- CMUSphinx Learn - Basic concepts of speech
- 用Nginx做反向代理并缓存静态文件
- js 的push 方法
- Delphi XE2 DataSnap 上传下载文件
- loadView和viewDidLoad及initWithNibName/awakeFromNib/initWithCoder
- oracle 数据字典
- rqnoj-285-麻烦的聚餐-dp
- ODBC错误码