实验六:数据备份与恢复.doc - 实验六...

  • No School
  • AA 1
  • 11

This preview shows page 1 - 3 out of 11 pages.

实验六 数据备份与恢复 实验目的 掌握 ORACLE 数据库系统的一种备份 / 恢复方法。 实验内容 提示(黄色底的代码可以直接粘贴运行): [ 补充部分 ] 7 题中,如果是 Oracle 11g SQL Developer 4 版本 工具选项中有可能没有 卸载数据库,可用导出数据库代替。 1 在实验室电脑,在 orcl 数据库中创建新的用户并授权(如果自己的电脑原来已有这个 用户,可以忽略本步骤):(用户 sys, 密码 oracle create user cc identified by ccpassword ; grant resource, connect, DBA to cc; 2 断开刚才的连接。以用户 CC 密码 ccpassword 的身份建立连接,并在此连接下执行后 面的操作。 3 拷贝代码运行,删去旧的同名数据表: Declare tmp integer default 0; Begin select count(*) into tmp from user_tables where table_name='RB'; if(tmp>0) then execute immediate 'drop table RB'; end if; select count(*) into tmp from user_tables where table_name='READER'; if(tmp>0) then execute immediate 'drop table READER'; end if; select count(*) into tmp from user_tables where table_name='BOOK'; if(tmp>0) then execute immediate 'drop table BOOK'; end if; end; 4 拷贝代码运行,建立表格及输入数据: create table Reader ( RNO varchar2(4) primary key, Rname varchar2(10) not null, Rsex varchar2(2),
Image of page 1

Subscribe to view the full document.

Rage integer, Rboss varchar2(10), Raddress varchar2(30) ) ;
Image of page 2
Image of page 3
  • Fall '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes