DBA入职指南学习笔记4

database

表空间相关:
http://blog.itpub.net/31535677/viewspace-2154486/

1、创建表空间并指定数据文件
     create tablespace ecologytest datafile "D:apporacleoradataecology est.dbf"
          size 5M autoextend on maxsize 4G
2、为表空间增加数据文件
    alter tablespace ecologytest add datafile "D:apporacleoradataecology est1.dbf" 
          size 5M autoextend on maxsize 4G
3、修改表空间数据文件默认大小
     alter database datafile  "D:apporacleoradataecology est1.dbf" resize 10M
4、创建用户并指定默认表空间
     create user ecologytest identified by nskfoa default tablespace ecologytest;
5、删除表空间
     DROP tablespace ecologytest including contents and datafiles cascade constraints;
     

     
数据迁移相关(备份与恢复)
1、创建备份用户
    create  user baker identified by baker default tablespace baker;
2、创建备份目录
    create or replace directory expdp_dir as "D:ak"
3、备份用户授权
     grant read,write on directory expdp_dir to baker
4、导出备份数据
     expdp baker/baker directory expdp_dir dumpfile=test.dump logfile=test.log
5、创建导入数据目录
     create or replace directory impdp_dir as "D:ak"
6、授权导入用户
     grant read,write on directory impdp_dir to baker
7、导入数据
     impdp baker/baker directory expdp_dir dumpfile=test.dump logfile=test.log
    
    
    

以上是 DBA入职指南学习笔记4 的全部内容, 来源链接: utcz.com/z/534924.html

回到顶部