移动开发管理系统Rational ClearQuest后台数据库ORACLE数据到EXP300阵列步骤
2008-04-24 10:23
966 查看
移动开发管理系统CQ后台数据库ORACLE数据到EXP300阵列步骤
1、目的:
Oracle程序在本地硬盘上(D盘),数据在EXP300磁盘阵列上(Y盘),要求通过手工的方式切换磁盘阵列的磁盘,在两台服务器上(10.25.4.162和10.25.4.163)能够分别运行同一ORACLE数据库。
数据库备份,通过exp导出的方式备份数据到本地硬盘。
2、操作步骤:
以下称10.25.4.162为A机,10.25.4.163为B机。A机上已经安装了ORACLE程序,安装位置在D:/oracle,数据位置在D:/oracle/oradata,Dump文件位于D:/oracle/admin下,SID为ORADEV。
2.1、在B机D盘上安装ORACLE程序,生成ORADEV数据库,停止Oracle相关服务,设置服务为手工启动,删除D:/oracle/admin和D:/oracle/oradata目录。
2.2、查询A机Oracle数据文件位置
SQL> conn / as sysdba;
Connected.
SQL> select file#,name from v$datafile;
FILE# NAME
---------- -----------------------------------------------------------------------------
1 D:/ORACLE/ORADATA/ORADEV/SYSTEM01.DBF
2 D:/ORACLE/ORADATA/ORADEV/UNDOTBS01.DBF
3 D:/ORACLE/ORADATA/ORADEV/CWMLITE01.DBF
4 D:/ORACLE/ORADATA/ORADEV/DRSYS01.DBF
5 D:/ORACLE/ORADATA/ORADEV/EXAMPLE01.DBF
6 D:/ORACLE/ORADATA/ORADEV/INDX01.DBF
7 D:/ORACLE/ORADATA/ORADEV/ODM01.DBF
8 D:/ORACLE/ORADATA/ORADEV/TOOLS01.DBF
9 D:/ORACLE/ORADATA/ORADEV/USERS01.DBF
10 D:/ORACLE/ORADATA/ORADEV/XDB01.DBF
10 rows selected.
SQL> select file#,name from v$tempfile;
FILE# NAME
---------- -----------------------------------------------------------------------------------------
1 D:/ORACLE/ORADATA/ORADEV/TEMP01.DBF
SQL>
SQL> select group#,member from v$logfile;
GROUP# MEMBER
---------- -----------------------------------------------------------------------------------------
3 D:/ORACLE/ORADATA/ORADEV/REDO03.LOG
2 D:/ORACLE/ORADATA/ORADEV/REDO02.LOG
1 D:/ORACLE/ORADATA/ORADEV/REDO01.LOG
2.3创建pfile,停掉数据库,修改相关dump和control file文件位置从D盘到Y盘
SQL> create pfile from spfile;
File created.
2.4在Y盘建立Y:/oracle目录,剪切D:/oracle/admin和D:/oracle/oradata到Y:/oracle下。修改相关Oracle设置。
SQL> conn / as sysdba;
Connected to an idle instance.
SQL> startup mount pfile=D:/oracle/ora92/database/INIToradev.ORA
ORACLE instance started.
Total System Global Area 126950220 bytes
Fixed Size 453452 bytes
Variable Size 109051904 bytes
Database Buffers 16777216 bytes
Redo Buffers 667648 bytes
Database mounted.
SQL>
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/SYSTEM01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/SYSTEM01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/UNDOTBS01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/UNDOTBS01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/CWMLITE01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/CWMLITE01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/DRSYS01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/DRSYS01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/EXAMPLE01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/EXAMPLE01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/INDX01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/INDX01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/ODM01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/ODM01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/TOOLS01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/TOOLS01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/USERS01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/USERS01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/XDB01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/XDB01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/REDO01.LOG' to 'Y:/ORACLE/ORADATA/ORADEV/REDO01.LOG';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/REDO02.LOG' to 'Y:/ORACLE/ORADATA/ORADEV/REDO02.LOG';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/REDO03.LOG' to 'Y:/ORACLE/ORADATA/ORADEV/REDO03.LOG';
Database altered.
SQL> alter database open;
Database altered.
SQL> alter tablespace temp add tempfile 'Y:/ORACLE/ORADATA/ORADEV/TEMP01.DBF';
Tablespace altered.
SQL> startup pfile=D:/oracle/ora92/database/INIToradev.ORA
ORACLE instance started.
Total System Global Area 126950220 bytes
Fixed Size 453452 bytes
Variable Size 109051904 bytes
Database Buffers 16777216 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> create spfile from pfile;
File created.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 126950220 bytes
Fixed Size 453452 bytes
Variable Size 109051904 bytes
Database Buffers 16777216 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
2.5、验证数据库文件路径。
SQL> select file#,name from v$datafile;
FILE# NAME
---------- -----------------------------------------------------------------------------------------
1 Y:/ORACLE/ORADATA/ORADEV/SYSTEM01.DBF
2 Y:/ORACLE/ORADATA/ORADEV/UNDOTBS01.DBF
3 Y:/ORACLE/ORADATA/ORADEV/CWMLITE01.DBF
4 Y:/ORACLE/ORADATA/ORADEV/DRSYS01.DBF
5 Y:/ORACLE/ORADATA/ORADEV/EXAMPLE01.DBF
6 Y:/ORACLE/ORADATA/ORADEV/INDX01.DBF
7 Y:/ORACLE/ORADATA/ORADEV/ODM01.DBF
8 Y:/ORACLE/ORADATA/ORADEV/TOOLS01.DBF
9 Y:/ORACLE/ORADATA/ORADEV/USERS01.DBF
10 Y:/ORACLE/ORADATA/ORADEV/XDB01.DBF
10 rows selected.
SQL> select group#,member from v$logfile;
GROUP# MEMBER
---------- -----------------------------------------------------------------------------------------
3 Y:/ORACLE/ORADATA/ORADEV/REDO03.LOG
2 Y:/ORACLE/ORADATA/ORADEV/REDO02.LOG
1 Y:/ORACLE/ORADATA/ORADEV/REDO01.LOG
SQL> select file#,name from v$tempfile;
FILE# NAME
---------- -----------------------------------------------------------------------------------------
1 Y:/ORACLE/ORADATA/ORADEV/TEMP01.DBF
SQL>
2.6、拷贝A机文件D:/oracle/ora92/database/spfileoradev.ORA和PWDORADEV.ORA文件到B机相同的位置覆盖同名文件。
2.7、手工切换磁盘和起停Oracle服务,经验证Oracle能够在两台服务器上正常运行。
2.8、在A机D盘建立backup目录,在根目录下建立文件orabackup.cmd
exp system/password@oradev full=y file=d:/backup/oradata_%date:~0,4%%date:~5,2%%date:~8,2%.dmp log=d:/backup/oradata_%date:~0,4%%date:~5,2%%date:~8,2%.log
2.9、在系统计划任务里制定运行计划备份数据库。
1、目的:
Oracle程序在本地硬盘上(D盘),数据在EXP300磁盘阵列上(Y盘),要求通过手工的方式切换磁盘阵列的磁盘,在两台服务器上(10.25.4.162和10.25.4.163)能够分别运行同一ORACLE数据库。
数据库备份,通过exp导出的方式备份数据到本地硬盘。
2、操作步骤:
以下称10.25.4.162为A机,10.25.4.163为B机。A机上已经安装了ORACLE程序,安装位置在D:/oracle,数据位置在D:/oracle/oradata,Dump文件位于D:/oracle/admin下,SID为ORADEV。
2.1、在B机D盘上安装ORACLE程序,生成ORADEV数据库,停止Oracle相关服务,设置服务为手工启动,删除D:/oracle/admin和D:/oracle/oradata目录。
2.2、查询A机Oracle数据文件位置
SQL> conn / as sysdba;
Connected.
SQL> select file#,name from v$datafile;
FILE# NAME
---------- -----------------------------------------------------------------------------
1 D:/ORACLE/ORADATA/ORADEV/SYSTEM01.DBF
2 D:/ORACLE/ORADATA/ORADEV/UNDOTBS01.DBF
3 D:/ORACLE/ORADATA/ORADEV/CWMLITE01.DBF
4 D:/ORACLE/ORADATA/ORADEV/DRSYS01.DBF
5 D:/ORACLE/ORADATA/ORADEV/EXAMPLE01.DBF
6 D:/ORACLE/ORADATA/ORADEV/INDX01.DBF
7 D:/ORACLE/ORADATA/ORADEV/ODM01.DBF
8 D:/ORACLE/ORADATA/ORADEV/TOOLS01.DBF
9 D:/ORACLE/ORADATA/ORADEV/USERS01.DBF
10 D:/ORACLE/ORADATA/ORADEV/XDB01.DBF
10 rows selected.
SQL> select file#,name from v$tempfile;
FILE# NAME
---------- -----------------------------------------------------------------------------------------
1 D:/ORACLE/ORADATA/ORADEV/TEMP01.DBF
SQL>
SQL> select group#,member from v$logfile;
GROUP# MEMBER
---------- -----------------------------------------------------------------------------------------
3 D:/ORACLE/ORADATA/ORADEV/REDO03.LOG
2 D:/ORACLE/ORADATA/ORADEV/REDO02.LOG
1 D:/ORACLE/ORADATA/ORADEV/REDO01.LOG
2.3创建pfile,停掉数据库,修改相关dump和control file文件位置从D盘到Y盘
SQL> create pfile from spfile;
File created.
2.4在Y盘建立Y:/oracle目录,剪切D:/oracle/admin和D:/oracle/oradata到Y:/oracle下。修改相关Oracle设置。
SQL> conn / as sysdba;
Connected to an idle instance.
SQL> startup mount pfile=D:/oracle/ora92/database/INIToradev.ORA
ORACLE instance started.
Total System Global Area 126950220 bytes
Fixed Size 453452 bytes
Variable Size 109051904 bytes
Database Buffers 16777216 bytes
Redo Buffers 667648 bytes
Database mounted.
SQL>
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/SYSTEM01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/SYSTEM01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/UNDOTBS01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/UNDOTBS01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/CWMLITE01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/CWMLITE01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/DRSYS01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/DRSYS01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/EXAMPLE01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/EXAMPLE01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/INDX01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/INDX01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/ODM01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/ODM01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/TOOLS01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/TOOLS01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/USERS01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/USERS01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/XDB01.DBF' to 'Y:/ORACLE/ORADATA/ORADEV/XDB01.DBF';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/REDO01.LOG' to 'Y:/ORACLE/ORADATA/ORADEV/REDO01.LOG';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/REDO02.LOG' to 'Y:/ORACLE/ORADATA/ORADEV/REDO02.LOG';
Database altered.
SQL> alter database rename file 'D:/ORACLE/ORADATA/ORADEV/REDO03.LOG' to 'Y:/ORACLE/ORADATA/ORADEV/REDO03.LOG';
Database altered.
SQL> alter database open;
Database altered.
SQL> alter tablespace temp add tempfile 'Y:/ORACLE/ORADATA/ORADEV/TEMP01.DBF';
Tablespace altered.
SQL> startup pfile=D:/oracle/ora92/database/INIToradev.ORA
ORACLE instance started.
Total System Global Area 126950220 bytes
Fixed Size 453452 bytes
Variable Size 109051904 bytes
Database Buffers 16777216 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> create spfile from pfile;
File created.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 126950220 bytes
Fixed Size 453452 bytes
Variable Size 109051904 bytes
Database Buffers 16777216 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
2.5、验证数据库文件路径。
SQL> select file#,name from v$datafile;
FILE# NAME
---------- -----------------------------------------------------------------------------------------
1 Y:/ORACLE/ORADATA/ORADEV/SYSTEM01.DBF
2 Y:/ORACLE/ORADATA/ORADEV/UNDOTBS01.DBF
3 Y:/ORACLE/ORADATA/ORADEV/CWMLITE01.DBF
4 Y:/ORACLE/ORADATA/ORADEV/DRSYS01.DBF
5 Y:/ORACLE/ORADATA/ORADEV/EXAMPLE01.DBF
6 Y:/ORACLE/ORADATA/ORADEV/INDX01.DBF
7 Y:/ORACLE/ORADATA/ORADEV/ODM01.DBF
8 Y:/ORACLE/ORADATA/ORADEV/TOOLS01.DBF
9 Y:/ORACLE/ORADATA/ORADEV/USERS01.DBF
10 Y:/ORACLE/ORADATA/ORADEV/XDB01.DBF
10 rows selected.
SQL> select group#,member from v$logfile;
GROUP# MEMBER
---------- -----------------------------------------------------------------------------------------
3 Y:/ORACLE/ORADATA/ORADEV/REDO03.LOG
2 Y:/ORACLE/ORADATA/ORADEV/REDO02.LOG
1 Y:/ORACLE/ORADATA/ORADEV/REDO01.LOG
SQL> select file#,name from v$tempfile;
FILE# NAME
---------- -----------------------------------------------------------------------------------------
1 Y:/ORACLE/ORADATA/ORADEV/TEMP01.DBF
SQL>
2.6、拷贝A机文件D:/oracle/ora92/database/spfileoradev.ORA和PWDORADEV.ORA文件到B机相同的位置覆盖同名文件。
2.7、手工切换磁盘和起停Oracle服务,经验证Oracle能够在两台服务器上正常运行。
2.8、在A机D盘建立backup目录,在根目录下建立文件orabackup.cmd
exp system/password@oradev full=y file=d:/backup/oradata_%date:~0,4%%date:~5,2%%date:~8,2%.dmp log=d:/backup/oradata_%date:~0,4%%date:~5,2%%date:~8,2%.log
2.9、在系统计划任务里制定运行计划备份数据库。
相关文章推荐
- 移动开发管理系统Rational ClearQuest后台数据库ORACLE数据到EXP300阵列步骤
- 游戏数据库数据管理系统开发体会
- Java连接Oracle数据库开发银行管理系统【二、设计篇】
- 学生管理系统----文件和数据库(oracle)两种保存数据方式
- Java连接Oracle数据库开发银行管理系统【一、需求篇】
- 使用 NodeJs 实现一个本地接口数据系统,无需数据库,让前端独立于后台开发
- 在家看孩子,10分钟生成一个业务管理系统【能支持多数据库,大数据,流程审批,权限控制,即时提醒】,视频讲解详细实现步骤
- 本人开发系统--新生报到与数据统计管理系统--数据库设计及相关查询SQL语句笔记
- Java连接Oracle数据库开发银行管理系统【三、实现篇】
- C#_会员管理系统:开发六(数据搜索)
- oracle 数据恢复,只有oradata文件夹里的文件,没有备份文件的数据库恢复,重装系统后,oracle 10g数据库恢复
- 后台管理系统开发—小技术
- 基于ArcGIS10.0和Oracle10g的空间数据管理平台(C#开发)-数据库设计
- ThinkPHP内容管理系统开发日记(一)--规划数据库。
- Pycharm+Django+Python+MySQL开发(一)后台管理数据库
- Django:(博客系统)使用使用mysql数据->后台管理tag/post/category的配置
- asp.net mvc+jquery easyui开发实战教程之网站后台管理系统开发1-准备工作
- ORACLE用户管理方式下备份数据和复制数据库
- web工作流管理系统开发之十一 流程数据与业务数据的交互
- (013)java后台开发之Mac系统安装和配置tomcat步骤详解