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
  • 相关阅读:
    Netbeans 设置模板
    Linux 下 netbeans 字体抗锯齿正解
    Sublime Text 2 快捷键 (windows)
    整理的代码规范
    .ssh/config简单使用
    linux 生成KEY的方法与使用
    error:1407742 E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
    The repository 'http://cdn.debian.net/debian stretch Release' is not signed.
    字符串转命令行字符图片
    Linux不在显示器上方总是显示企鹅
  • 原文地址:https://www.cnblogs.com/yscec/p/12060431.html
Copyright © 2011-2022 走看看