Oracle 基本(1)

备份数据库
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;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值