




已阅读5页,还剩7页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
用户管理的恢复实验操作 实验要求假使数据文件所在的磁盘发生损坏 1 cd u01 oracle oradata 2 mkdir backup chown R oracle oinstall u01 oracle oradata ivan 3 cd backup 4 cp u01 oracle oradata devin 如果同时 copy 参数文件跟口令文件也行 5mkdir u01 oracle oradata ivan 这里是数据文件的新生磁盘 在这里非得要解释一下磁盘 跟目录不同 而 linux 下硬件也是由目录构成的 而新建一个磁盘你必须得格式化 要不裸 设备是无法存储数据的 增加与格式化磁盘步骤如下 编辑虚拟机 Add disk 对应增加 disk 为新 disk 设置空间大小与空间分配类型 定义 disk file vmdk 为后缀 前缀字符可以自定义 自此磁盘增加以完成 重启操作系统 root devin cd dev root devin dev ls agpgart fd0u720 loop5 ptmx ramdisk tty1 tty27 tty44 tty61 vcsa autofs fd0u800 loop6 pts random tty10 tty28 tty45 tty62 vcsa1 cdrom fd0u820 loop7 ram rawctl tty11 tty29 tty46 tty63 vcsa2 cdrom hdc fd0u830 lp0 ram0 root tty12 tty3 tty47 tty7 vcsa3 console floppy MAKEDEV ram1 rtc tty13 tty30 tty48 tty8 vcsa4 core floppy fd0 mapper ram10 sda tty14 tty31 tty49 tty9 vcsa5 disk full md0 ram11 sda1 tty15 tty32 tty5 ttyS0 vcsa6 fd gpmctl mem ram12 sda2 tty16 tty33 tty50 ttyS1 vcsa7 fd0 hdc net ram13 sdb tty17 tty34 tty51 ttyS2 VolGroup00 fd0u1040 hpet null ram14 sg0 tty18 tty35 tty52 ttyS3 X0R fd0u1120 initctl nvram ram15 sg1 tty19 tty36 tty53 urandom zero fd0u1440 input oldmem ram2 shm tty2 tty37 tty54 vcs fd0u1680 kmsg par0 ram3 snapshot tty20 tty38 tty55 vcs1 fd0u1722 log parport0 ram4 stderr tty21 tty39 tty56 vcs2 fd0u1743 loop0 parport1 ram5 stdin tty22 tty4 tty57 vcs3 fd0u1760 loop1 parport2 ram6 stdout tty23 tty40 tty58 vcs4 fd0u1840 loop2 parport3 ram7 systty tty24 tty41 tty59 vcs5 fd0u1920 loop3 port ram8 tty tty25 tty42 tty6 vcs6 fd0u360 loop4 ppp ram9 tty0 tty26 tty43 tty60 vcs7 从以上信息我们看到两个磁盘一个是 sda 一个是 sdb 而 sda 已经分为两个区 sda1 sda2 首先我们对新磁盘要进行分区选择 其二是对其进行格式化 然而再对指定 mount 的目录 root devin dev fdisk sdb Device contains neither a valid DOS partition table nor Sun SGI or OSF disklabel Building a new DOS disklabel Changes will remain in memory only until you decide to write them After that of course the previous content won t be recoverable Warning invalid flag 0 x0000 of partition table 4 will be corrected by w rite Command m for help m Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition s system id u change display entry units v verify the partition table w write table to disk and exit x extra functionality experts only 由上述提示指令对新磁盘进行分区 Command m for help p Disk sdb 2147 MB 2147483648 bytes 255 heads 63 sectors track 261 cylinders Units cylinders of 16065 512 8225280 bytes Device Boot Start End Blocks Id System 查看分区情况 Command m for help n Command action e extended p primary partition 1 4 p Partition number 1 4 1 First cylinder 1 261 default 1 1 Last cylinder or size or sizeM or sizeK 1 261 default 261 261 选择 P 基本分区 我对整个磁盘就划分为一个分区 Command m for help p 查询新建分区的信息 Disk sdb 2147 MB 2147483648 bytes 255 heads 63 sectors track 261 cylinders Units cylinders of 16065 512 8225280 bytes Device Boot Start End Blocks Id System sdb1 1 261 2096451 83 Linux Command m for help w The partition table has been altered Calling ioctl to re read partition table Syncing disks 把新建磁盘写进系统 root devin dev mkfs ext3 sdb1 mke2fs 1 39 29 May 2006 Filesystem label OS type Linux Block size 4096 log 2 Fragment size 4096 log 2 262144 inodes 524112 blocks 26205 blocks 5 00 reserved for the super user First data block 0 Maximum filesystem blocks 536870912 16 block groups 32768 blocks per group 32768 fragments per group 16384 inodes per group Superblock backups stored on blocks 32768 98304 163840 229376 294912 Writing inode tables done Creating journal 8192 blocks done Writing superblocks and filesystem accounting information done This filesystem will be automatically checked every 35 mounts or 180 days whichever comes first Use tune2fs c or i to override mkfs ext3 sdb1 表示对 sdb1 磁盘进行格式化 对其设置为 ext3 的文件系统 root devin cd u01 oracle oradata root devin oradata mount dev sdb1 ivan 最后一步则是 mount 新增磁盘到 ivan 目录 6 cd u01 oracle oradata ivan 7 cp u01 backup cold 把备份文件拷至 ivan 目录下 8 我们知道因为数据文件路径变了 所以我们得重新配置参数文件跟控制文件 要不此时数据库依旧无法启动 以上是 SPFILE 原信息 但是控制文件路径已经变了 所以必须修改 oracle devin sqlplus nolog SQL Plus Release 10 2 0 1 0 Production on Sat Feb 25 10 20 32 2012 Copyright c 1982 2005 Oracle All rights reserved SQL conn as sysdba Connected to an idle instance SQL create pfile from spfile oracle devin dbs mv spfiledevin ora spfiledevin ora org 此时对 SPFILE 进行改名 让 oracle 无法侦测到 spfile 而此时 pfile 就会被侦测使 用 SQL create spfile from pfile 在这里我必须得重新温习一下 因为 conn 之后数据库进入了 nomount 的状态 此时只是读参数文件 而旧的 spfile 依然存在 所以启动到 nomount 状态是没 问题的 而读取参数文件 创建 pfile 也是没问题的 Vi initdevin ora devin java pool size 4194304 devin large pool size 4194304 devin shared pool size 71303168 devin streams pool size 0 audit file dest u01 oracle admin devin adump background dump dest u01 oracle admin devin bdump compatible 10 2 0 1 0 control files u01 oracle oradata devin control01 ctl u01 oracle oradata devi n control02 ctl u01 oracle oradata devin control03 ctl core dump dest u01 oracle admin devin cdump db block size 8192 db domain db file multiblock read count 16 db name devin db recovery file dest u01 oracle flash recovery area db recovery file dest size 3225419776 dispatchers PROTOCOL TCP SERVICE devinXDB job queue processes 10 open cursors 300 pga aggregate target 16777216 processes 150 remote login passwordfile EXCLUSIVE sga target 167772160 undo management AUTO undo tablespace UNDOTBS1 initdevin ora 26L 973C 在这里我们只需要对 control files 的路径进行修改为 control files u01 oracle oradata ivan control01 ctl u01 oracle oradata ivan co ntrol02 ctl u01 oracle oradata ivan control03 ctl 此时数据库能启动了吗 对不起 依然不能 为什么呢 请看下面信息 oracle devin devin strings control01 ctl more u01 oracle oradata devin redo03 log u01 oracle oradata devin redo02 log u01 oracle oradata devin redo01 log u01 oracle oradata devin users01 dbf u01 oracle oradata devin sysaux01 dbf u01 oracle oradata devin undotbs01 dbf u01 oracle oradata devin system01 dbf u01 oracle oradata devin temp01 dbf u01 oracle oradata devin redo03 log u01 oracle oradata devin redo02 log u01 oracle oradata devin redo01 log u01 oracle oradata devin users01 dbf u01 oracle oradata devin sysaux01 dbf u01 oracle oradata devin undotbs01 dbf u01 oracle oradata devin system01 dbf u01 oracle oradata devin temp01 dbf 以上的数据文件 重做日志文件信息依然是旧路径 Start
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 58同城加盟合同范例
- 模块井施工方案
- 农场经营饭店合同范例
- 河南架空保温施工方案
- 做石材合同范例
- 公司研发合同范例
- 借贷合同范例写
- 公共部分贴砖合同范例
- 兼职合同范例14篇
- 公司股股东合同范例
- 安徽省江南十校2024届高三3月联考数学试卷 含解析
- 2025(人教版)数学一年级下册全册教学案
- 人教版 七年级英语下册 UNIT 1 单元综合测试卷(2025年春)
- 2025年辽宁医药职业学院高职单招职业技能测试近5年常考版参考题库含答案解析
- 《痛经的预防保健》课件
- 古诗词诵读《客至》课件+2023-2024学年统编版高中语文选择性必修下册
- 弟子规带拼音全文课件省公共课一等奖全国赛课获奖课件
- MOOC 中国传统艺术-篆刻、书法、水墨画体验与欣赏-哈尔滨工业大学 中国大学慕课答案
- 猜猜我有多爱你-绘本故事
- 人教版pep小学四年级英语下册全册完整
- 闽教版2023版3-6年级全8册英语单词表
评论
0/150
提交评论