Template:SQWareProduction sqwmsq RebuildIndexDatabase.ksh help: Difference between revisions

From Wiki_dbSQWare
Jump to navigation Jump to search
m Updated by BatchUser
No edit summary
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<pre>
<pre>
Can't find if env is 'SqlCmd' or 'FreeTds' !
Can't find if env is 'SqlCmd' or 'FreeTds' !
Sourcing sqwmsq_Global.lib v2024.08 SQWareProduction for MsSql (dbSQWare) ...  
Sourcing sqwmsq_Global.lib v2025.06 SQWareProduction for MsSql (dbSQWare) ...  


Run sqwmsq_RebuildIndexDatabase.ksh -h : 2024-12-24 08:36:37
Usage: sqwmsq_RebuildIndexDatabase.ksh [-h] -I <FreeTdsAlias> -D <DatabaseName> [+ options]


__________________________________________________________________
DESCRIPTION
Program informations
  sqwmsq_RebuildIndexDatabase.ksh Rebuild index of database
SqwVersion=2024.08 / 2024.08
SUPPORT
2024-12-24 08:36:37
  MsSql supported versions: 2000 <= v <= 2022
Copyright 2010-2024, dbSQWare (www.dbsqware.com)
Linux dbsqware02 4.15.18-21-pve #1 SMP PVE 4.15.18-48 (Fri, 20 Sep 2019 11:28:30 +0200) x86_64 GNU/Linux
gvsqw_GenPath=/home/dbsqware/dbSQWare/SQWareProduction/mssql/bin
Path=/home/dbsqware/dbSQWare/SQWareProduction/mssql/bin
./sqwmsq_RebuildIndexDatabase.ksh -h
dbsqware@dbsqware02


sqwmsq_RebuildI,dbsqware ./sqwmsq_RebuildIndexDatabase.ksh -h
PARAMETERS
  `-pstree -aul 22576
    -I  Instance      : Target instance (freeTds alias).
    -D  databasename  : Target database.
OPTIONS
    -h                : Display the full usage.
    -s                : Display samples of usage.
    -IT  listtables  : List of tables to run update statistics on (by default all).
    -ET  listtables  : Tables list to exclude.
    -IL  likeclause  : Like clause to generate tables list (example: 'tbl%').
    -EL  likeclause  : Like clause to exclude tables (example: 'notbl%').
    -WCT  whereclause  : Where clause to generate tables list.
    -FRT      code    : Force return code value on error.
    -AddMail  email  : Email address to add at 'demo-sqwarebox@dbsqware.com'.
    -RebuildType  type : Type of rebuild, 'all' for table, 'index' for indexes (by default 'index').
    -MinRatioReb ratio : Min avg_fragmentation_in_percent before rebuild (by default 30 %).
    -MinRatioRgz ratio : Min avg_fragmentation_in_percent before reorganize (by default 10 %).
    -SizeMaxIndex Size : Take into account indexes <= $gvsqw_SizeMaxIndexRebuild Mb (by default, 50000 Mb).
    -SizeMinIndex Size : Take into account indexes >= $gvsqw_SizeMinIndexRebuild Mb (by default, 1 Mb).
    -SendReport        : Send execution log report.
    -SortInTempdb      : Rebuild with option sort_in_tempdb=on.
    -Online            : Rebuild with option online=on.
    -Force            : Force Rebuild offline if necessary when -Online.
    -NoMail            : Deactivate sendmail on error demo-sqwarebox@dbsqware.com (by default, send on error).
    -Locale    locale  : Force Locale for help display (fr,en).
    -Flag    filename : Fichier a chercher.
    -Exec              : Execute commands (by default, display generated commands).


__________________________________________________________________
Not sending mail because you are in connected mode !!!
Error, ExecEnvType='LinuxKO' ...
Begining    : 2024-12-24 08:36:37
End          : 2024-12-24 08:36:37
Duration    : 00:00:00
</pre>
</pre>

Revision as of 18:53, 1 July 2025

Can't find if env is 'SqlCmd' or 'FreeTds' !
Sourcing sqwmsq_Global.lib v2025.06 SQWareProduction for MsSql (dbSQWare) ... 

Usage: sqwmsq_RebuildIndexDatabase.ksh [-h] -I <FreeTdsAlias> -D <DatabaseName> [+ options]

DESCRIPTION
   sqwmsq_RebuildIndexDatabase.ksh Rebuild index of database
SUPPORT
   MsSql supported versions: 2000 <= v <= 2022

PARAMETERS
     -I   Instance      : Target instance (freeTds alias).
     -D   databasename  : Target database.
OPTIONS
     -h                 : Display the full usage.
     -s                 : Display samples of usage.
     -IT   listtables   : List of tables to run update statistics on (by default all).
     -ET   listtables   : Tables list to exclude.
     -IL   likeclause   : Like clause to generate tables list (example: 'tbl%').
     -EL   likeclause   : Like clause to exclude tables (example: 'notbl%').
     -WCT  whereclause  : Where clause to generate tables list.
     -FRT       code    : Force return code value on error.
     -AddMail   email   : Email address to add at 'demo-sqwarebox@dbsqware.com'.
     -RebuildType  type : Type of rebuild, 'all' for table, 'index' for indexes (by default 'index').
     -MinRatioReb ratio : Min avg_fragmentation_in_percent before rebuild (by default 30 %).
     -MinRatioRgz ratio : Min avg_fragmentation_in_percent before reorganize (by default 10 %).
     -SizeMaxIndex Size : Take into account indexes <= $gvsqw_SizeMaxIndexRebuild Mb (by default, 50000 Mb).
     -SizeMinIndex Size : Take into account indexes >= $gvsqw_SizeMinIndexRebuild Mb (by default, 1 Mb).
     -SendReport        : Send execution log report.
     -SortInTempdb      : Rebuild with option sort_in_tempdb=on.
     -Online            : Rebuild with option online=on.
     -Force             : Force Rebuild offline if necessary when -Online.
     -NoMail            : Deactivate sendmail on error demo-sqwarebox@dbsqware.com (by default, send on error).
     -Locale    locale  : Force Locale for help display (fr,en).
     -Flag     filename : Fichier a chercher.
     -Exec              : Execute commands (by default, display generated commands).