温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

ORACLE的使用方法有哪些

发布时间:2022-01-14 15:57:12 来源:亿速云 阅读:121 作者:iii 栏目:关系型数据库

本篇内容主要讲解“ORACLE的使用方法有哪些”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“ORACLE的使用方法有哪些”吧!

//删除用户
drop user lc0019999 cascade

//创建用户
create user lc0019999 identified by password

//给用户授DBA权限
grant dba to lc0019999

//导入数据
$imp
lc0019999/password@server file=e:back312.dmp fromuser=lc0019999 touser=lc0019999

//导出数据
$exp
lc0019999/password@server file=e:backaaa.dmp

//更改sys与system口令
alter user system(sys) identified by newpassword

//更改归档日志方式archivelog与noarchivelog
alter database archivelog(noarchivelog)

//整理蜂窝式碎片的方式
alter tablespace tablespacename coalesce

//查看缺省表空间与临时表空间
select username from dba_users where default_tablespace='system' or temporary_tablespace='system' order by username

//将缺省表空间与临时表空间改为非system
alter user rsingh default users temporary temp

//创建表空间命令
create tablespace tablespacename...(other command options)...extent management local uniform size 10M

//在不同表空间之间移动索引
alter index<index_name> rebuild tablespace<tablespace_name>

//分析数据表空间(执行结果不可见)
analyze table <table_name> compute statistics

//查询表最高点与表的未用块
select blocks "high water mark",empty_blocks "unused space" from dba_tables where table_name='&table_name' and owner='&owner_name'

//释放未用表空间
alter table <table_name> deallocate unused[keep <integer_vlaue> [K|M]]

到此,相信大家对“ORACLE的使用方法有哪些”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI