首页 / DB2 / DB2移动数据库目录调整方法
DB2移动数据库目录调整方法
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了DB2移动数据库目录调整方法,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1818字,纯文字阅读大概需要3分钟。
内容图文
由于目录变化,需要将数据库从目录/home/db2inst1移动到目录/public/home/guanghong.yu/db2inst1
由于目录变化,需要将数据库从目录/home/db2inst1移动到目录/public/home/guanghong.yu/db2inst1
重新编目数据库
$db2 uncatalog db Oracle
$db2 catalog db oracle
编目成功后会即可看到:
$db2 list db directory
Database alias = ORACLE
Database name = ORACLE
Local database directory = /public/home/guanghong.yu/db2inst1
Database release level = d.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
如上操作做了后仍然不能连接数据库,需要对表空间做如下操作:
编辑mvdb.cfg
DB_NAME=ORACLE
DB_PATH=/home/db2inst1,/public/home/guanghong.yu/db2inst1
INSTANCE=db2inst1
NODENUM=0
CONT_PATH=/home/db2inst1/db2inst1/NODE0000/ORACLE/T0000000/C0000000.CAT,/public/home/guanghong.yu/db2inst1/db2inst1/NODE0000/ORACLE/T0000000/C0000000.CAT
STORAGE_PATH=/home/db2inst1/,/public/home/guanghong.yu/db2inst1
运行如下命令:
$db2relocatedb -f mvdb.cfg
[db2inst1@hpserver2 db2]$ db2relocatedb -f mvdb.cfg
Files and control structures were changed successfully.
Database was catalogued successfully.
DBT1000I The tool completed successfully.
重新编目成功,数据库可以成功连接激活啦
[db2inst1@hpserver2 db2]$ db2 connect to oracle
Database Connection Information
Database server = DB2/LINUXX8664 9.7.5
SQL authorization ID = DB2INST1
Local database alias = ORACLE
OK,,移动后的数据库可以被使用啦。
DB2数据库性能调整和优化(第1、2版) PDF
DB2数据库性能优化介绍
DB2 9.7 for Linux 5.4安装详细步骤
本文永久更新链接地址:
内容总结
以上是互联网集市为您收集整理的DB2移动数据库目录调整方法全部内容,希望文章能够帮你解决DB2移动数据库目录调整方法所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。