查詢數(shù)據(jù)庫表空間容量和數(shù)據(jù)量
創(chuàng)新互聯(lián)服務項目包括衡陽縣網(wǎng)站建設、衡陽縣網(wǎng)站制作、衡陽縣網(wǎng)頁制作以及衡陽縣網(wǎng)絡營銷策劃等。多年來,我們專注于互聯(lián)網(wǎng)行業(yè),利用自身積累的技術優(yōu)勢、行業(yè)經(jīng)驗、深度合作伙伴關系等,向廣大中小型企業(yè)、政府機構等提供互聯(lián)網(wǎng)行業(yè)的解決方案,衡陽縣網(wǎng)站推廣取得了明顯的社會效益與經(jīng)濟效益。目前,我們服務的客戶以成都為中心已經(jīng)輻射到衡陽縣省份的部分城市,未來相信會繼續(xù)擴大服務區(qū)域并繼續(xù)獲得客戶的支持與信任!
?SELECT a.tablespace_name ,
?total,
?free,
?(total - free),
?total / (1024 * 1024 * 1024) "TS(G)",
?free / (1024 * 1024 * 1024) "TSfree(G)",
?(total - free) / (1024 * 1024 * 1024) "TSuse(G)",
?round((total - free) / total, 4) * 100 "BaiFenBi %"
?FROM (SELECT tablespace_name, SUM(bytes) free
? FROM dba_free_space
?? ? GROUP BY tablespace_name) a,
? ? ? ? ? ? ?(SELECT tablespace_name, SUM(bytes) total
? ?? FROM dba_data_files
? ? ? ?GROUP BY tablespace_name) b
?WHERE a.tablespace_name = b.tablespace_name
ASMCMD查詢存儲使用情況
ls -s
lsdg
du?
導出數(shù)據(jù)
create or replace directory data as '/home/oracle/imp'
Grant read,write on directory data to test1;
expdp test1/test1@pdborcl directory=data dumpfile=test1.dump logfile=test1.log schemas=test1
impdp test1/test1@pdborcl?directory=data dumpfile=test1.dump logfile=test1.log tables=tab_t1
拼接sql語句
select 'select * from dba_tab_privs where grantee='|| username ||';' from dba_users;
select 'select * from dba_tab_privs where grantee='''||username||''';' from dba_users;
select 'insert into table_name values('''||field_1||''','''||field_2||''');'from table_name where field_n=some_conditon;?
http://www.cppblog.com/fwxjj/archive/2011/10/17/158567.html查詢非系統(tǒng)用戶
select username from dba_users where username not in
('SYS'
,'SYSTEM'
,'OUTLN'
,'FLOWS_FILES'
,'MDSYS'
,'ORDSYS'
,'EXFSYS'
,'DBSNMP'
,'WMSYS'
,'APPQOSSYS'
,'APEX_030200'
,'ORDDATA'
,'CTXSYS'
,'ANONYMOUS'
,'XDB'
,'ORDPLUGINS'
,'SI_INFORMTN_SCHEMA'
,'OLAPSYS'
,'ORACLE_OCM'
,'XS$NULL'
,'MDDATA'
,'DIP'
,'APEX_PUBLIC_USER'
,'SPATIAL_CSW_ADMIN_USR'
,'SPATIAL_WFS_ADMIN_USR');
把某用戶的對象授權給另一用戶及撤銷
select 'grant all on A1.'||table_name||' to B1;' from dba_tables where owner='A1';
select 'revoke all on A1.'||table_name||'? from B1;' from dba_tables where owner='A1';
alter user A1 default_tablespace='B1';
當前題目:oracle維護常用命令收集
路徑分享:http://muchs.cn/article46/gphihg.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設計公司、云服務器、動態(tài)網(wǎng)站、響應式網(wǎng)站、做網(wǎng)站、自適應網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)