本篇內容主要講解“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的使用方法有哪些”有了更深的了解,不妨來實際操作一番吧!這里是億速云網站,更多相關內容可以進入相關頻道進行查詢,關注我們,繼續學習!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。