您好,登錄后才能下訂單哦!
創(chuàng)建表空間
CREATE SMALLFILE TABLESPACE TTKDTEST datafile '/opt/oracle/oradatas/otwb/dbf.DMP' SIZE 100M REUSE AUTOEXTEND ON NEXT 2048K MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
刪除test用戶
drop user wmsloc cascade;
創(chuàng)建test用戶
create user wrtest identified by wrtest;
授權(quán)test用戶
grant connect,resource,dba to wrtest;
--選擇性授權(quán)
grant select on sy_user to user
commit;
更改表空間
select 'alter table '|| table_name ||' move tablespace tablespacename;' from user_all_tables;
select 'alter index '|| index_name ||' rebuild tablespace tablespacename;' from user_indexes;
重建索引
select 'alter index '|| index_name ||' rebuild;' from user_indexes;
正在運(yùn)行的SQL
SELECT b.sid oracleID,
b.username 登錄Oracle用戶名,
b.serial#,
spid 操作系統(tǒng)ID,
paddr,
sql_text 正在執(zhí)行的SQL,
b.machine 計(jì)算機(jī)名
FROM v$process a, v$session b, v$sqlarea c
WHERE a.addr = b.paddr
AND b.sql_hash_value = c.hash_value and b.username='TMS'
--查出oracle當(dāng)前的被鎖對(duì)象
SELECT l.session_id sid,
s.serial#,
l.locked_mode 鎖模式,
l.oracle_username 登錄用戶,
l.os_user_name 登錄機(jī)器用戶名,
s.machine 機(jī)器名,
s.terminal 終端用戶名,
o.object_name 被鎖對(duì)象名,
s.logon_time 登錄數(shù)據(jù)庫(kù)時(shí)間
FROM v$locked_object l, all_objects o, v$session s
WHERE l.object_id = o.object_id
AND l.session_id = s.sid
ORDER BY sid, s.serial#;
免責(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)容。