Run script file in AUL/MyDUL for faster recovery

    Somebody told me that his database has about 900 tables, how to perform recovery quickly with AUL/MyDUL? If we typed one command by one command, it's really a trouble work. Although I do not design the feature to perform schema based recovery or whole database recovery command in AUL/MyDUL, I do provide an alternative solution with script file.

    Use "LIST TABLE username" command to generate the commands for you:

AUL> list table anysql
UNLOAD TABLE anysql.P_MV_FACT_SALES TO P_MV_FACT_SALES.txt;
UNLOAD TABLE anysql.TIME_DIM TO TIME_DIM.txt;
UNLOAD TABLE anysql.FACT_SALES TO FACT_SALES.txt;
UNLOAD TABLE anysql.MV_FACT_SALES TO MV_FACT_SALES.txt;
UNLOAD TABLE anysql.SEG$ TO SEG$.txt;
UNLOAD TABLE anysql.P_MV_FACT_SALES PARTITION P_MAX TO P_MV_FACT_SALES_P_MAX.txt;

    Copy & paste the output to a text file, or add "TO filename" to the "LIST TABLE" command to generate the script file.

AUL> list table anysql to unload_anysql.sql

    Then we could simply type "@ filename" to run the recovery command in batch:

AUL> @unload_anysql.sql
AUL>  UNLOAD TABLE anysql.P_MV_FACT_SALES TO P_MV_FACT_SALES.txt;
AUL>  UNLOAD TABLE anysql.TIME_DIM TO TIME_DIM.txt;
2006-11-20 09:39:59
Unload OBJD=9759 FILE=4 BLOCK=11 CLUSTER=0 ...
2006-11-20 09:40:21
AUL>  UNLOAD TABLE anysql.FACT_SALES TO FACT_SALES.txt;
2006-11-20 09:40:21
Unload OBJD=9761 FILE=4 BLOCK=19 CLUSTER=0 ...
2006-11-20 09:40:29
AUL>  UNLOAD TABLE anysql.MV_FACT_SALES TO MV_FACT_SALES.txt;
2006-11-20 09:40:29
Unload OBJD=9762 FILE=4 BLOCK=99 CLUSTER=0 ...
2006-11-20 09:40:37
AUL>  UNLOAD TABLE anysql.SEG$ TO SEG$.txt;
2006-11-20 09:40:37
Unload OBJD=9796 FILE=4 BLOCK=2483 CLUSTER=0 ...
2006-11-20 09:40:45
AUL>  UNLOAD TABLE anysql.P_MV_FACT_SALES PARTITION P_MAX TO P_MV_FACT_SALES_P_MAX.txt;
2006-11-20 09:40:45
Unload OBJD=9777 FILE=4 BLOCK=2475 CLUSTER=0 ...
2006-11-20 09:40:53
AUL>

    But you cannot nest the "@ filename" command, which mean you cannot call another script file in one script file.

Post a comment

SCode:
Mail(*, but will not be displayed):
Home: