Oracle一些常用操作语句
--创建oracle登录用户
create user CHECKDATAUSER
identified by "bsoft"
default tablespace PBPGCHECKDATA
temporary tablespace TEMP
profile DEFAULT
password expire;
--删除用户
drop user CHECKDATAUSER CASCADE
--授予用户会话权限
grant connect,resource to CHECKDATAUSER ;
导出命令(根据用户)
exp zhanghao/pass@55.0.0.0:1521/orcl file=C:/back/test.dmp owner=(test)Oracle创建、重建和删除索引
创建索引:
SQL》 create index mcconf_index on mc$ma_warn_config (NAME);
Index created.
SQL》 select owner,object_name from all_objects where object_type=‘INDEX’ and object_name=‘MCCONF_INDEX’;
OWNER OBJECT_NAME
MEGATRUST MCCONF_INDEX
重建索引:
SQL》 alter index mcconf_index rebuild;
Index altered.
删除索引:
SQL》 drop index mcconf_index;
Index dropped.