MAXL scripts for Data load and Databackup

Hi Guys,


I am providing MAXL scripts for

1.Data Load Back up

2.Loading data using rule file

3.Data Export

4.Loading Data from back up file

Regards,
Kotireddy

Export Import Maxl
___________________

login Username Password on Hostname;

set message level error;

spool on to 'D:\Sample\log\SampleExportImport.log';

/* Let users know maintenance is in progress */
alter database Sample.Sample set note 'Maintenance is in progress - you will not be able to update';
iferror 'exitbeforecomplete';

/* Security */
alter system load application Sample;
alter application Sample load database Sample;

/* Prevent any user with a permission lower than Application designer from making connections or running commands */
alter application Sample disable connects;
iferror 'exitbeforecomplete';

/* kick out all sessions */
alter system logout session on database Sample.Sample;
iferror 'exitbeforecomplete';

/* Save level 0 data out to file */
export database Sample.Sample level0 data in columns to data_file 'D:\\Sample\\CurrentDay\\SampleData.txt';
iferror 'exitbeforecomplete';

/* Clear all data out of database */
alter database Sample.Sample reset data;
iferror 'exitbeforecomplete';

/* Load Exported file back in */
import database Sample.Sample data
from local text data_file 'D:\Sample\\CurrentDay\\SampleData.txt'
on error write to 'D:\Sample\\CurrentDay\\SampleData.err';
iferror 'exitbeforecomplete';

/* validate data headers okay */
alter database Sample.Sample validate data to local logfile 'D:\Sample\\CurrentDay\\SampleValidate.log';
iferror 'exitbeforecomplete';
alter database Sample.Sample repair invalid_block_headers;
iferror 'exitbeforecomplete';

/* Save log file */
shell copy D:Sample\\Sample.LOG 'D:\\Hyfi\\Backups\\Sample\\CurrentDay\\Sample.log';
iferror 'exitbeforecomplete';

/* Clear the application log file */
alter application Sample clear logfile;
iferror 'exitbeforecomplete';

/* Stop Application */
alter system unload application Sample;

/* Start Application */
alter system load application Sample;

/* Allow people to connect now */
alter application Sample enable connects;

define label 'exitbeforecomplete';

/* Processfailure */
logout;
spool off;
exit;
______________________________________________________________________

Calc script Maxl
________________


login Username Password on Hostname;

 set message level error;

 spool on to 'D:\Sample\log\SampleCalcs.log';

 execute calculation Sample.Sample.Sdcp;

 execute calculation Sample.Sample.Sdcp1;


 spool off;

 logout;
 exit;
_______________________________________________________________________

Calling the Calc Script Maxl in Batch
______________________________________

essmsh D:\Sample\mxl\SampleCalcs.mxl

1 comment :

  1. Very Useful and Valuable information regarding to Hyperion

    ReplyDelete