16.10 - SCANDISK Examples - Teradata Database

Teradata Database Support Utilities

prodname
Teradata Database
vrm_release
16.10
created_date
June 2017
category
Configuration
featnum
B035-1180-161K

Example: Starting, stopping, and restarting a SCANDISK job

The following example illustrates a typical way to start, stop and restart a SCANDISK job.

  1. Start the restartscandisk.pl script with the -o option.
    perl restartscandisk.pl -o /home/test/ofile.out

    Because no SCANDISK command or input file was specified, the script runs the default SCANDISK command from the beginning. That is, it runs SCANDISK with no options on all subtables, free CIs, and the WAL log from the lowest (DB, WDB) level to the highest (MI, WMI). The output of the scan is saved to the ofile.out file.

  2. Stop the running SCANDISK job by entering the ABORT command or sending a signal to abort. For details, see Aborting the restartscandisk script.
  3. Restart the SCANDISK job at the point in which it was interrupted by issuing the following command.
    perl restartscandisk.pl -i /home/test/ofile.out

    The output file from step one contains the location where the SCANDISK job was stopped; therefore, it is used as the input file to restart SCANDISK at that point. Since an input file was specified, but no SCANDISK command, the script starts the previous SCANDISK command from step one. Since no output file was specified, the script will reuse the input file and append the results of the restarted scan to /home/test/ofile.out.

Example: Starting, stopping, and restarting a halted SCANDISK job

The following example illustrates one way to start, stop, and restart a halted SCANDISK job from the location specified by a tid and ridspec.

  1. Start the restartscandisk script.
    perl restartscandisk.pl SCANDISK CI

    Because no input file or tid[ridspec] were specified, the script runs the SCANDISK CI command from the beginning. The output is not saved to a file, but is sent to the standard output file (stdout).

  2. Stop the running SCANDISK job by entering the ABORT command or sending a signal to abort. For details, see Aborting the restartscandisk script.
  3. Because the SCANDISK output was not saved to a file, you must manually capture the tid and rowid displayed by the last INQUIRE command in the application window if you want to restart this SCANDISK job.
  4. If the tidand rowid displayed by the last INQUIRE command was 0 100 1024 0 1000 10000, you can restart SCANDISK from that location by issuing the following:
    perl restartscandisk.pl -t 0 100 1024 0 1000 10000
    Because no SCANDISK command or input file was specified, the script runs the default SCANDISK command (SCANDISK with no options) instead of the previous SCANDISK CI command.

Example: Running SCANDISK with no options

SCANDISK with no options scans all subtables from the DB level examining DBs, CIs, the MI, and free CIs. It also scans the WAL log at the WDB level, scanning WDBs, WCIs, and the WMI. In the following example, SCANDISK is started from Filer with no options. In order to restart this scan job later, you must submit an INQUIRE request to SCANDISK before aborting, and manually capture the tid and rowid from the last INQUIRE output in the application window. To restart SCANDISK, submit the captured tid and rowid to the SCANDISK command as part of the TABLE option, or restart SCANDISK using the restartscandisk script with the -t option.

   Filer ==> 
   scandisk 
   DB @ Cylinder 010100000000F4C2 Sector 16 (0010) length 1 (0001)
   DB ref count doesn’t match DBD row Count
   The scandisk found problems

Example: SCANDISK output showing interrupted write pattern in CI

The following is an example of output that SCANDISK generates when it finds an LSI interrupted write pattern in a CI. In this example, SCANDISK is started from Filer.

Filer ==>
scandisk ci
Mon May 06, 2008 15:12:20 :Scandisk has been started on all AMP Vprocs in the SCOPE.
vproc  0 (0000)  response
Mon May 06, 2008 15:55:21 : CI @ Cylinder 010100000000F4C2
Mon May 06, 2008 15:55:21 : LSI interrupted write pattern found in CI.
0120 MAY 05  05:02:35 LUN 1111, Start Block 00004545, Blocks 0400
SRD
num     table id        firstdbd  dbdcount offset
       u0    u1   tai
---- ----- ----- -----  --------  -------- ------
0001 0000  0494  0800     FFFF      0014   001E
Mon May 06, 2002  15:55:21 : Invalid DBD sector length of 14901 (3A35) found
Mon May 06, 2002  15:55:21 : Invalid DBD sector length of 26912 (6920) found
Mon May 06, 2002  15:55:21 : Invalid DBD sector length of 25972 (6574) found
Mon May 06, 2002  15:55:21 : Invalid DBD sector length of 12336 (3030) found
Mon May 06, 2002  15:55:21 : First rowid out of order dbds 18 (0012) and 	19 (0013)

Example: SCANDISK output showing interrupted write pattern in DB

The following is an example of output that SCANDISK generates when it finds an LSI interrupted write pattern in a DB. In this example, SCANDISK is started from Filer.

Filer ==>
scandisk db
Tue Feb 28, 2008 15:16:50 :Scandisk has been started on all AMP Vprocs in the SCOPE.
vproc  0 (0000)  response
Mon May 06, 2008 15:12:20
1 of 1 vprocs responded with no messages or errors.
Type 'ABORT' to stop the command before completion
Type 'INQUIRE' to check on progress of command
Reading
vproc  0 (0000)  response
Mon May 06, 2008 15:11:11 : CI @ Cylinder 010100000000F4C2
Mon May 06, 2008 15:11:11 : LSI interrupted write pattern found in DB.
0120 MAY 05  05:02:35 LUN 1111, Start Block 00004545, Blocks 0400
Mon May 06, 2008 15:11:11 : rows  -1 (FFFFFFFF) and 0 (0000) are out 	of order

Example: Running SCANDISK on a data subtable

In the following example, SCANDISK scans the employee.ttt data subtable at the DB level.

SCANDISK “employee.ttt” p

Example: Running SCANDISK on a range of rows in a data subtable

In the following example, SCANDISK scans a range of rows in a primary data subtable.

SCANDISK “employee.ttt” p 09E8 C4AB to 4732 009C

Example: Running SCANDISK with the INQUIRE option

In the following example, the INQUIRE command is automatically repeated at one minute intervals. Therefore, you get a display of SCANDISK progress every minute.

Filer ==>
> scandisk inq 1 m
> Mon Jul 16, 2012 05:02:45
SCANDISK STATUS :
Slowest vproc 2 is 44% done
Fastest vproc 3 is 64% done
The scandisk is about 55% done