Skip to content

Instantly share code, notes, and snippets.

@fljdin
Created April 9, 2014 14:45
Show Gist options
  • Save fljdin/fb67cb9834f23b96040b to your computer and use it in GitHub Desktop.
Save fljdin/fb67cb9834f23b96040b to your computer and use it in GitHub Desktop.
alter system set undo_tablespace = 'UNDOTBS2' scope=both;
drop tablespace undotbs1 including contents and datafiles;
create undo tablespace UNDOTBS2 datafile
'+FLASH' size 5G autoextend on, '+FLASH' size 5G autoextend on,
'+FLASH' size 5G autoextend on, '+FLASH' size 5G autoextend on;
SELECT a.name,b.status , d.username , d.sid , d.serial#
FROM v$rollname a,v$rollstat b, v$transaction c , v$session d
WHERE a.usn = b.usn
AND a.usn = c.xidusn
AND c.ses_addr = d.saddr
AND a.name IN (
SELECT segment_name
FROM dba_segments
WHERE tablespace_name = 'UNDOTBS1'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment