zoukankan      html  css  js  c++  java
  • Oracle建库常用命令

    Windows:用户
    create temporary tablespace SP_MINES_TMP
    tempfile 'E:OracleoradataorclSP_MINES_TMP.dbf'
    size 50m
    autoextend on 
    next 50 maxsize 2048m
    extent management local;
    
    
    create  tablespace SP_MINES
    logging
    datafile 'E:OracleoradataorclSP_MINES.dbf'
    size 50m
    autoextend on 
    next 50 maxsize 2048m
    extent management local;
    
    
    create user mines identified by 123456 
    default tablespace SP_MINES
    temporary tablespace SP_MINES_TMP
    
    grant connect,resource,dba to mines;
    
    
    Linux用户:
    管理员用户登录oracle数据库
    
    1、创建临时表空间
    查出当前数据库临时表空间,主要是使用里面的存放路径;
    select name from v$tempfile;
    
    得到其中一条记录/opt/oracle/oradata/orcl/temp01.dbf
    
    创建临时表空间:create temporary tablespace SP_MINES_TMP tempfile '/opt/oracle/oradata/orcl/SP_MINES_TMP.dbf' size 100m reuse autoextend on next 20m maxsize unlimited; 
    
    2、创建表空间
    
    查询出当前数据库表空间,使用里面的路径
    select name from v$datafile;
    
    得到其中一条记录/opt/oracle/oradata/orcl/system01.dbf
    
    创建表空间:create tablespace SP_MINES datafile '/opt/oracle/oradata/orcl/SP_MINES.dbf' size 100M reuse autoextend on next 40M maxsize unlimited default storage(initial 128k next 128k minextents 2 maxextents unlimited);
    
    3、创建用户并指定表空间
    
    create user MINES identified by 123456 default tablespace SP_MINES temporary tablespace SP_MINES_TMP;
    
    4、赋予用户权限
    
    grant connect,resource,dba to mines;
    
    
    
    
    快速导出导入数据:
    exp mines/123456@xxx.xxx.x.xxx:1521/orcl file=D:datamine-2019-12-17.dmp  log=D:datamine-2019-12-17.log
    
    imp mines/123456@localhost:1521/orcl full=y file=D:datamine-2019-12-17.dmp
  • 相关阅读:
    3个同一行div的摆放div
    Android 项目开发
    iOS 8
    iOS 8
    __FILE__ 与 $_SERVER['SCRIPT_FILENAME']的区别
    高德百度坐标系转换方法
    高德百度坐标系转换方法
    在iOS开发中使用icon font的方法
    在iOS开发中使用icon font的方法
    UIView的setNeedsLayout, layoutIfNeeded 和 layoutSubviews 方法之间的关系解释
  • 原文地址:https://www.cnblogs.com/yscec/p/12060431.html
Copyright © 2011-2022 走看看