Oracle 知识备份(一)2011年4月4号

来源:互联网 发布:mac popo登录408 编辑:程序博客网 时间:2024/05/21 04:21

DDL(Data Definition Language)

 

--创建用户
CREATE USER "TEST"  PROFILE "DEFAULT"
    IDENTIFIED BY "test" DEFAULT TABLESPACE "USERS"
    ACCOUNT UNLOCK;
GRANT connect,resource TO "TEST";
alter user 用户名 PASSWORD EXPIRE;

 

grant resource,connect to inseprion; 给用户授权

 

--创建、修改表空间
create tablespace DEV_WEB datafile 'E:/oracle/product/10.2.0/oradata/dev_web.dbf' size 3000M;

alter   database   datafile   'datafile_name '   resize   新的大小

--查询所有表空间
select * from dba_data_files;

--删除表空间及表空间中所有的数据、相关完整性限制(包括主键及唯一索引)
drop tablespace tablespace_name [including contents] [cascade constraints]

--给用户表空间的使用权限

alter user userxxx quota unlimited on tablespacexxx;

 

 

command下: show parameters processions          -------------最大连接数

--查询当前用户所有对象

select * from tab;

--查询所有字段即字段类型
select * from col;

原创粉丝点击