-- Select sess, a process statement for table locking and table locking. sid, sess. serial #, lo. oracle_username, lo. OS _user_name, ao. object_name, lo. locked_mode from v $ locked_object lo, dba_objects ao, v $ session sess where ao. object_id = lo. object_id and lo. session_id = sess. sid; alter system kill session '2014, 416,249 17 ';
-- Select t. table_name from user_constraints twhere t. constraint_type = 'r' and t. r_constraint_namein (select s. constraint_name from user_constraints swhere s. table_name = 'Primary table name' and s. constraint_type = 'P ')
-- Query the table space usage script -www.2cto.com-
Select df. tablespace_name "Tablespace", totalusedspace "Used MB", (df. totalspace-tu. totalusedspace) "Free MB", df. totalspace "Total MB", round (100 * (df. totalspace-tu. totalusedspace)/df. totalspace) "Pct. free "from (select tablespace_name, round (sum (bytes)/1048576) TotalSpacefrom dba_data_files group by tablespace_name) df, (select round (sum (bytes)/(1024*1024 )) totalusedspace, tablespace_namefrom dba_segments group by tablespace_name) tuwhere df. tablespace_name = tu. tablespace_name -- query various information such as the database encoding and language. select * from v $ nls_parameters;
Author Henry. cong