Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Basic operation of ORCALE

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

create tablespace

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;

Delete test user

drop user wmsloc cascade;

Create a test user

create user wrtest identified by wrtest;

Authorized test user

grant connect,resource,dba to wrtest;

--Selective authorization

grant select on sy_user to user

commit;

change tablespace

select 'alter table '|| table_name ||' move tablespace tablespacename;' from user_all_tables;

select 'alter index '|| index_name ||' rebuild tablespace tablespacename;' from user_indexes;

re-indexing

select 'alter index '|| index_name ||' rebuild;' from user_indexes;

running SQL

SELECT b.sid oracleID,

b.username Log in Oracle username,

b.serial#,

spid Operating system ID,

paddr,

sql_text SQL being executed,

b. Name of machine

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'

--Find Oracle's current locked object

SELECT l.session_id sid,

s.serial#,

l.locked_mode,

l.oracle_username Logged in user,

l.os_user_name Login machine user name,

s.machine name,

s.terminal End user name,

o.object_name Locked object name,

s.logon_time Log in database time

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#;

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report