zoukankan      html  css  js  c++  java
  • 创建Oracle数据库

    [root@localhost ~]# su - oracle

    [oracle@localhost ~]$ sqlplus /nolog   

    SQL> conn /as sysdba;     

    SQL> show user;

    USER is "SYS"

    SQL> select name from v$datafile; 

    //创建临时表空间

    create temporary tablespace xsgj_temp

    tempfile '/opt/oradata/WULIU/xsgj_temp.dbf'

    size 32m

    autoextend on

    next 32m maxsize 2048m

    extent management local;

    //创建数据表空间

    create tablespace xsgj_data

    logging

    datafile '/opt/oradata/WULIU/xsgj_data.dbf'

    size 32m

    autoextend on

    next 32m maxsize 2048m

    extent management local;

    //创建用户并指定表空间 http://hovertree.com/menu/oracle/

    create user xsgj identified by xsgjmm

    default tablespace xsgj_data

    temporary tablespace xsgj_temp;

    //给用户授予权限

    grant connect,resource to xsgj;

    //授dba权限

    grant dba to xsgj;

    //授dblink权限

    grant create public database link to xsgj;

     

    //以后以该用户登录,创建的任何数据库对象都属于test_temp 和test_data表空间,这就不用在每创建一个对象给其指定表空间了。

    附加:

    表空间的位置可以用一下的查询语句来查询

    select name from v$datafile;

    推荐:http://www.cnblogs.com/roucheng/p/3504463.html

  • 相关阅读:
    个人作业——软件评测
    软件工程第五次作业——结对编程的实现
    软件工程第三次作业
    软件工程第一次作业
    两个矩形面积交
    二维并查集
    Java 作业 1
    练习题
    线性表

  • 原文地址:https://www.cnblogs.com/roucheng/p/createoracle.html
Copyright © 2011-2022 走看看