Tag: move

How to rename block change tracking file?

To move/rename current block change tracking file, one would need to restart the database. # Get current block change tracking file SQL> SELECT filename FROM v$block_change_tracking; FILENAME -------------------------------------------------------------------------------- /tmp/blocktracking.f # Shutdown database and start database in mount state SQL> SHUTDOWN IMMEDIATE; SQL> STARTUP MOUNT; # Rename block tracking file and SQL> ALTER DATABASE RENAME FILE … Continue reading How to rename block change tracking file?

Movement commands in vi

Move by one character h - Move cursor left j - Move cursor down k - Move cursor up l - Move cursor right Move by word w or W - Move forward by word, cursor is beginning of the word b or B - Move backward by word, cursor is beginning of the word … Continue reading Movement commands in vi

How to fix RMAN-06059/ORA-19625?

If archive logs are missing RMAN will fail with the following error also in cases when the archive logs are moved to another folder due to archive log filesystem getting full. RMAN-03002: failure of backup plus archivelog command at 10/31/2010 04:36:37 RMAN-06059: expected archived log not found, lost of archived log compromises recoverability ORA-19625: error … Continue reading How to fix RMAN-06059/ORA-19625?

How to move tempdb database files and user databases to new location?

Using the steps below one can change the location of the datafiles in SQLServer for user databases and tempdb. 1) First find the current location of the filename and name: select name, filename from sys.sysfiles name filename ------------------ ----------------------------------- tempdev C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\tempdb.mdf templog C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\templog.ldf 2) Run the ALTER … Continue reading How to move tempdb database files and user databases to new location?

sysaux – v$sysaux_occupants

-- view to monitor space usage by different occupants and procedure to move the feature to a different tablespace. SQL> COLUMN move_procedure FORMAT a35 SQL> COLUMN occupant_name FORMAT a30 SQL> SELECT occupant_name, move_procedure, space_usage_kbytes FROM v$sysaux_occupants; OCCUPANT_NAME MOVE_PROCEDURE SPACE_USAGE_KBYTES ------------------------------ ----------------------------------- ------------------ LOGMNR SYS.DBMS_LOGMNR_D.SET_TABLESPACE 6080 LOGSTDBY SYS.DBMS_LOGSTDBY.SET_TABLESPACE 896 STREAMS 512 ...

Commands to change cursor position in vi

h - Left l - Right k - Up j - Down w - Move forward to beginning of next word e - Move end of the word b - Move backward to beginning of the previous word 0 - First position on the line $ - Last position on the line ^ - First … Continue reading Commands to change cursor position in vi

How to move datafiles in temp tablespace?

One can't move the temp tablespace during mount stage like other datafiles using "ALTER DATABASE RENAME FILE.." so a workaround this issue is to create a new temp tablespace. SQL> drop tablespace temp; drop tablespace temp * ERROR at line 1: ORA-12906: cannot drop default temporary tablespace -- create a new temp tablespace SQL> CREATE … Continue reading How to move datafiles in temp tablespace?

Script to move Oracle Datafiles

Here is a nice script if you need to move your datafiles to a new location. SQL>spool rename_datafile.sql set line 140 set pagesize 2000 set heading off select 'alter database rename file ' ||''''|| file_name || '''' || ' to '|| ''''|| '/oracle/IMPRD/data' || substr(file_name, instr(file_name, '/', -1)) ||'''' || ';' from dba_data_files / SQL>spool … Continue reading Script to move Oracle Datafiles