备份数据库
exp tpemr/tpemr@//192.168.1.238/tpemr file=e:/tpemr_%date%.dmp
exp tpemr_qx2010/tpemr@//192.168.1.111/tpemr file=e:/tpemr_qx2010.dmp
exp tpemr_tx/tpemr@//192.168.1.206/tpemr file=e:/tpemr_tx.dmp
删除表空间
drop tablespace TSP_TPEMR including contents and datafiles
增加表空间容量
alter tablespace TSP_TPEMR add datafile 'd:\tpemr_2010_5.dbf' size 1G
表增加一个字段
--EMR_PAT_DIAG表中添加的字段
alter table EMR_PAT_DIAG add Remarks VARCHAR2(200);
-- Add comments to the columns
comment on column EMR_PAT_DIAG.Remarks is '诊断备注';
--查看oracle中当前连接用户
select * from v$session where username='TPEMR_2010'
--结束当前连接用户的进程
alter system kill session 'sid,serial#';
--创建用户并指定表空间
create user tpemr_2010 identified by tpemr
default tablespace TSP_TPEMR_2010;
--更改用户默认表空间
ALTER user tpemr_2010 default tablespace TSP_TPEMR_2010;
--给用户授予权限
grant connect,resource,dba to tpemr_2010;