Thursday, 20 September 2012

Oracle Trace Folder

If there are no trace files in /oracle/<SID>/saptrace the configure destination may be different.
To find the configured destination:
Log into Oracle
Type:
show parameter user_dump_dest

Alternatively run:
SELECT VALUE FROM V$DIAG_INFO WHERE NAME = 'Default Trace File';

Friday, 14 September 2012

SAP Backup and Restore

Info taken from:
http://help.sap.com/saphelp_nw04/helpdata/en/e6/f3d0ed99634078be2da254b97104d7/content.htm

Restore full database:
brrestore -d util_file -p init<SID>.sap.online -m full -b <backup log file to use>

Restore individual datafiles:
brrestore -d util_file -p init<SID>.sap.online -m <file number> -b <backup log file to use>

File number is the Oracle file number. To list the Oracle file numbers in the original database:

select file#, name from v$datafile;


FILE#       NAME  
---------------------------------------------- 
1 /oracle/ECY/sapdata1/system_1/system.data1 
2 /oracle/ECY/sapdata1/undo_1/undo.data1 
3 /oracle/ECY/sapdata1/sysaux_1/sysaux.data1...


Restore archive log files:
brrestore -a util_file -p init<SID>.sap.online -m <file number> -b <backup log file to use>