溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

ORACLE的使用方法有哪些

發(fā)布時(shí)間:2022-01-14 15:57:12 來源:億速云 閱讀:128 作者:iii 欄目:關(guān)系型數(shù)據(jù)庫

本篇內(nèi)容主要講解“ORACLE的使用方法有哪些”,感興趣的朋友不妨來看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“ORACLE的使用方法有哪些”吧!

//刪除用戶
drop user lc0019999 cascade

//創(chuàng)建用戶
create user lc0019999 identified by password

//給用戶授DBA權(quán)限
grant dba to lc0019999

//導(dǎo)入數(shù)據(jù)
$imp
lc0019999/password@server file=e:back312.dmp fromuser=lc0019999 touser=lc0019999

//導(dǎo)出數(shù)據(jù)
$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

//查看缺省表空間與臨時(shí)表空間
select username from dba_users where default_tablespace='system' or temporary_tablespace='system' order by username

//將缺省表空間與臨時(shí)表空間改為非system
alter user rsingh default users temporary temp

//創(chuàng)建表空間命令
create tablespace tablespacename...(other command options)...extent management local uniform size 10M

//在不同表空間之間移動(dòng)索引
alter index<index_name> rebuild tablespace<tablespace_name>

//分析數(shù)據(jù)表空間(執(zhí)行結(jié)果不可見)
analyze table <table_name> compute statistics

//查詢表最高點(diǎn)與表的未用塊
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]]

到此,相信大家對(duì)“ORACLE的使用方法有哪些”有了更深的了解,不妨來實(shí)際操作一番吧!這里是億速云網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI